λ terraform -v
Terraform v0.12.18
+ provider.azurerm v1.39.0
azurerm_dns_aaaa_record
terraform {
backend "local" {
path = "terraform.tfstate"
}
}
provider "azurerm" {
# whilst the `version` attribute is optional, we recommend pinning to a given version of the Provider
version = "~> 1.39"
}
resource "azurerm_resource_group" "B12_azure_aaaa_mismatch_repro" {
name = "12_azure_aaaa_mismatch_repro"
location = "West US 2"
}
resource "azurerm_dns_zone" "BbbkaneScom" {
name = "bbkane.com"
resource_group_name = azurerm_resource_group.B12_azure_aaaa_mismatch_repro.name
}
resource "azurerm_dns_aaaa_record" "azure_aaaa_record" {
name = "name-ipv6"
zone_name = azurerm_dns_zone.BbbkaneScom.name
resource_group_name = azurerm_resource_group.B12_azure_aaaa_mismatch_repro.name
ttl = 3600
records = ["2607:f8b0:4005:0800:0000:0000:0000:1003"]
}
From terraform plan
after resource creation (TF_LOG=TRACE
): https://gist.github.com/bbkane/1e427ff5d614cb5b7c7878e4aa51b9b8
No panic
With the above code:
terraform init # initialize azure provider
terraform apply # create resource group, zone, and AAAA record
terraform plan # shouldn't do anything - all things already created and code not changed
terraform init # initialize azure provider
terraform apply # create resource group, zone, and AAAA record
terraform plan # wants to "update" already created AAAA record with uncompressed version
See output of terraform plan:
λ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
azurerm_resource_group.B12_azure_aaaa_mismatch_repro: Refreshing state... [id=/subscriptions/a9396794-7c83-412f-92c6-1e89857f8d96/resourceGroups/12_azure_aaaa_mismatch_repro]
azurerm_dns_zone.BbbkaneScom: Refreshing state... [id=/subscriptions/a9396794-7c83-412f-92c6-1e89857f8d96/resourceGroups/12_azure_aaaa_mismatch_repro/providers/Microsoft.Network/dnszones/bbkane.com]
azurerm_dns_aaaa_record.azure_aaaa_record: Refreshing state... [id=/subscriptions/a9396794-7c83-412f-92c6-1e89857f8d96/resourceGroups/12_azure_aaaa_mismatch_repro/providers/Microsoft.Network/dnszones/bbkane.com/AAAA/name-ipv6]
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# azurerm_dns_aaaa_record.azure_aaaa_record will be updated in-place
~ resource "azurerm_dns_aaaa_record" "azure_aaaa_record" {
fqdn = "name-ipv6.bbkane.com."
id = "/subscriptions/a9396794-7c83-412f-92c6-1e89857f8d96/resourceGroups/12_azure_aaaa_mismatch_repro/providers/Microsoft.Network/dnszones/bbkane.com/AAAA/name-ipv6"
name = "name-ipv6"
~ records = [
+ "2607:f8b0:4005:0800:0000:0000:0000:1003",
- "2607:f8b0:4005:800::1003",
]
resource_group_name = "12_azure_aaaa_mismatch_repro"
tags = {}
ttl = 3600
zone_name = "bbkane.com"
}
Plan: 0 to add, 1 to change, 0 to destroy.
------------------------------------------------------------------------
Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
mkdir AAAA_repro && cd AAAA_repro
terraform init # initialize azure provider
terraform apply # create resource group, zone, and AAAA record
terraform plan # wants to "update" already created AAAA record with uncompressed version
Nothing special
Nothing I could find.
I'll have a look into this
Sorry @tombuildsstuff, this one has been fixed and shipped in the last release. Sorry for the confusion.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
Most helpful comment
I'll have a look into this