-
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
[WIP] Add import functionality to CodeBuild Project #4976
Conversation
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.
Awesome @ryof! This should make a lot of people happy. Can you check out my feedback below and let me know if you have any questions?
@@ -23,6 +23,9 @@ func resourceAwsCodeBuildProject() *schema.Resource { | |||
Read: resourceAwsCodeBuildProjectRead, | |||
Update: resourceAwsCodeBuildProjectUpdate, | |||
Delete: resourceAwsCodeBuildProjectDelete, | |||
Importer: &schema.ResourceImporter{ |
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.
Can you please document the new import support at the bottom of website/docs/r/codebuild_project.html.markdown
? Feel free to copy-paste an existing ## Import
section from another resource and adjust appropriately.
ResourceName: resourceName, | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
ImportStateVerifyIgnore: []string{ |
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.
I'm guessing this was copy-paste from another resource's testing? 😄 The attributes force_destroy
and acl
do not exist for this resource, so the whole ImportStateVerifyIgnore
bit can be removed.
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.
Oh, I'm sorry. This is my first code-reading terraform, so I referenced s3 bucket or something...
There is no acl for code build indeed, I'm embarrassed. 😓
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.
Looks good to me! 🚀
=== RUN TestAccAWSCodeBuildProject_basic
--- PASS: TestAccAWSCodeBuildProject_basic (22.82s)
=== RUN TestAccAWSCodeBuildProject_BadgeEnabled
--- PASS: TestAccAWSCodeBuildProject_BadgeEnabled (30.52s)
=== RUN TestAccAWSCodeBuildProject_BuildTimeout
--- PASS: TestAccAWSCodeBuildProject_BuildTimeout (30.79s)
=== RUN TestAccAWSCodeBuildProject_Cache
--- PASS: TestAccAWSCodeBuildProject_Cache (67.92s)
=== RUN TestAccAWSCodeBuildProject_Description
--- PASS: TestAccAWSCodeBuildProject_Description (37.87s)
=== RUN TestAccAWSCodeBuildProject_EncryptionKey
--- PASS: TestAccAWSCodeBuildProject_EncryptionKey (50.14s)
=== RUN TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type (39.68s)
=== RUN TestAccAWSCodeBuildProject_Source_Auth
--- PASS: TestAccAWSCodeBuildProject_Source_Auth (30.38s)
=== RUN TestAccAWSCodeBuildProject_Source_GitCloneDepth
--- PASS: TestAccAWSCodeBuildProject_Source_GitCloneDepth (29.30s)
=== RUN TestAccAWSCodeBuildProject_Source_InsecureSSL
--- PASS: TestAccAWSCodeBuildProject_Source_InsecureSSL (38.32s)
=== RUN TestAccAWSCodeBuildProject_Tags
--- PASS: TestAccAWSCodeBuildProject_Tags (29.65s)
=== RUN TestAccAWSCodeBuildProject_VpcConfig
--- PASS: TestAccAWSCodeBuildProject_VpcConfig (55.43s)
=== RUN TestAccAWSCodeBuildProject_WindowsContainer
--- PASS: TestAccAWSCodeBuildProject_WindowsContainer (30.66s)
=== RUN TestAccAWSCodeBuildProject_importBasic
--- PASS: TestAccAWSCodeBuildProject_importBasic (23.29s)
This has been released in version 1.25.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! |
Though I couldn't find any issue about this, I made this PR because I'm using CodeBuild frequently.
I'm not familliar with Golang very well, so please point out if something is wrong.
Changes proposed in this pull request:
Output from acceptance testing: