hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.2k forks source link

[Bug]: Terraform does not recognize a diff in parameters following a failure of an SC provisioned product update. Subsequent TF Apply runs do not re-update the provisioned products #38705

Open MohammedJennane opened 3 months ago

MohammedJennane commented 3 months ago

Terraform Core Version

1.7.5

AWS Provider Version

5.5.0

Affected Resource(s)

aws_servicecatalog_provisioned_product

Expected Behavior

Actual Behavior

Terraform does not recognize a diff in parameters following a failure of an SC provisioned product update. Subsequent TF Apply runs with same parameters do not re-update the provisioned products.

Assume you have a provisioned product that was successfully provisioned with parameter values P={p1,..,pn} and you are trying to update with a set of Parameter values P'={p'1, .. p'1n}. Let's also assume TF triggers the update of the SC product and that this update failed for an arbitrary reason.

This results in the following:

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

#terraform-plan
[2024-06-20 12:19:42,043] [INFO] Starting terraform plan phase...
[2024-06-20 12:19:42,055] [INFO] [...] Command launched:  terraform plan -out /secrets/chain  -lock=false -detailed-exitcode -no-color
module.appliance.module.module1.module.myModule.random_uuid.generate_uuid: Refreshing state... [id=0341724f-ed78-6669-424c-62ead8708001]
module.appliance.module.module1.data.aws_cloudformation_stack.myportfolio: Reading...
...
module.appliance.data.aws_ami.ubuntu_server_lts: Read complete after 7s [id=ami-XXX]
module.appliance.module.bastion_sg.aws_instance.instance: Refreshing state... [id=i-XXX]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Steps to Reproduce

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 3 months ago

Similar #31705

vpulagarwal commented 1 month ago

+1 on the issue. I even tried to refresh the state of the provisioned product with terraform apply -refresh-only, but it doesn't refresh the TF state. This command does work for other AWS resources such as SSM Parameter etc provisioned using TF.