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

provider/aws: add subscribe-to events to AWS Inspector assessment resource #13534

Closed
wants to merge 1 commit into from
Closed

provider/aws: add subscribe-to events to AWS Inspector assessment resource #13534

wants to merge 1 commit into from

Conversation

jtsaito
Copy link
Contributor

@jtsaito jtsaito commented Apr 11, 2017

Type of PR: Enhancement to a resource
Provider: AWS
Resource: Inspector assessment resource
Name of new argument: subscribe-to-events

This PR adds support for the subscribe_to_event argument to the AWS Inspector assessment resource for subscribing SNS topics to assessment run events.

Checklist

  • Acceptance test coverage of new behaviour
  • Documentation updates
  • Well-formed Code

@jtsaito jtsaito changed the title Add subscribe-to events to AWS Inspector assessment resource. provider/aws: add subscribe-to events to AWS Inspector assessment resource Apr 11, 2017
@jtsaito
Copy link
Contributor Author

jtsaito commented Apr 25, 2017

Any feedback?

@grubernaut
Copy link
Contributor

hey @jtsaito, thanks for the contribution!

Getting the following test errors, please advise:

 make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSInspectorTemplateEventSubscriptions"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/25 17:08:27 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInspectorTemplateEventSubscriptions -timeout 120m
=== RUN   TestAccAWSInspectorTemplateEventSubscriptions_basic
--- FAIL: TestAccAWSInspectorTemplateEventSubscriptions_basic (25.78s)
        testing.go:280: Step 0 error: Check failed: Check 3/6 error: aws_inspector_assessment_template.test: Attribute 'subscribe_to_event.2478710002.event' not found
=== RUN   TestAccAWSInspectorTemplateEventSubscriptions_update
--- FAIL: TestAccAWSInspectorTemplateEventSubscriptions_update (32.82s)
        testing.go:280: Step 1 error: Error applying: 1 error(s) occurred:

                * aws_inspector_assessment_template.test: 1 error(s) occurred:

                * aws_inspector_assessment_template.test: AccessDeniedException: The Inspector Account was denied access to the requested topic Grant account 758058086616 permission to publish to the topic arn:aws:sns:us-west-2:187416307283:test_sns_topic_for_inspector
                        status code: 400, request id: 86ce330b-29fb-11e7-be62-8ff7e3fedab5
FAIL
exit status 1
FAIL    github.com/hashicorp/terraform/builtin/providers/aws    58.637s
make: *** [testacc] Error 1

@jtsaito
Copy link
Contributor Author

jtsaito commented Apr 26, 2017

@grubernaut Thanks for looking into the PR! I could not immediately reproduce the error. I'll look into and come back to you hopefully on the weekend.

@grubernaut
Copy link
Contributor

@jtsaito I believe it's because of these ARN's listed here: https://github.com/hashicorp/terraform/pull/13534/files#diff-44a300239d48ea6439f4bd1a743f7381R113
Would need to make these non-account specific I believe.

And this error:

Attribute 'subscribe_to_event.2478710002.event' not found

is from the subscribe_to_event hash which will be a different hash string based on the parameters used to create the individual Set. One way around this is to write a separate Check function that iterates that set to verify items are correctly populated.

@fedecz
Copy link

fedecz commented Mar 5, 2020

I submitted PR hashicorp/terraform-provider-aws#12261 to address this issue. I'd appreciate if you thumb'd it up for visibility. Thanks 👍

@ghost
Copy link

ghost commented Mar 6, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants