[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
TF compares actual SC parameters with input parameters (P comparison with P')
TF resends all SC input parameters on updates (which seems to be the way SC works on the console)
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:
SC parameters in TF state = P' (updated)
But Actual SC parameters = P
Subsequent TF updates with P' do not run (Terraform see no change). Forcing us to change P' (often times with undesired side effects)
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
Provision an SC product (successfully) with a set of a parameter values P={p1, ..., pn}.
Attempt an update by changing a subset of parameter values P'={p'1, ..., p'm} (n>=m) in such a way that results in an error on the product.
Wait for product to roll back then attempt another update with P'
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
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
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