After creating a PA environment with custom domain name when you run TF for the next time it show some changes
`
# module.pa_env.powerplatform_environment.main will be updated in-place
~ resource "powerplatform_environment" "main" {
~ billing_policy_id = null -> (known after apply)
~ cadence = "Frequent" -> (known after apply)
~ dataverse = {
~ administration_mode_enabled = false -> (known after apply)
~ background_operation_enabled = true -> (known after apply)
+ linked_app_id = (known after apply)
+ linked_app_type = (known after apply)
+ linked_app_url = (known after apply)
~ security_group_id = "00000000-0000-0000-0000-000000000000" -> "0000000-0000-0000-0000-000000000000"
~ unique_name = "***********************" -> (known after apply)
~ url = "https://xxxyyy.crm4.dynamics.com/" -> (known after apply)
~ version = "9.2.24095.200" -> (known after apply)
# (4 unchanged attributes hidden)
}
~ description = null -> (known after apply)
~ environment_group_id = null -> (known after apply)
id = "**************************"
# (4 unchanged attributes hidden)
}`
and when you press yes it throws 409 Conflict error:
Unexpected HTTP status code. Expected: [200], received: [409] 409 Conflict | {"error":{"code":"DomainNameAlreadyInUse","message":"The specified domain name with a value of 'xxxyyy' is already in use. Please select a different value. If a domain name was recently │ changed, the previous domain name will not be available for use for up to 24 hours after the change.","detailUrlType":"NotSpecified"}}
This is my first try with the provider. As there is no such bug I believe (not tried) it may work correctly with default environmet url. I have many environments so I use names/urls defined by myself.
Describe the bug
After creating a PA environment with custom domain name when you run TF for the next time it show some changes `
and when you press yes it throws 409 Conflict error:
Unexpected HTTP status code. Expected: [200], received: [409] 409 Conflict | {"error":{"code":"DomainNameAlreadyInUse","message":"The specified domain name with a value of 'xxxyyy' is already in use. Please select a different value. If a domain name was recently │ changed, the previous domain name will not be available for use for up to 24 hours after the change.","detailUrlType":"NotSpecified"}}
Sample Terraform Code
Expected behavior
It should do nothing or just implement the changes.
System Information
Windows Server 2022 Datacenter AE, 21H2, build. 20348.2762 Terraform v1.9.8 on windows_amd64
Additional context
This is my first try with the provider. As there is no such bug I believe (not tried) it may work correctly with default environmet url. I have many environments so I use names/urls defined by myself.
Contribution
NO