Closed eduardodfmex closed 1 month ago
@eduardodfmex can you confirm that this is still an issue in 3.0.0
I will test with 3.0.0
@mattdot I confirm yes, is still an issue in 3.0.0.
Is destroying the Environment and creating a new one and ends with error:
Plan: 1 to add, 1 to change, 1 to destroy.
Changes to Outputs: ~ environment_id = "a1deee2c-f6aa-ee7b-b0c7-c36fec629443" -> (known after apply) ~ environment_type = "Sandbox" -> "Production"
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
powerplatform_environment.example_environment_settings: Destroying... [id=a1deee2c-f6aa-ee7b-b0c7-c36fec629443] powerplatform_environment.example_environment_settings: Still destroying... [id=a1deee2c-f6aa-ee7b-b0c7-c36fec629443, 10s elapsed] powerplatform_environment.example_environment_settings: Still destroying... [id=a1deee2c-f6aa-ee7b-b0c7-c36fec629443, 20s elapsed] powerplatform_environment.example_environment_settings: Still destroying... [id=a1deee2c-f6aa-ee7b-b0c7-c36fec629443, 30s elapsed] powerplatform_environment.example_environment_settings: Destruction complete after 3m7s powerplatform_environment.example_environment_settings: Creating...
│ Error: Provider produced inconsistent result after apply │ │ When applying changes to powerplatform_environment_settings.settings, provider "provider[\"registry.terraform.io/microsoft/power-platform\"]" produced an unexpected new value: .environment_id: was │ cty.StringVal("06ae29e4-724f-e98e-9d8c-2dce9bf3f650"), but now cty.StringVal("a1deee2c-f6aa-ee7b-b0c7-c36fec629443"). │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Changing Environment type from "Sandbox" to "Production" creates a new environment_id
Changing Environment type from "Sandbox" to "Production" creates a new environment_id and all the configuration on the state is broken because all the resources that use the environment_id now points to a new environment.
│ Error: Provider produced inconsistent result after apply │ │ When applying changes to │ module.test.module.power_platform.powerplatform_environment_settings.pp_environment_settings, │ provider "provider[\"registry.terraform.io/microsoft/power-platform\"]" │ produced an unexpected new value: .environment_id: was │ cty.StringVal("91b08444-52a6-e176-8ca4-b2db8599XXXX"), but now │ cty.StringVal("3484dea0-fa1e-e88a-b826-06567fd4XXXX"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
To Reproduce
Steps to reproduce the behavior:
Sample Terraform Code
If applicable, add terraform code to help explain your problem.
Expected behavior
If I change the environment type from Sandbox to production the environment_id should be the same and tied resources and configuration can conserve the same environment_id.
System Information
Additional context
Add any other context about the problem here.
Contribution