Closed KubaMazurkiewicz closed 1 year ago
Hey @KubaMazurkiewicz , plese try it again with new provider version and let us know if it works for you now.
hey, @fmunozmiranda with v0.6.19-beta its still not working (same as in v0.6.18-beta)
I created new policy set and run terraform apply again and still plan is showing 1 to change:
➜ ~ ise_tf$ terraform apply
Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ciscoise_network_access_policy_set.policy_sets will be created
+ resource "ciscoise_network_access_policy_set" "policy_sets" {
+ id = (known after apply)
+ item = (known after apply)
+ last_updated = (known after apply)
+ parameters {
+ default = (known after apply)
+ description = "Test Policy"
+ hit_counts = (known after apply)
+ id = (known after apply)
+ is_proxy = "false"
+ link = (known after apply)
+ name = "New Policy Set 97"
+ rank = (known after apply)
+ service_name = "Default Network Access"
+ state = "enabled"
+ condition {
+ attribute_name = (known after apply)
+ attribute_value = (known after apply)
+ condition_type = "ConditionAndBlock"
+ description = (known after apply)
+ dictionary_name = (known after apply)
+ dictionary_value = (known after apply)
+ id = (known after apply)
+ is_negate = "false"
+ link = (known after apply)
+ name = (known after apply)
+ operator = (known after apply)
+ week_days = (known after apply)
+ week_days_exception = (known after apply)
+ children {
+ attribute_name = (known after apply)
+ attribute_value = (known after apply)
+ condition_type = "ConditionReference"
+ dictionary_name = (known after apply)
+ dictionary_value = (known after apply)
+ id = "eeba3cbc-de57-4171-a0f5-dfbe0d012af4"
+ is_negate = (known after apply)
+ link = (known after apply)
+ operator = (known after apply)
}
+ children {
+ attribute_name = (known after apply)
+ attribute_value = (known after apply)
+ condition_type = "ConditionReference"
+ dictionary_name = (known after apply)
+ dictionary_value = (known after apply)
+ id = "49ec9c17-6987-43ef-9478-a42111c59b81"
+ is_negate = (known after apply)
+ link = (known after apply)
+ operator = (known after apply)
}
}
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ciscoise_network_access_policy_set.policy_sets: Creating...
ciscoise_network_access_policy_set.policy_sets: Creation complete after 0s [id=id:=00cfa6a0-da0e-4b03-ae74-02acb301d486\name:=New Policy Set 97]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
➜ ~ ise_tf$ terraform apply
ciscoise_network_access_policy_set.policy_sets: Refreshing state... [id=id:=00cfa6a0-da0e-4b03-ae74-02acb301d486\name:=New Policy Set 97]
Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# ciscoise_network_access_policy_set.policy_sets will be updated in-place
~ resource "ciscoise_network_access_policy_set" "policy_sets" {
id = "id:=00cfa6a0-da0e-4b03-ae74-02acb301d486\\name:=New Policy Set 97"
# (1 unchanged attribute hidden)
~ parameters {
id = "00cfa6a0-da0e-4b03-ae74-02acb301d486"
name = "New Policy Set 97"
# (8 unchanged attributes hidden)
~ condition {
# (5 unchanged attributes hidden)
~ children {
+ id = "eeba3cbc-de57-4171-a0f5-dfbe0d012af4"
# (3 unchanged attributes hidden)
}
~ children {
+ id = "49ec9c17-6987-43ef-9478-a42111c59b81"
# (3 unchanged attributes hidden)
}
}
}
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
@KubaMazurkiewicz please try it again with 0.6.20-beta
and let us know how does it go.
@fmunozmiranda with 0.6.20-beta it works fine. Thanks
Prerequisites
Describe the bug State of id parameter under children block is not properly handled by the provider. Terraform suggests updating resource every time I run terraform plan/apply even though there are no changes in terraform code.
I'm using following terraform code
When I run this code for first time im receiving expected output from terraform apply:
After apply when I run terraform plan again without any modifications to TF code im getting following result:
Expected behavior Resource ciscoise_network_access_policy_set should not suggest adding id parameter under children every time terraform plan/apply runs.
Which means that this should be expected behaviour after terraform plan:
This works fine for ciscoise_network_access_policy_set for conditition type "ConditionReference" without children block.
Screenshots Not relevant
Environment (please complete the following information):
Additional context None