-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
aws_sqs_queue_policy - fails on first apply, succeeds on second apply with no changes #13980
Comments
I am running into the same issue. I even set explicit dependencies between the |
It looks like this is a timing issue. After reading the docs on SQS |
I can reproduce this:
|
This is resolved
On Fri, Dec 11, 2020 at 5:45 PM Natan Lao ***@***.***> wrote:
I can reproduce this:
(.venv) ~/u/c/terraform develop> terraform -version
Terraform v0.14.0
+ provider registry.terraform.io/hashicorp/archive v2.0.0
+ provider registry.terraform.io/hashicorp/aws v3.20.0
+ provider registry.terraform.io/hashicorp/local v2.0.0
Your version of Terraform is out of date! The latest version
is 0.14.2. You can update by downloading from https://www.terraform.io/downloads.html
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#13980 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7XD4QALKXZ6GTJ2MDV2GDSUKVK3ANCNFSM4OLKCWSA>
.
--
Thanks,
Rex
|
@rexxavier could you elaborate? thank you |
I also ran into this exact problem just now. After the second "successful" run (no changes, according to Terraform), I checked out the queue in the console. It has the requested policy, so this is more of an annoyance than anything else. Still, would be nice if that 60 second sleep could be integrated into the process. |
Forgot to add here that @laurenty's suggested fix worked for me. |
Is it resolved in TF 14, @rexxavier? What do you mean? |
This seems to be still an issue. I am facing the same problem even with a 0.14.4 |
If this were to be fixed, it would be in the AWS provider. Not in TF itself. |
I think the point here is that there is a TF workaround for this timing issue, and the suggestion was made above that TF14 was going to have some such workaround built in, instead of requiring users to add a sleep time. It appears that this is not the case, so I'll stick to my time_sleep. |
same problem. |
Same problem Terraform 0.13.5 |
In #19639 I have modified the |
This functionality has been released in v3.45.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! |
- Remove SQS module as this introduced a cyclic dependency - Add explicit `depends_on` to resources - Move IAM role creation to outside endpoint module, creating them inside then needing to refer to them during SQS creation added to cyclic dependency. - Remove API Gateway root module, adds to dependencies between modules. - Move API Gateway deployment and stage outside of endpoint module, these only have to be applied once. - Add a sleep into the SQS deployment to allow propagation of queue config before applying policy (as discussed here: hashicorp/terraform-provider-aws#13980)
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 Version
0.12.28
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform should create the resource on the first apply
Actual Behavior
Terraform fails with the error above, on a re-run with no changes the apply succeeds.
Steps to Reproduce
terraform apply
terraform apply
Important Factoids
Happens on both CI and local machine
The text was updated successfully, but these errors were encountered: