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

Codebuild artifacts packaging changes is not applied #2050

Closed
bernard-sh opened this issue Oct 25, 2017 · 4 comments · Fixed by #9559
Closed

Codebuild artifacts packaging changes is not applied #2050

bernard-sh opened this issue Oct 25, 2017 · 4 comments · Fixed by #9559
Labels
bug Addresses a defect in current functionality. service/codebuild Issues and PRs that pertain to the codebuild service.
Milestone

Comments

@bernard-sh
Copy link

bernard-sh commented Oct 25, 2017

Hi
I am creating aws codebuild project with artifact packaging type "NONE", however i want to change this artifact packaging type to "ZIP" but when i change the packaging type to "ZIP", i run terraform plan and there is no changes detected, run terraform apply doesn't make a changes to the codebuild project.

Terraform Version

v0.10.4

Affected Resource(s)

  • AWS CodeBuild

Terraform Configuration Files

here is my first terraform configuration

resource "aws_codebuild_project" "packaging_test" {
  name         = "packaging_test"
  service_role = "code_build_run"

  "source" {
    type      = "CODECOMMIT"
    location  = "${var.codecommit_url}"
    buildspec = "buildspec_build.yml"
  }

  "environment" {
    compute_type = "BUILD_GENERAL1_SMALL"
    image        = "aws/codebuild/ubuntu-base:14.04"
    type         = "LINUX_CONTAINER"
  }

  "artifacts" {
    type      = "S3"
    location  = "${var.s3_bucket_path}"
    name      = "packaging_test"
    packaging = "NONE"
  }
}

then change the artifacts section to

...
  "artifacts" {
    type      = "S3"
    location  = "${var.s3_bucket_path}"
    name      = "packaging_test"
    packaging = "ZIP"
  }
...

Expected Behavior

  • Codebuild artifact packaging type should be change from NONE become ZIP on AWS

Actual Behavior

  • terraform does not detect any change and does nothing
@paddycarver paddycarver added the bug Addresses a defect in current functionality. label Nov 21, 2017
@barryoneill
Copy link

I'm also seeing changes in the buildspec file not being picked up (e.g. if I change one of the pre_build commands), so the apply sees nothing to do. Could be related? (Terraform v0.11.1)

@radeksimko radeksimko added the service/codebuild Issues and PRs that pertain to the codebuild service. label Jan 28, 2018
bflad added a commit that referenced this issue Jul 31, 2019
…List and verify updates

Reference: #755
Reference: #2050
Reference: #6214
Reference: #6427
Reference: #7582

Output from acceptance testing:

```
--- PASS: TestAccAWSCodeBuildProject_Artifacts_EncryptionDisabled (58.62s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_NamespaceType (52.17s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_OverrideArtifactName (51.88s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_Packaging (51.20s)
--- PASS: TestAccAWSCodeBuildProject_Artifacts_Path (52.22s)
--- PASS: TestAccAWSCodeBuildProject_BadgeEnabled (33.85s)
--- PASS: TestAccAWSCodeBuildProject_basic (24.98s)
--- PASS: TestAccAWSCodeBuildProject_BuildTimeout (42.62s)
--- PASS: TestAccAWSCodeBuildProject_Cache (70.42s)
--- PASS: TestAccAWSCodeBuildProject_Description (42.32s)
--- PASS: TestAccAWSCodeBuildProject_EncryptionKey (52.39s)
--- PASS: TestAccAWSCodeBuildProject_Environment_Certificate (36.50s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable (55.37s)
--- PASS: TestAccAWSCodeBuildProject_Environment_EnvironmentVariable_Type (30.64s)
--- PASS: TestAccAWSCodeBuildProject_Environment_RegistryCredential (40.62s)
--- PASS: TestAccAWSCodeBuildProject_importBasic (34.69s)
--- PASS: TestAccAWSCodeBuildProject_LogsConfig_CloudWatchLogs (48.53s)
--- PASS: TestAccAWSCodeBuildProject_LogsConfig_S3Logs (72.76s)
--- PASS: TestAccAWSCodeBuildProject_SecondaryArtifacts (37.23s)
--- PASS: TestAccAWSCodeBuildProject_SecondarySources_CodeCommit (29.35s)
--- PASS: TestAccAWSCodeBuildProject_Source_Auth (30.83s)
--- PASS: TestAccAWSCodeBuildProject_Source_GitCloneDepth (40.18s)
--- PASS: TestAccAWSCodeBuildProject_Source_InsecureSSL (31.11s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_Bitbucket (42.65s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHub (34.28s)
--- PASS: TestAccAWSCodeBuildProject_Source_ReportBuildStatus_GitHubEnterprise (43.13s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_Bitbucket (33.90s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodeCommit (34.04s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_CodePipeline (29.80s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_GitHubEnterprise (29.93s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSource (33.38s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_NoSourceInvalid (12.23s)
--- PASS: TestAccAWSCodeBuildProject_Source_Type_S3 (36.44s)
--- PASS: TestAccAWSCodeBuildProject_Tags (43.37s)
--- PASS: TestAccAWSCodeBuildProject_VpcConfig (62.05s)
--- PASS: TestAccAWSCodeBuildProject_WindowsContainer (23.75s)
```
@bflad bflad added this to the v2.22.0 milestone Jul 31, 2019
@bflad
Copy link
Contributor

bflad commented Jul 31, 2019

The fixes for having the aws_codebuild_project resource artifacts configuration block perform better drift detection and updates have been merged and will release with version 2.22.0 of the Terraform AWS Provider, tomorrow. 👍

@ghost
Copy link

ghost commented Aug 1, 2019

This has been released in version 2.22.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 for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

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 Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/codebuild Issues and PRs that pertain to the codebuild service.
Projects
None yet
5 participants