-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error describing Service Catalog Provisioned Product (pp-*******): unexpected state 'TAINTED', wanted target 'AVAILABLE'. last error: %!s(<nil>) & Not able to run update or destroy after this state #24574
Comments
I am still getting the same below 2 issue. Kindly re-open the issue @anGie44
terraform -version Please find below screenshot for reference |
Hi @kush-sumit , thanks for your reply here. Can you confirm which errors you're seeing now with
Thanks in advance! |
@anGie44 : Thanks for quick acknowledgement, when i hit terraform apply i could see only this one which is second one in your list aws_servicecatalog_provisioned_product.s3_bucket: Refreshing state... [id=pp-ixoexjt2mopy2] I belive we should take the error message from
But when a subsequent update or destroy is triggered then the product should either be triggered for update or terminate in case of destroy command and not display same error and exit which was original bug |
I see, thanks for confirming which error message you're most recently running in to @kush-sumit ! I'll re-open this on account that it's related to the original issue, just occurring a bit further down in the resource code: terraform-provider-aws/internal/service/servicecatalog/provisioned_product.go Lines 420 to 429 in 6e8fe78
|
Hi @anGie44: Thanks for working on the issue and releasing the fixes.
Issue Introduced or Still Exists I assume this is happening as you have added tainted also into wanted target instead of unexpected state. Could you please re-open this ticket and fix the issue. please find below snippet for your reference. Wrong Status from Terraform Console please let me know any inputs further required from my end. Regards |
Hi @anGie44 @justinretzolk : Could you share any leads on above feedback regarding issue of tainted state? |
Hi @kush-sumit , the errors you are seeing in the AWS Console (in the provider, they are similarly fetched when calling the API method I do see how the tainted state should warrant a more immediate error to the user so I'll update that portion to return with the detailed status message. I'll also make a note in the documentation about debugging if it's not already present. |
Hi @anGie44: While doing the update of a provisioned product, if the there is a failure and product becomes tainted with the recent changes as part of fix terraform thinks that the deployment was successfull and as you could see in first screenshot it simply outputs modification got completed and 1 changed successfully. The request would be to just move out tainted stated from list of wanted state and we could just keep state "available" only there like before. This would then automatically throw the error record like it was doing after first fix where as the product went into tainted state terraform threw the output stating product is in tainted state and displayed the error record. |
Hi @anGie44: Thanks for releasing the fix. I did a round of testing and all seems to be working fine now. Thanks for your help on this issue |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
I apologize for the back and forth on this and that this was closed when the error is still happening. We have a new fix in the works. However, please note that now this resource will continue to function when a stack has a
You can use This seems like the right and only way forward but please let us know if you disagree. |
This functionality has been released in v4.63.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.9
on darwin_arm64
Affected Resource(s)
Service Catalog Product Yaml File
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behaviour
Terraform should provide the actual error message which is encountered during provisioning/deployment of product.
Actual Behaviour
Error: error describing Service Catalog Provisioned Product (pp-*********): unexpected state 'TAINTED', wanted target 'AVAILABLE'. last error: %!s()
│
Steps to Reproduce
terraform init
terraform plan
terraform apply
Once the bucket is created, Create an aws bucket in the account by name “kush-learning-1000-resouces”.
now update your variable "aws_logical_account_name_lower_case" value to kush and then hit apply.
terraform apply
you will see that deployment fails with error as a bucket is already present by this name and put the product in tainted state and all you will get is the error message
Error: error describing Service Catalog Provisioned Product (pp-*********): unexpected state 'TAINTED', wanted target 'AVAILABLE'. last error: %!s()
now if you try to revert back the value to "kush3" and hit terraform apply you will only get Error and same is case with below terraform destory
terraform destroy
Important Factoids
There are two bugs as below.
I tried simply running the aws cli command AWS CLI Documentation
aws servicecatalog describe-provisioned-product --id pp-***** and as per the output the value from "StatusMessage" should be displayed.
References
The text was updated successfully, but these errors were encountered: