-
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
Check target blocks are not nil #19946
Check target blocks are not nil #19946
Conversation
If nothing is specified for these blocks then they cannot be cast to `map[string]interface`. reproduction: https://github.com/packrat386/tf_sqs_issue_repro
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.
Welcome @packrat386 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
The config I used to reproduce the error (linked in the issue) successfully applies with this version of the provider. I can add an acceptance test for this if we want, but it seems like a very narrow case (that probably nobody should be doing anyway) so I'll hold off unless y'all think it's worth it. |
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 TEST=./aws TESTARGS='-run=TestAccAWSCloudWatchEventTarget_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSCloudWatchEventTarget_ -timeout 180m
=== RUN TestAccAWSCloudWatchEventTarget_basic
=== PAUSE TestAccAWSCloudWatchEventTarget_basic
=== RUN TestAccAWSCloudWatchEventTarget_EventBusName
=== PAUSE TestAccAWSCloudWatchEventTarget_EventBusName
=== RUN TestAccAWSCloudWatchEventTarget_GeneratedTargetId
=== PAUSE TestAccAWSCloudWatchEventTarget_GeneratedTargetId
=== RUN TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
=== PAUSE TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
=== RUN TestAccAWSCloudWatchEventTarget_full
=== PAUSE TestAccAWSCloudWatchEventTarget_full
=== RUN TestAccAWSCloudWatchEventTarget_disappears
=== PAUSE TestAccAWSCloudWatchEventTarget_disappears
=== RUN TestAccAWSCloudWatchEventTarget_ssmDocument
=== PAUSE TestAccAWSCloudWatchEventTarget_ssmDocument
=== RUN TestAccAWSCloudWatchEventTarget_http
=== PAUSE TestAccAWSCloudWatchEventTarget_http
=== RUN TestAccAWSCloudWatchEventTarget_ecs
=== PAUSE TestAccAWSCloudWatchEventTarget_ecs
=== RUN TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
=== PAUSE TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
=== RUN TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
=== PAUSE TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
=== RUN TestAccAWSCloudWatchEventTarget_batch
=== PAUSE TestAccAWSCloudWatchEventTarget_batch
=== RUN TestAccAWSCloudWatchEventTarget_kinesis
=== PAUSE TestAccAWSCloudWatchEventTarget_kinesis
=== RUN TestAccAWSCloudWatchEventTarget_sqs
=== PAUSE TestAccAWSCloudWatchEventTarget_sqs
=== RUN TestAccAWSCloudWatchEventTarget_input_transformer
=== PAUSE TestAccAWSCloudWatchEventTarget_input_transformer
=== RUN TestAccAWSCloudWatchEventTarget_inputTransformerJsonString
=== PAUSE TestAccAWSCloudWatchEventTarget_inputTransformerJsonString
=== RUN TestAccAWSCloudWatchEventTarget_PartnerEventBus
resource_aws_cloudwatch_event_target_test.go:714: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccAWSCloudWatchEventTarget_PartnerEventBus (0.00s)
=== CONT TestAccAWSCloudWatchEventTarget_basic
=== CONT TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
=== CONT TestAccAWSCloudWatchEventTarget_sqs
=== CONT TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
=== CONT TestAccAWSCloudWatchEventTarget_kinesis
=== CONT TestAccAWSCloudWatchEventTarget_batch
=== CONT TestAccAWSCloudWatchEventTarget_disappears
=== CONT TestAccAWSCloudWatchEventTarget_ecs
=== CONT TestAccAWSCloudWatchEventTarget_http
=== CONT TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
=== CONT TestAccAWSCloudWatchEventTarget_ssmDocument
=== CONT TestAccAWSCloudWatchEventTarget_full
=== CONT TestAccAWSCloudWatchEventTarget_GeneratedTargetId
=== CONT TestAccAWSCloudWatchEventTarget_EventBusName
=== CONT TestAccAWSCloudWatchEventTarget_inputTransformerJsonString
=== CONT TestAccAWSCloudWatchEventTarget_input_transformer
--- PASS: TestAccAWSCloudWatchEventTarget_disappears (20.25s)
--- PASS: TestAccAWSCloudWatchEventTarget_GeneratedTargetId (21.44s)
--- PASS: TestAccAWSCloudWatchEventTarget_sqs (24.59s)
--- PASS: TestAccAWSCloudWatchEventTarget_ssmDocument (24.68s)
--- PASS: TestAccAWSCloudWatchEventTarget_http (30.28s)
--- PASS: TestAccAWSCloudWatchEventTarget_inputTransformerJsonString (37.57s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecs (38.21s)
--- PASS: TestAccAWSCloudWatchEventTarget_EventBusName (39.76s)
--- PASS: TestAccAWSCloudWatchEventTarget_basic (44.46s)
--- PASS: TestAccAWSCloudWatchEventTarget_input_transformer (46.38s)
--- PASS: TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig (63.06s)
--- PASS: TestAccAWSCloudWatchEventTarget_kinesis (64.82s)
--- PASS: TestAccAWSCloudWatchEventTarget_full (64.89s)
--- PASS: TestAccAWSCloudWatchEventTarget_batch (121.86s)
=== CONT TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
2021/06/28 11:09:33 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
Error: Error deleting ECS cluster: ClusterContainsTasksException: The Cluster cannot be deleted while Tasks are active.
--- FAIL: TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount (288.73s)
=== CONT TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
2021/06/28 11:10:11 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
Error: Error deleting ECS cluster: ClusterContainsTasksException: The Cluster cannot be deleted while Tasks are active.
--- FAIL: TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType (305.33s)
The failures are unrelated to this change and occur in nightly CI.
@packrat386 Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.48.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. |
If nothing is specified for these blocks then they cannot be cast to
map[string]interface
.Community Note
Closes #19945
Output from acceptance testing: