Skip to content
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_codebuildproject requires two "applys" when created with a new IAM role #11741

Closed
sethcleveland opened this issue Jan 23, 2020 · 2 comments
Closed
Labels
regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/codebuild Issues and PRs that pertain to the codebuild service.
Milestone

Comments

@sethcleveland
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform -v
Terraform v0.12.20
+ provider.aws v2.45.0

Affected Resource(s)

  • aws_codebuild_project

Terraform Configuration Files

A terraform apply with this module demonstrates the issue - https://github.com/tmknom/terraform-aws-codebuild/tree/master/examples/complete

Expected Behavior

First terraform apply creates the codebuild project successfully.

Actual Behavior

The first terraform apply errors with this message

Error: Error creating CodeBuild project: InvalidInputException:

  on ../../main.tf line 6, in resource "aws_codebuild_project" "default":
   6: resource "aws_codebuild_project" "default" {

Running terraform apply again resolves the issue.

Steps to Reproduce

  1. terraform apply
  2. terraform apply

Important Factoids

Creating the iam_role and waiting a few seconds seems to resolve this issue. However, that seems to defeat the purpose of a well-contained module.

References

My best guess is that this is related to the following IAM eventual consistency issues.

  • #0000
@ghost ghost added the service/codebuild Issues and PRs that pertain to the codebuild service. label Jan 23, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 23, 2020
@bflad bflad added this to the v2.46.0 milestone Jan 24, 2020
@bflad bflad added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 24, 2020
@bflad
Copy link
Contributor

bflad commented Jan 24, 2020

Hi @sethcleveland 👋 Thank you for reporting this issue and sorry you are running into trouble. This is due to a regression in version 2.45.0 of the Terraform AWS Provider (#11682) and was resolved in Terraform AWS Provider version 2.46.0, which was released January 23rd. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. 👍

@bflad bflad closed this as completed Jan 24, 2020
@ghost
Copy link

ghost commented Mar 27, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
Development

No branches or pull requests

2 participants