You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The creation of the nested dns block should be reflected in the terraform plan.
Actual Behavior
The creation of the nested dns block is not reflected in the terraform plan.
According to the terraform plan, the nested dns block will not be created.
However, if I run terraform apply, the nested dns block is indeed processed and the servers are added in Azure.
Terraform will perform the following actions:# azurerm_firewall_policy.example will be created+resource"azurerm_firewall_policy""example" {
+ child_policies = (knownafterapply)
+ firewalls = (knownafterapply)
+ id = (knownafterapply)
+ location ="westeurope"+ name ="example-policy"+ resource_group_name ="rg-DynamicBlocks-dev-01"+ rule_collection_groups = (knownafterapply)
+ sku = (knownafterapply)
+ threat_intelligence_mode ="Alert"
}
# azurerm_ip_group.example will be created+resource"azurerm_ip_group""example" {
+ cidrs = [
+"10.0.0.0/16",
]
+ id = (knownafterapply)
+ location ="westeurope"+ name ="example1-ipgroup"+ resource_group_name ="rg-DynamicBlocks-dev-01"+ tags = {
+"environment"="dev"
}
}
# azurerm_resource_group.example will be created+resource"azurerm_resource_group""example" {
+ id = (knownafterapply)
+ location ="westeurope"+ name ="rg-DynamicBlocks-dev-01"
}
where the nested dns block should be dynamically created based on the id of the ip group (which is known after apply), you will see that the dynamic block is not shown in the terraform plan.
terraform init
terraform apply
Additional Context
We try to build nested blocks based on variables known after apply. Unfortunately you cannot use the count field for nested blocks, as described in this issue
An issue for the azurerm provider has already been opened and closed. We believe this is an issue with the terraform core.
Thanks for filing the issue! If you inspect the full json plan output you should be able to see that the dns value is unknown. There does seem to be a bug in the renderer for the CLI output which is not showing that block at all when it's contents are entirely unknown.
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/QBY-MauriceBaerisch/521ff40682bebb6b43f22244063a2509
Expected Behavior
The creation of the nested dns block should be reflected in the terraform plan.
Actual Behavior
The creation of the nested dns block is not reflected in the terraform plan.
According to the terraform plan, the nested dns block will not be created.
However, if I run
terraform apply
, the nested dns block is indeed processed and the servers are added in Azure.Steps to Reproduce
Using azurerm and the example
where the nested dns block should be dynamically created based on the id of the ip group (which is known after apply), you will see that the dynamic block is not shown in the terraform plan.
terraform init
terraform apply
Additional Context
We try to build nested blocks based on variables known after apply. Unfortunately you cannot use the count field for nested blocks, as described in this issue
An issue for the azurerm provider has already been opened and closed. We believe this is an issue with the terraform core.
References
count
meta-argument #33105The text was updated successfully, but these errors were encountered: