-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
added local cache type and mode options #8215
Conversation
First time making an addition to Terraform if there are any obvious improvements, please let me know before I attempt the acceptance tests. Will be running the acceptance tests later tonight |
Test updated |
That's such an important feature on AWS CodeBuild to make the build way quicker for docker...eager to see it integrated |
@bflad any chance on getting it merged soon? It's a pretty cool feature |
@imightybigman the documentation part is missing in your PR. Please check the |
ah ok, no problem. I will do that tonight |
@jbienkowski311 the markdown has been updated |
Is there anything keeping this from being merged? Would really love to be able to enable docker caching in my Terraform. |
Anything preventing a merge here? We'd love to have this feature. @azalenski-callpage |
I'll keep the heartbeat going. @azalenski-callpage is there anything left to do here? |
Would also love to see this merged! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in, thanks @imightybigman 🚀
Output from acceptance testing (test failure unrelated):
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSourceInvalid (14.74s)
--- FAIL: TestAccAWSCodeBuildProject_VpcConfig (29.03s)
testing.go:568: Step 0 error: errors during apply:
Error: Error creating CodeBuild project: InvalidInputException: CodeBuild currently doesn't support VPC in us-west-2d, please select subnets in other availability zones.
status code: 400, request id: dc670ce6-7d4f-11e9-be0b-7d89e7d51a68
on /var/folders/v0/_d108fkx1pbbg4_sh864_7740000gn/T/tf-test724713333/main.tf line 80:
(source code not available)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodePipeline (29.25s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise (29.39s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_Bitbucket (29.50s)
--- PASS: TestAccAWSCodeBuildProject_WindowsContainer (29.70s)
--- PASS: TestAccAWSCodeBuildProject_importBasic (29.78s)
--- PASS: TestAccAWSCodeBuildProject_SecondarySources_CodeCommit (29.88s)
--- PASS: TestAccAWSCodeBuildProject_Source_Auth (19.91s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodeCommit (36.13s)
--- PASS: TestAccAWSCodeBuildProject_Source_GitCloneDepth (36.64s)
--- PASS: TestAccAWSCodeBuildProject_Source_InsecureSSL (36.70s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHub (36.76s)
--- PASS: TestAccAWSCodeBuildProject_Tags (36.78s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSource (36.78s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHubEnterprise (36.94s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_Bitbucket (36.94s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_EncryptionDisabled (38.35s)
--- PASS: TestAccAWSCodeBuildProject_SecondaryArtifacts (38.45s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_S3 (41.82s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (45.28s)
--- PASS: TestAccAWSCodeBuildProject_BuildTimeout (28.01s)
--- PASS: TestAccAWSCodeBuildProject_Description (27.72s)
--- PASS: TestAccAWSCodeBuildProject_BadgeEnabled (29.81s)
--- PASS: TestAccAWSCodeBuildProject_basic (29.52s)
--- PASS: TestAccAWSCodeBuildProject_Environment_Certificate (31.46s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type (36.10s)
--- PASS: TestAccAWSCodeBuildProject_EncryptionKey (48.81s)
--- PASS: TestAccAWSCodeBuildProject_Cache (59.86s)
}, false), | ||
}, | ||
"location": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
}, | ||
"modes": { | ||
Type: schema.TypeList, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the API ordering of this attribute is not guaranteed when multiple modes are configured, we will likely need to change this to a TypeSet
.
"modes": { | ||
Type: schema.TypeList, | ||
Optional: true, | ||
Elem: &schema.Schema{Type: schema.TypeString}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One future enhancement that can be done here is supporting validation using the available AWS Go SDK constants:
Elem: &schema.Schema{Type: schema.TypeString}, | |
Elem: &schema.Schema{ | |
Type: schema.TypeString, | |
ValidateFunc: validation.StringInSlice([]string{ | |
codebuild.CacheModeLocalDockerLayerCache, | |
codebuild.CacheModeLocalSourceCache, | |
codebuild.CacheModeLocalCustomCache, | |
},false), | |
}, |
This has been released in version 2.12.0 of the Terraform 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! |
Community Note
Fixes #7643
Changes proposed in this pull request:
mode
tocache
inaws_codebuild_project
Output from acceptance testing: