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

F add appsync target to aws cloudwatch event target #37773

Conversation

Oltier
Copy link
Contributor

@Oltier Oltier commented May 30, 2024

Description

Add appsync_target option as an option to aws_cloudwatch_event_target

Relations

Closes #36369

References

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-appsyncparameters.html

Also, it seemed to be not possible to get the endpoint arn from the aws_appsync_graphql_api so I had to use a replace method:

arn      = replace(aws_appsync_graphql_api.graphql-api.arn, "apis", "endpoints/graphql-api")

otherwise I was getting this error for the arn that we can get from the GraphQL API:

Parameter arn:aws:appsync:us-west-2:849243743924:apis/raflejqhcjhkrdiv4fb4q4ocla is not valid. Reason: Provided Arn is not in correct format.

This was also commented on this issue. That said, if you mangle the ARN it works perfectly.
#36369 (comment)

I also couldn't find any references to this endpoint arn in the aws sdk.

Output from Acceptance Testing

terraform-provider-aws git:(f-add-appsync-target-to-aws_cloudwatch_event_target) make testacc TESTS=TestAccEventsTarget_basic PKG=events
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsTarget_basic'  -timeout 360m
=== RUN   TestAccEventsTarget_basic
=== PAUSE TestAccEventsTarget_basic
=== CONT  TestAccEventsTarget_basic
--- PASS: TestAccEventsTarget_basic (120.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	120.951sterraform-provider-aws git:(f-add-appsync-target-to-aws_cloudwatch_event_target) make testacc TESTS=TestAccEventsTarget_appsync PKG=events
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsTarget_appsync'  -timeout 360m
=== RUN   TestAccEventsTarget_appsync
=== PAUSE TestAccEventsTarget_appsync
=== CONT  TestAccEventsTarget_appsync
--- PASS: TestAccEventsTarget_appsync (123.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	123.916s

Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/events Issues and PRs that pertain to the events service. labels May 30, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 30, 2024
@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. and removed documentation Introduces or discusses updates to documentation. labels May 30, 2024
@Oltier Oltier force-pushed the f-add-appsync-target-to-aws_cloudwatch_event_target branch 2 times, most recently from dcbddd6 to 8b5a10a Compare May 30, 2024 12:49
@Oltier Oltier marked this pull request as ready for review May 30, 2024 12:55
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 6, 2024
@Oltier Oltier force-pushed the f-add-appsync-target-to-aws_cloudwatch_event_target branch from 8b5a10a to 197db5a Compare June 10, 2024 08:14
@ewbankkit ewbankkit requested a review from a team as a code owner October 15, 2024 14:06
@ewbankkit ewbankkit self-assigned this Oct 15, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
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 🚀.

% make testacc TESTARGS='-run=TestAccEventsTarget_appsync\|TestAccEventsTarget_basic' PKG=events
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/events/... -v -count 1 -parallel 20  -run=TestAccEventsTarget_appsync\|TestAccEventsTarget_basic -timeout 360m
2024/10/15 10:10:59 Initializing Terraform AWS Provider...
=== RUN   TestAccEventsTarget_basic
=== PAUSE TestAccEventsTarget_basic
=== RUN   TestAccEventsTarget_appsync
=== PAUSE TestAccEventsTarget_appsync
=== CONT  TestAccEventsTarget_basic
=== CONT  TestAccEventsTarget_appsync
--- PASS: TestAccEventsTarget_appsync (16.05s)
--- PASS: TestAccEventsTarget_basic (21.29s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	26.585s

@ewbankkit
Copy link
Contributor

@Oltier Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 7c94eab into hashicorp:main Oct 15, 2024
41 checks passed
@github-actions github-actions bot added this to the v5.72.0 milestone Oct 15, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/events Issues and PRs that pertain to the events service. size/L 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
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Appsync targets for aws_cloudwatch_event_target
3 participants