I met with the strange work of opentelekomcloud_vpc_subnet_v1.
When I create a resource without specifying the primary and secondary DNS I get the expected result (with default values):
When I try to add or change existing values in the created resource (for example, secondary DNS) and do not touch the primary one, it looks good on the plan, but after applying these changes, the secondary DNS overrides the primary and only one remains.
So, one subnet is already created based on this code:
I want to make the following changes: secondary_dns = "100.125.129.199" -> "100.125.129.200"
Planning results:
Terraform will perform the following actions:
# module.network.opentelekomcloud_vpc_subnet_v1.subnet will be updated in-place
~ resource "opentelekomcloud_vpc_subnet_v1" "subnet" {
id = "3c4f51cb-f7fc-4dc6-ac2b-8e2c7b721b66"
name = "subnet-project-name"
~ secondary_dns = "100.125.129.199" -> "100.125.129.200"
# (10 unchanged attributes hidden)
}
So, keeping the same parameters as before, I run the plan again and get the following result:
Terraform will perform the following actions:
# module.network.opentelekomcloud_vpc_subnet_v1.subnet will be updated in-place
~ resource "opentelekomcloud_vpc_subnet_v1" "subnet" {
id = "3c4f51cb-f7fc-4dc6-ac2b-8e2c7b721b66"
name = "subnet-project-name"
~ primary_dns = "100.125.129.200" -> "100.125.4.25"
+ secondary_dns = "100.125.129.200"
# (10 unchanged attributes hidden)
}
After that I get the expected result, I wanted from the beginning, but after 2 runs of apply command..
It was originally planned, or is it a bug?
The problem is not critical, but it brings discomfort..
I will be grateful for a hint or an answer, thanks!
Hі, colleagues!
I met with the strange work of opentelekomcloud_vpc_subnet_v1. When I create a resource without specifying the primary and secondary DNS I get the expected result (with default values):
When I try to add or change existing values in the created resource (for example, secondary DNS) and do not touch the primary one, it looks good on the plan, but after applying these changes, the secondary DNS overrides the primary and only one remains.
So, one subnet is already created based on this code:
I want to make the following changes: secondary_dns = "100.125.129.199" -> "100.125.129.200"
Planning results:
So, keeping the same parameters as before, I run the plan again and get the following result:
After that I get the expected result, I wanted from the beginning, but after 2 runs of apply command..
It was originally planned, or is it a bug? The problem is not critical, but it brings discomfort..
I will be grateful for a hint or an answer, thanks!