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

Add support for r/aws_appflow_flow #24017

Merged
merged 35 commits into from
May 10, 2022
Merged

Add support for r/aws_appflow_flow #24017

merged 35 commits into from
May 10, 2022

Conversation

zhelding
Copy link
Contributor

@zhelding zhelding commented Apr 4, 2022

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

Relates #23892 and #16253

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. labels Apr 4, 2022
@github-actions github-actions bot added generators Relates to code generators. tags Pertains to resource tagging. labels Apr 13, 2022
@zhelding zhelding force-pushed the f-appflow-service branch 2 times, most recently from 33a825c to 37e9ab4 Compare April 25, 2022 21:08
@github-actions github-actions bot added the service/appflow Issues and PRs that pertain to the appflow service. label Apr 28, 2022
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label May 5, 2022
@zhelding zhelding force-pushed the f-appflow-service branch 3 times, most recently from 24b89d2 to f77085a Compare May 7, 2022 23:46
@zhelding
Copy link
Contributor Author

zhelding commented May 8, 2022

Summary

This pull request adds support for the management Amazon AppFlow flow resources. The latest commit, 7923962, has passing acceptance tests:

  • TestAccAppFlowFlow_basic
  • TestAccAppFlowFlow_update
  • TestAccAppFlowFlow_tags
  • TestAccAppFlowFlow_disappears

The test config used is an instance of a flow from an S3 bucket source to an S3 bucket destination; this is because further sources / destinations either require credential configuration via a forthcoming aws_appflow_flow_connector_profile resource (see #23892) or a connection to a non-AWS service.

We will likely add additional tests covering connections between AWS resources, e.g. Redshift, once connector profile support has been added.

Code Comments

Generic Destination Properties / Generic Source Properties:

A number of appflow.DestinationProperties structs have identical underlying attributes -- as do a number of appflow.SourcePropeties. These instances are labeled in this PR's docs as "Generic Destination Properties" and "Generic Source Properties" respectively.

As a result, there is a fair amount of repeating logic in the flatten / expand functions for these structs; the code could likely be made more DRY / elegant if we replaced these with a set of generic flatten / expand functions. However, I was personally unable to get the type conversion / assertion working correctly, i.e. without build errors.

LookoutMetricsDestinationProperties:

AWS' API reference does not list the valid attributes for LookoutMetricsDestinationProperties -- simply stating that "the members of this structure are context-dependent". As such, we cannot support Amazon Lookout for Metrics as a flow destination for the time being.

@zhelding zhelding marked this pull request as ready for review May 8, 2022 21:00
@zhelding
Copy link
Contributor Author

zhelding commented May 9, 2022

Acceptance tests passing on latest commit (d27ee28).

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 TESTS=TestAccAppFlowFlow_ PKG=appflow ACCTEST_PARALLELISM=2 
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/appflow/... -v -count 1 -parallel 2 -run='TestAccAppFlowFlow_'  -timeout 180m
=== RUN   TestAccAppFlowFlow_basic
=== PAUSE TestAccAppFlowFlow_basic
=== RUN   TestAccAppFlowFlow_update
=== PAUSE TestAccAppFlowFlow_update
=== RUN   TestAccAppFlowFlow_tags
=== PAUSE TestAccAppFlowFlow_tags
=== RUN   TestAccAppFlowFlow_disappears
=== PAUSE TestAccAppFlowFlow_disappears
=== CONT  TestAccAppFlowFlow_basic
=== CONT  TestAccAppFlowFlow_tags
--- PASS: TestAccAppFlowFlow_basic (29.03s)
=== CONT  TestAccAppFlowFlow_update
--- PASS: TestAccAppFlowFlow_tags (64.04s)
=== CONT  TestAccAppFlowFlow_disappears
--- PASS: TestAccAppFlowFlow_update (41.81s)
--- PASS: TestAccAppFlowFlow_disappears (23.09s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/appflow	91.041s

@zhelding
Copy link
Contributor Author

Acceptance tests passing on latest commit 17b5b27. Merging! 🚀

@zhelding zhelding merged commit 219f088 into main May 10, 2022
@zhelding zhelding deleted the f-appflow-service branch May 10, 2022 21:37
@github-actions github-actions bot added this to the v4.14.0 milestone May 10, 2022
github-actions bot pushed a commit that referenced this pull request May 10, 2022
@github-actions
Copy link

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

@zhelding zhelding mentioned this pull request May 16, 2022
@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 Jun 13, 2022
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. generators Relates to code generators. provider Pertains to the provider itself, rather than any interaction with AWS. service/appflow Issues and PRs that pertain to the appflow service. size/XL Managed by automation to categorize the size of a PR. tags Pertains to resource tagging. 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.

None yet

2 participants