Skip to content

Instantly share code, notes, and snippets.

@Jamie-BitFlight
Created April 11, 2018 22:51
Show Gist options
  • Save Jamie-BitFlight/5367c91fe7b716a3a8c595d3029cff9e to your computer and use it in GitHub Desktop.
Save Jamie-BitFlight/5367c91fe7b716a3a8c595d3029cff9e to your computer and use it in GitHub Desktop.
Terraform codebuild error output - Sensitive data swapped out
* module.staging-codepipeline.aws_codebuild_project.project: aws_codebuild_project.project: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.
Please include the following information in your report:
Terraform Version: 0.11.7
Resource ID: aws_codebuild_project.project
Mismatch reason: attribute mismatch: source.456871274.auth.#
Diff One (usually from plan): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff{"source.~1681127761.location":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.~1681127761.type":*terraform.ResourceAttrDiff{Old:"", New:"CODEPIPELINE", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.~1681127761.auth.#":*terraform.ResourceAttrDiff{Old:"0", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.~1681127761.buildspec":*terraform.ResourceAttrDiff{Old:"", New:"${data.template_file.build.rendered}", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.456871274.auth.#":*terraform.ResourceAttrDiff{Old:"0", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.456871274.buildspec":*terraform.ResourceAttrDiff{Old:"version: 0.2\n\nphases:\n pre_build:\n commands:\n - echo Logging in to Amazon ECR...\n - aws --version\n - eval $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\n - REPOSITORY_URI=00000000000000.dkr.ecr.us-east-1.amazonaws.com/example_container\n - GITHUB_TOKEN=d5eb8888888888888888888888888\n - IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)\n - git config --global credential.helper store\n - printf \"https://$GITHUB_TOKEN:x-oauth-basic@github.com\\n\" >> /root/.git-credentials\n - git config --global user.email \"builder@example.com\"\n - git config --global user.name \"AWS CICD\"\n build:\n commands:\n - echo Build started on `date`\n - echo Building the Docker image...\n# - git init \n# - git submodule update --recursive --remote \n - git clone https://github.com/ABCteam/Example-Service.git\n - docker pull $IMAGE_REPO_NAME:latest || true \n - docker build --build-arg POSTGRES_USERNAME=dbadmin --build-arg POSTGRES_HOST=db.cluster.lan --build-arg POSTGRES_PASSWORD=password --build-arg POSTGRES_DB=dbname --cache-from $CONTAINER_REPOSITORY_URL:latest -t $IMAGE_REPO_NAME:latest .\n - docker tag $IMAGE_REPO_NAME:latest $IMAGE_REPO_NAME:$IMAGE_TAG\n post_build:\n commands:\n - echo Build completed on `date`\n - echo Pushing the Docker images...\n - docker push $IMAGE_REPO_NAME:latest\n - docker push $IMAGE_REPO_NAME:$IMAGE_TAG\n - echo Writing image definitions file...\n - printf '[{\"name\":\"staging-service\",\"imageUri\":\"%s\"}]' $IMAGE_REPO_NAME:$IMAGE_TAG > imagedefinitions.json\nartifacts:\n files: imagedefinitions.json", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.456871274.location":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}, "source.456871274.type":*terraform.ResourceAttrDiff{Old:"CODEPIPELINE", New:"", NewComputed:false, NewRemoved:true, NewExtra:interface {}(nil), RequiresNew:false, Sensitive:false, Type:0x0}}, Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
Diff Two (usually from apply): *terraform.InstanceDiff{mu:sync.Mutex{state:0, sema:0x0}, Attributes:map[string]*terraform.ResourceAttrDiff(nil), Destroy:false, DestroyDeposed:false, DestroyTainted:false, Meta:map[string]interface {}(nil)}
Also include as much context as you can about your config, state, and the steps you performed to trigger this error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment