-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
DB option groups with a failed IAM-related option apply do not detect missing options in subsqeuent plan #763
Comments
Having the same issue. Found a work around though by adding a wait after the IAM profile creation and then having the option_group depend on the role's instance profile:
|
We just stumbled upon this issue. In our case we did not get any error while applying plan (as far as I know), but somehow the ARN on AWS is empty. The this missing ARN is however not being detected: according to the state, it is filled out, according to AWS console, it isn't. |
+1 |
@SimplyMonk how did you apply this. |
Moved away from this but faith brought this up again. Rather than dynamically generating a value, we pass it semi-automatically as the generated value is quite consistant. It's always the same.
Atlas is secure meaning we can pass (ARN) manually like so in the variable ${var.manual_populate_s3_role_arn}
This resolved that problem. On to the next. |
Confirming this annoying bug. Thanks to @SimplyMonk for the inspiration. Relevant parts of our configuration (untested as yet, but everything is created with no errors):
|
@antgel adapted your approach. works a treat. thanks. |
I dont see sleep as a long term reliable option, it would be nice if depends on worked here. |
The fix for this has been merged into master and will release with version 1.30.0 of the AWS provider, likely on Wednesday. 👍 |
This has been released in version 1.30.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @mattzimmerman as hashicorp/terraform#14417. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
0.9.4
Affected Resource(s)
Terraform Configuration Files
Description
DB option groups with a failed option apply (I frequently see this on SQL Server DB option groups with an option that includes an IAM role for backing up/restoring to/from S3 buckets).
Terraform successfully creates my new IAM role, immediately applies that as part of an option to the
aws_db_option_group
, but then that apply fails because the IAM resource isn't available from the AWS API yet.As an aside, it would be nice if terraform apply could wait for the role to become available before attempting to use it in a
aws_db_option_group
(but that is easy to work around by creating it and tracking the IAM role used for the option group in another terraform run prior to creating the option group).However, when the Terraform run fails in this way (due to the newly-created IAM role and eventual consistency):
I noticed that Terraform has lost track of the state of the option it was adding. Subsequent plan/apply attempts do not detect any changes, and the option group that is created from the initial run never actually gets the option added to it.
The text was updated successfully, but these errors were encountered: