-
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
fix(codebuild): return error on delete only when is not nil #29042
fix(codebuild): return error on delete only when is not nil #29042
Conversation
Signed-off-by: Federico Barcelona <[email protected]>
Community NoteVoting for Prioritization
For Submitters
|
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
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.
LGTM 🎉
$ make testacc PKG=codebuild TESTS=TestAccCodeBuildProject_
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/codebuild/... -v -count 1 -parallel 20 -run='TestAccCodeBuildProject_' -timeout 180m
=== RUN TestAccCodeBuildProject_basic
=== PAUSE TestAccCodeBuildProject_basic
=== RUN TestAccCodeBuildProject_publicVisibility
=== PAUSE TestAccCodeBuildProject_publicVisibility
=== RUN TestAccCodeBuildProject_badgeEnabled
=== PAUSE TestAccCodeBuildProject_badgeEnabled
=== RUN TestAccCodeBuildProject_buildTimeout
=== PAUSE TestAccCodeBuildProject_buildTimeout
=== RUN TestAccCodeBuildProject_queuedTimeout
=== PAUSE TestAccCodeBuildProject_queuedTimeout
=== RUN TestAccCodeBuildProject_cache
=== PAUSE TestAccCodeBuildProject_cache
=== RUN TestAccCodeBuildProject_description
=== PAUSE TestAccCodeBuildProject_description
=== RUN TestAccCodeBuildProject_fileSystemLocations
=== PAUSE TestAccCodeBuildProject_fileSystemLocations
=== RUN TestAccCodeBuildProject_sourceVersion
=== PAUSE TestAccCodeBuildProject_sourceVersion
=== RUN TestAccCodeBuildProject_encryptionKey
=== PAUSE TestAccCodeBuildProject_encryptionKey
=== RUN TestAccCodeBuildProject_Environment_environmentVariable
=== PAUSE TestAccCodeBuildProject_Environment_environmentVariable
=== RUN TestAccCodeBuildProject_EnvironmentEnvironmentVariable_type
=== PAUSE TestAccCodeBuildProject_EnvironmentEnvironmentVariable_type
=== RUN TestAccCodeBuildProject_EnvironmentEnvironmentVariable_value
=== PAUSE TestAccCodeBuildProject_EnvironmentEnvironmentVariable_value
=== RUN TestAccCodeBuildProject_Environment_certificate
=== PAUSE TestAccCodeBuildProject_Environment_certificate
=== RUN TestAccCodeBuildProject_Logs_cloudWatchLogs
=== PAUSE TestAccCodeBuildProject_Logs_cloudWatchLogs
=== RUN TestAccCodeBuildProject_Logs_s3Logs
=== PAUSE TestAccCodeBuildProject_Logs_s3Logs
=== RUN TestAccCodeBuildProject_buildBatch
=== PAUSE TestAccCodeBuildProject_buildBatch
=== RUN TestAccCodeBuildProject_Source_gitCloneDepth
=== PAUSE TestAccCodeBuildProject_Source_gitCloneDepth
=== RUN TestAccCodeBuildProject_SourceGitSubmodules_codeCommit
=== PAUSE TestAccCodeBuildProject_SourceGitSubmodules_codeCommit
=== RUN TestAccCodeBuildProject_SourceGitSubmodules_gitHub
=== PAUSE TestAccCodeBuildProject_SourceGitSubmodules_gitHub
=== RUN TestAccCodeBuildProject_SourceGitSubmodules_gitHubEnterprise
=== PAUSE TestAccCodeBuildProject_SourceGitSubmodules_gitHubEnterprise
=== RUN TestAccCodeBuildProject_SecondarySourcesGitSubmodules_codeCommit
=== PAUSE TestAccCodeBuildProject_SecondarySourcesGitSubmodules_codeCommit
=== RUN TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHub
=== PAUSE TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHub
=== RUN TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHubEnterprise
=== PAUSE TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHubEnterprise
=== RUN TestAccCodeBuildProject_SecondarySourcesVersions
=== PAUSE TestAccCodeBuildProject_SecondarySourcesVersions
=== RUN TestAccCodeBuildProject_SourceBuildStatus_gitHubEnterprise
=== PAUSE TestAccCodeBuildProject_SourceBuildStatus_gitHubEnterprise
=== RUN TestAccCodeBuildProject_Source_insecureSSL
=== PAUSE TestAccCodeBuildProject_Source_insecureSSL
=== RUN TestAccCodeBuildProject_SourceReportBuildStatus_bitbucket
=== PAUSE TestAccCodeBuildProject_SourceReportBuildStatus_bitbucket
=== RUN TestAccCodeBuildProject_SourceReportBuildStatus_gitHub
=== PAUSE TestAccCodeBuildProject_SourceReportBuildStatus_gitHub
=== RUN TestAccCodeBuildProject_SourceReportBuildStatus_gitHubEnterprise
=== PAUSE TestAccCodeBuildProject_SourceReportBuildStatus_gitHubEnterprise
=== RUN TestAccCodeBuildProject_SourceType_bitbucket
=== PAUSE TestAccCodeBuildProject_SourceType_bitbucket
=== RUN TestAccCodeBuildProject_SourceType_codeCommit
=== PAUSE TestAccCodeBuildProject_SourceType_codeCommit
=== RUN TestAccCodeBuildProject_SourceType_codePipeline
=== PAUSE TestAccCodeBuildProject_SourceType_codePipeline
=== RUN TestAccCodeBuildProject_SourceType_gitHubEnterprise
=== PAUSE TestAccCodeBuildProject_SourceType_gitHubEnterprise
=== RUN TestAccCodeBuildProject_SourceType_s3
=== PAUSE TestAccCodeBuildProject_SourceType_s3
=== RUN TestAccCodeBuildProject_SourceType_noSource
=== PAUSE TestAccCodeBuildProject_SourceType_noSource
=== RUN TestAccCodeBuildProject_SourceType_noSourceInvalid
=== PAUSE TestAccCodeBuildProject_SourceType_noSourceInvalid
=== RUN TestAccCodeBuildProject_tags
=== PAUSE TestAccCodeBuildProject_tags
=== RUN TestAccCodeBuildProject_vpc
=== PAUSE TestAccCodeBuildProject_vpc
=== RUN TestAccCodeBuildProject_windowsServer2019Container
=== PAUSE TestAccCodeBuildProject_windowsServer2019Container
=== RUN TestAccCodeBuildProject_armContainer
=== PAUSE TestAccCodeBuildProject_armContainer
=== RUN TestAccCodeBuildProject_Artifacts_artifactIdentifier
=== PAUSE TestAccCodeBuildProject_Artifacts_artifactIdentifier
=== RUN TestAccCodeBuildProject_Artifacts_encryptionDisabled
=== PAUSE TestAccCodeBuildProject_Artifacts_encryptionDisabled
=== RUN TestAccCodeBuildProject_Artifacts_location
=== PAUSE TestAccCodeBuildProject_Artifacts_location
=== RUN TestAccCodeBuildProject_Artifacts_name
=== PAUSE TestAccCodeBuildProject_Artifacts_name
=== RUN TestAccCodeBuildProject_Artifacts_namespaceType
=== PAUSE TestAccCodeBuildProject_Artifacts_namespaceType
=== RUN TestAccCodeBuildProject_Artifacts_overrideArtifactName
=== PAUSE TestAccCodeBuildProject_Artifacts_overrideArtifactName
=== RUN TestAccCodeBuildProject_Artifacts_packaging
=== PAUSE TestAccCodeBuildProject_Artifacts_packaging
=== RUN TestAccCodeBuildProject_Artifacts_path
=== PAUSE TestAccCodeBuildProject_Artifacts_path
=== RUN TestAccCodeBuildProject_Artifacts_type
=== PAUSE TestAccCodeBuildProject_Artifacts_type
=== RUN TestAccCodeBuildProject_Artifacts_bucketOwnerAccess
=== PAUSE TestAccCodeBuildProject_Artifacts_bucketOwnerAccess
=== RUN TestAccCodeBuildProject_secondaryArtifacts
=== PAUSE TestAccCodeBuildProject_secondaryArtifacts
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_artifactIdentifier
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_artifactIdentifier
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_overrideArtifactName
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_overrideArtifactName
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_encryptionDisabled
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_encryptionDisabled
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_location
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_location
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_name
acctest.go:74: Currently no solution to allow updates on name attribute
--- SKIP: TestAccCodeBuildProject_SecondaryArtifacts_name (0.00s)
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_namespaceType
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_namespaceType
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_packaging
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_packaging
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_path
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_path
=== RUN TestAccCodeBuildProject_SecondaryArtifacts_type
=== PAUSE TestAccCodeBuildProject_SecondaryArtifacts_type
=== RUN TestAccCodeBuildProject_SecondarySources_codeCommit
=== PAUSE TestAccCodeBuildProject_SecondarySources_codeCommit
=== RUN TestAccCodeBuildProject_concurrentBuildLimit
=== PAUSE TestAccCodeBuildProject_concurrentBuildLimit
=== RUN TestAccCodeBuildProject_Environment_registryCredential
=== PAUSE TestAccCodeBuildProject_Environment_registryCredential
=== RUN TestAccCodeBuildProject_disappears
=== PAUSE TestAccCodeBuildProject_disappears
=== CONT TestAccCodeBuildProject_basic
=== CONT TestAccCodeBuildProject_SourceType_codePipeline
=== CONT TestAccCodeBuildProject_buildBatch
=== CONT TestAccCodeBuildProject_SecondarySourcesVersions
=== CONT TestAccCodeBuildProject_Artifacts_path
=== CONT TestAccCodeBuildProject_SourceReportBuildStatus_gitHub
=== CONT TestAccCodeBuildProject_Source_insecureSSL
=== CONT TestAccCodeBuildProject_SourceBuildStatus_gitHubEnterprise
=== CONT TestAccCodeBuildProject_SourceGitSubmodules_gitHubEnterprise
=== CONT TestAccCodeBuildProject_SourceReportBuildStatus_bitbucket
=== CONT TestAccCodeBuildProject_Artifacts_overrideArtifactName
=== CONT TestAccCodeBuildProject_Source_gitCloneDepth
=== CONT TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHub
=== CONT TestAccCodeBuildProject_SecondarySourcesGitSubmodules_codeCommit
=== CONT TestAccCodeBuildProject_SourceGitSubmodules_codeCommit
=== CONT TestAccCodeBuildProject_SourceGitSubmodules_gitHub
=== CONT TestAccCodeBuildProject_armContainer
=== CONT TestAccCodeBuildProject_Artifacts_packaging
=== CONT TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHubEnterprise
=== CONT TestAccCodeBuildProject_Artifacts_location
--- PASS: TestAccCodeBuildProject_basic (42.35s)
=== CONT TestAccCodeBuildProject_sourceVersion
--- PASS: TestAccCodeBuildProject_SourceType_codePipeline (88.04s)
=== CONT TestAccCodeBuildProject_Logs_s3Logs
--- PASS: TestAccCodeBuildProject_armContainer (107.27s)
=== CONT TestAccCodeBuildProject_Logs_cloudWatchLogs
--- PASS: TestAccCodeBuildProject_Source_insecureSSL (114.34s)
=== CONT TestAccCodeBuildProject_Environment_certificate
--- PASS: TestAccCodeBuildProject_SourceBuildStatus_gitHubEnterprise (118.56s)
=== CONT TestAccCodeBuildProject_EnvironmentEnvironmentVariable_value
--- PASS: TestAccCodeBuildProject_SourceGitSubmodules_codeCommit (119.33s)
=== CONT TestAccCodeBuildProject_EnvironmentEnvironmentVariable_type
--- PASS: TestAccCodeBuildProject_sourceVersion (89.80s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_namespaceType
--- PASS: TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHubEnterprise (132.45s)
=== CONT TestAccCodeBuildProject_Environment_environmentVariable
--- PASS: TestAccCodeBuildProject_SourceGitSubmodules_gitHub (132.52s)
=== CONT TestAccCodeBuildProject_disappears
--- PASS: TestAccCodeBuildProject_Source_gitCloneDepth (135.98s)
=== CONT TestAccCodeBuildProject_Environment_registryCredential
--- PASS: TestAccCodeBuildProject_Artifacts_overrideArtifactName (136.10s)
=== CONT TestAccCodeBuildProject_concurrentBuildLimit
--- PASS: TestAccCodeBuildProject_Artifacts_path (138.43s)
=== CONT TestAccCodeBuildProject_SecondarySources_codeCommit
--- PASS: TestAccCodeBuildProject_SourceGitSubmodules_gitHubEnterprise (142.00s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_type
--- PASS: TestAccCodeBuildProject_SourceReportBuildStatus_bitbucket (142.02s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_path
--- PASS: TestAccCodeBuildProject_Artifacts_packaging (142.40s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_packaging
--- PASS: TestAccCodeBuildProject_buildBatch (142.72s)
=== CONT TestAccCodeBuildProject_Artifacts_name
--- PASS: TestAccCodeBuildProject_SourceReportBuildStatus_gitHub (152.70s)
=== CONT TestAccCodeBuildProject_SourceType_bitbucket
--- PASS: TestAccCodeBuildProject_Artifacts_location (153.65s)
=== CONT TestAccCodeBuildProject_SourceType_codeCommit
--- PASS: TestAccCodeBuildProject_SecondarySourcesGitSubmodules_gitHub (161.11s)
=== CONT TestAccCodeBuildProject_SourceType_noSourceInvalid
--- PASS: TestAccCodeBuildProject_SecondarySourcesGitSubmodules_codeCommit (161.21s)
=== CONT TestAccCodeBuildProject_Artifacts_encryptionDisabled
--- PASS: TestAccCodeBuildProject_disappears (52.78s)
=== CONT TestAccCodeBuildProject_vpc
--- PASS: TestAccCodeBuildProject_Environment_certificate (71.11s)
=== CONT TestAccCodeBuildProject_Artifacts_artifactIdentifier
--- PASS: TestAccCodeBuildProject_SecondarySourcesVersions (192.75s)
=== CONT TestAccCodeBuildProject_tags
--- PASS: TestAccCodeBuildProject_SourceType_noSourceInvalid (40.42s)
=== CONT TestAccCodeBuildProject_SourceType_s3
--- PASS: TestAccCodeBuildProject_SecondarySources_codeCommit (64.09s)
=== CONT TestAccCodeBuildProject_queuedTimeout
=== CONT TestAccCodeBuildProject_SourceType_noSource
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_type (65.95s)
--- PASS: TestAccCodeBuildProject_SourceType_codeCommit (65.80s)
=== CONT TestAccCodeBuildProject_description
--- PASS: TestAccCodeBuildProject_SourceType_bitbucket (75.54s)
=== CONT TestAccCodeBuildProject_SourceType_gitHubEnterprise
--- PASS: TestAccCodeBuildProject_Environment_registryCredential (106.06s)
=== CONT TestAccCodeBuildProject_fileSystemLocations
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_namespaceType (114.44s)
=== CONT TestAccCodeBuildProject_badgeEnabled
--- PASS: TestAccCodeBuildProject_concurrentBuildLimit (111.41s)
=== CONT TestAccCodeBuildProject_cache
--- PASS: TestAccCodeBuildProject_Artifacts_name (105.93s)
=== CONT TestAccCodeBuildProject_buildTimeout
--- PASS: TestAccCodeBuildProject_Logs_cloudWatchLogs (142.16s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_artifactIdentifier
--- PASS: TestAccCodeBuildProject_Logs_s3Logs (163.16s)
=== CONT TestAccCodeBuildProject_SourceReportBuildStatus_gitHubEnterprise
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_path (110.90s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_location
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_packaging (113.99s)
=== CONT TestAccCodeBuildProject_Artifacts_bucketOwnerAccess
--- PASS: TestAccCodeBuildProject_EnvironmentEnvironmentVariable_type (138.54s)
=== CONT TestAccCodeBuildProject_publicVisibility
--- PASS: TestAccCodeBuildProject_Artifacts_encryptionDisabled (108.41s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_encryptionDisabled
--- PASS: TestAccCodeBuildProject_SourceType_s3 (70.07s)
=== CONT TestAccCodeBuildProject_secondaryArtifacts
--- PASS: TestAccCodeBuildProject_SourceType_noSource (65.25s)
=== CONT TestAccCodeBuildProject_SecondaryArtifacts_overrideArtifactName
--- PASS: TestAccCodeBuildProject_EnvironmentEnvironmentVariable_value (157.12s)
=== CONT TestAccCodeBuildProject_encryptionKey
--- PASS: TestAccCodeBuildProject_SourceType_gitHubEnterprise (49.86s)
=== CONT TestAccCodeBuildProject_Artifacts_namespaceType
--- PASS: TestAccCodeBuildProject_tags (85.42s)
=== CONT TestAccCodeBuildProject_windowsServer2019Container
--- PASS: TestAccCodeBuildProject_Environment_environmentVariable (146.54s)
=== CONT TestAccCodeBuildProject_Artifacts_type
--- PASS: TestAccCodeBuildProject_Artifacts_artifactIdentifier (97.20s)
--- PASS: TestAccCodeBuildProject_queuedTimeout (82.94s)
--- PASS: TestAccCodeBuildProject_badgeEnabled (42.78s)
--- PASS: TestAccCodeBuildProject_description (83.45s)
--- PASS: TestAccCodeBuildProject_vpc (118.94s)
--- PASS: TestAccCodeBuildProject_windowsServer2019Container (28.54s)
--- PASS: TestAccCodeBuildProject_SourceReportBuildStatus_gitHubEnterprise (59.30s)
--- PASS: TestAccCodeBuildProject_encryptionKey (45.94s)
--- PASS: TestAccCodeBuildProject_Artifacts_namespaceType (45.52s)
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_encryptionDisabled (59.84s)
--- PASS: TestAccCodeBuildProject_buildTimeout (84.02s)
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_location (80.20s)
--- PASS: TestAccCodeBuildProject_secondaryArtifacts (63.13s)
--- PASS: TestAccCodeBuildProject_publicVisibility (77.60s)
--- PASS: TestAccCodeBuildProject_Artifacts_bucketOwnerAccess (83.85s)
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_overrideArtifactName (74.34s)
--- PASS: TestAccCodeBuildProject_SecondaryArtifacts_artifactIdentifier (105.41s)
--- PASS: TestAccCodeBuildProject_cache (137.35s)
--- PASS: TestAccCodeBuildProject_Artifacts_type (140.76s)
--- PASS: TestAccCodeBuildProject_fileSystemLocations (239.94s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/codebuild 485.047s
Thank you for your contribution, @tembleking! |
This functionality has been released in v4.55.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! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
When deleting the codebuild resource, even for successful deletes, this was returning the following error:
Error: deleting CodeBuild project (arn:aws:codebuild:****:*******:project/single-app-codebuild-BuildProject): %!w(<nil>)
References
Detected when running our tests in https://github.com/sysdiglabs/terraform-aws-secure-for-cloud/actions/runs/3985386609/jobs/6834653903#step:5:2732