Skip to content

Instantly share code, notes, and snippets.

@jtsaito
Last active February 20, 2017 15:34
Show Gist options
  • Save jtsaito/0b880647f6a53a37a7d5f7748e88c96d to your computer and use it in GitHub Desktop.
Save jtsaito/0b880647f6a53a37a7d5f7748e88c96d to your computer and use it in GitHub Desktop.
Error output: Terraform AWS Inspector Assessment Target bug

On terraform planning to update the (we removed some json content and marked it <REMOVED>:

Path: terraform.tfplan
~ aws_opsworks_rails_app_layer.bookshelf-app
    custom_json: "<REMOVED>"

~ aws_inspector_assessment_target.inspector
    resource_group_arn: "arn:aws:inspector:eu-west-1:390571511014:resourcegroup/0-PQ6fNHHt" => "${aws_inspector_resource_group.inspector.arn}"

-/+ aws_inspector_resource_group.inspector
    arn:                     "arn:aws:inspector:eu-west-1:390571511014:resourcegroup/0-PQ6fNHHt" => "<computed>"
    tags.%:                  "2" => "1" (forces new resource)
    tags.babbel:environment: "other" => "" (forces new resource)
    tags.foo:                "" => "bookshelf-other" (forces new resource)
    tags.babbel:service:     "bookshelf" => "" (forces new resource)

On apply:

To apply the plan to your infrastructure reply with 'yes': yes
terraform apply terraform.tfplan
aws_opsworks_rails_app_layer.bookshelf-app: Modifying...
  custom_json: "{ <REMOVED> }"
aws_inspector_resource_group.inspector: Destroying...
aws_inspector_resource_group.inspector: Destruction complete
aws_inspector_resource_group.inspector: Creating...
  arn:              "" => "<computed>"
  tags.%:           "" => "1"
  tags.babbel:name: "" => "bookshelf-other"
aws_opsworks_rails_app_layer.bookshelf-app: Modifications complete
aws_inspector_resource_group.inspector: Creation complete
aws_inspector_assessment_target.inspector: Modifying...
  resource_group_arn: "arn:aws:inspector:eu-west-1:390571511014:resourcegroup/0-PQ6fNHHt" => "arn:aws:inspector:eu-west-1:390571511014:resourcegroup/0-aK8l1LHt"
Error applying plan:

1 error(s) occurred:

* aws_inspector_assessment_target.inspector: InvalidParameter: 1 validation error(s) found.
- missing required field, UpdateAssessmentTargetInput.ResourceGroupArn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment