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

r/cloudwatch_event_target - add additional ecs arguments. #19975

Merged
merged 9 commits into from
Jul 12, 2021

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Jun 27, 2021

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #19948
Closes #19949

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSCloudWatchEventTarget_'
--- PASS: TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount (142.90s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType (288.24s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsFull (73.20s)

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/cloudwatchevents labels Jun 27, 2021
@DrFaust92 DrFaust92 added enhancement Requests to existing resources that expand the functionality or scope. and removed service/eventbridge labels Jun 27, 2021
@github-actions github-actions bot added service/eventbridge tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jun 27, 2021
@ewbankkit ewbankkit force-pushed the r/cloudwatch_events_target_ecs branch from 6f8bd17 to b06f057 Compare June 28, 2021 15:55
aws/resource_aws_cloudwatch_event_target.go Outdated Show resolved Hide resolved
aws/resource_aws_cloudwatch_event_target.go Outdated Show resolved Hide resolved
aws/resource_aws_cloudwatch_event_target.go Outdated Show resolved Hide resolved
aws/resource_aws_cloudwatch_event_target.go Outdated Show resolved Hide resolved
website/docs/r/cloudwatch_event_target.html.markdown Outdated Show resolved Hide resolved
website/docs/r/cloudwatch_event_target.html.markdown Outdated Show resolved Hide resolved
aws/resource_aws_cloudwatch_event_target_test.go Outdated Show resolved Hide resolved
@DrFaust92 DrFaust92 requested a review from ewbankkit June 29, 2021 06:55
@dimisjim
Copy link
Contributor

dimisjim commented Jul 8, 2021

@ewbankkit can we merge this?

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

Commercial
% 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_ecsFull
=== PAUSE TestAccAWSCloudWatchEventTarget_ecsFull
=== 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:751: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccAWSCloudWatchEventTarget_PartnerEventBus (0.00s)
=== CONT  TestAccAWSCloudWatchEventTarget_basic
=== CONT  TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
=== CONT  TestAccAWSCloudWatchEventTarget_inputTransformerJsonString
=== CONT  TestAccAWSCloudWatchEventTarget_input_transformer
=== CONT  TestAccAWSCloudWatchEventTarget_sqs
=== CONT  TestAccAWSCloudWatchEventTarget_ecsFull
=== CONT  TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
=== CONT  TestAccAWSCloudWatchEventTarget_kinesis
=== CONT  TestAccAWSCloudWatchEventTarget_batch
=== CONT  TestAccAWSCloudWatchEventTarget_ecs
=== CONT  TestAccAWSCloudWatchEventTarget_http
=== CONT  TestAccAWSCloudWatchEventTarget_GeneratedTargetId
=== CONT  TestAccAWSCloudWatchEventTarget_EventBusName
=== CONT  TestAccAWSCloudWatchEventTarget_disappears
=== CONT  TestAccAWSCloudWatchEventTarget_ssmDocument
=== CONT  TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
=== CONT  TestAccAWSCloudWatchEventTarget_full
--- PASS: TestAccAWSCloudWatchEventTarget_disappears (21.27s)
--- PASS: TestAccAWSCloudWatchEventTarget_GeneratedTargetId (24.63s)
--- PASS: TestAccAWSCloudWatchEventTarget_sqs (25.42s)
--- PASS: TestAccAWSCloudWatchEventTarget_ssmDocument (26.45s)
--- PASS: TestAccAWSCloudWatchEventTarget_http (32.15s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsFull (40.67s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount (40.94s)
--- PASS: TestAccAWSCloudWatchEventTarget_EventBusName (42.78s)
--- PASS: TestAccAWSCloudWatchEventTarget_inputTransformerJsonString (45.34s)
--- PASS: TestAccAWSCloudWatchEventTarget_basic (50.39s)
--- PASS: TestAccAWSCloudWatchEventTarget_input_transformer (59.94s)
--- PASS: TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig (64.69s)
--- PASS: TestAccAWSCloudWatchEventTarget_kinesis (65.64s)
--- PASS: TestAccAWSCloudWatchEventTarget_full (68.04s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType (78.89s)
--- PASS: TestAccAWSCloudWatchEventTarget_batch (112.83s)
=== CONT  TestAccAWSCloudWatchEventTarget_ecs
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/07/12 09:37:07 [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_ecs (303.43s)
GovCloud
% 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_ecsFull
=== PAUSE TestAccAWSCloudWatchEventTarget_ecsFull
=== 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:751: Environment variable EVENT_BRIDGE_PARTNER_EVENT_BUS_NAME is not set
--- SKIP: TestAccAWSCloudWatchEventTarget_PartnerEventBus (0.00s)
=== CONT  TestAccAWSCloudWatchEventTarget_basic
=== CONT  TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
=== CONT  TestAccAWSCloudWatchEventTarget_inputTransformerJsonString
=== CONT  TestAccAWSCloudWatchEventTarget_sqs
=== CONT  TestAccAWSCloudWatchEventTarget_kinesis
=== CONT  TestAccAWSCloudWatchEventTarget_batch
=== CONT  TestAccAWSCloudWatchEventTarget_ecsFull
=== CONT  TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount
=== CONT  TestAccAWSCloudWatchEventTarget_http
=== CONT  TestAccAWSCloudWatchEventTarget_ecs
=== CONT  TestAccAWSCloudWatchEventTarget_ssmDocument
=== CONT  TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
=== CONT  TestAccAWSCloudWatchEventTarget_full
=== CONT  TestAccAWSCloudWatchEventTarget_input_transformer
=== CONT  TestAccAWSCloudWatchEventTarget_disappears
=== CONT  TestAccAWSCloudWatchEventTarget_GeneratedTargetId
=== CONT  TestAccAWSCloudWatchEventTarget_EventBusName
=== CONT  TestAccAWSCloudWatchEventTarget_http
    provider_test.go:1146: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/07/12 09:44:56 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating API Gateway: BadRequestException: Endpoint Configuration type EDGE is not supported in this region: us-gov-west-1
        
          on terraform_plugin_test.tf line 25, in resource "aws_api_gateway_rest_api" "test":
          25: resource "aws_api_gateway_rest_api" "test" {
        
        
--- SKIP: TestAccAWSCloudWatchEventTarget_http (15.83s)
--- PASS: TestAccAWSCloudWatchEventTarget_disappears (23.16s)
--- PASS: TestAccAWSCloudWatchEventTarget_GeneratedTargetId (26.18s)
--- PASS: TestAccAWSCloudWatchEventTarget_sqs (28.14s)
--- PASS: TestAccAWSCloudWatchEventTarget_ssmDocument (30.24s)
--- PASS: TestAccAWSCloudWatchEventTarget_inputTransformerJsonString (41.00s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsFull (43.47s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecs (43.49s)
--- PASS: TestAccAWSCloudWatchEventTarget_ecsWithBlankTaskCount (43.78s)
=== CONT  TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig
    provider_test.go:1103: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/07/12 09:44:56 [DEBUG] Using modified User-Agent: Terraform/0.12.31 HashiCorp-terraform-exec/0.13.3
        
        Error: Creating CloudWatch Events Target failed: UnknownOperationException: Operation is disabled in this region.
        	status code: 400, request id: 84393827-ff6c-419b-b70a-4c5d510d56a9
        
          on terraform_plugin_test.tf line 54, in resource "aws_cloudwatch_event_target" "test":
          54: resource "aws_cloudwatch_event_target" "test" {
        
        
--- PASS: TestAccAWSCloudWatchEventTarget_EventBusName (48.10s)
--- PASS: TestAccAWSCloudWatchEventTarget_input_transformer (49.88s)
--- PASS: TestAccAWSCloudWatchEventTarget_basic (56.44s)
--- SKIP: TestAccAWSCloudWatchEventTarget_RetryPolicy_DeadLetterConfig (59.02s)
--- PASS: TestAccAWSCloudWatchEventTarget_full (69.93s)
--- PASS: TestAccAWSCloudWatchEventTarget_kinesis (69.93s)
--- PASS: TestAccAWSCloudWatchEventTarget_batch (142.85s)
=== CONT  TestAccAWSCloudWatchEventTarget_ecsWithBlankLaunchType
    testing_new.go:63: Error running post-test destroy, there may be dangling resources: exit status 1
        2021/07/12 09:46:09 [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 (304.41s)

Failures are unrelated to this change and are often seen in nightly CI.

@ewbankkit ewbankkit merged commit f54b9a4 into hashicorp:main Jul 12, 2021
@github-actions github-actions bot added this to the v3.50.0 milestone Jul 12, 2021
@github-actions
Copy link

This functionality has been released in v3.50.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!

@github-actions
Copy link

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
@DrFaust92 DrFaust92 deleted the r/cloudwatch_events_target_ecs branch February 12, 2022 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
3 participants