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

Resource Import Support #151

Merged
merged 11 commits into from
Sep 21, 2021
Merged

Resource Import Support #151

merged 11 commits into from
Sep 21, 2021

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Sep 14, 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
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the Cloudformation Open Coverage Roadmap.

Requires hashicorp/terraform-plugin-framework#33 and hashicorp/terraform-plugin-framework#165
Closes #41

Notes

  • Assumes all resources will receive import support by default
  • Test coverage only added for resources that do not have required attributes e.g. Logs::LogGroup

Output of acceptance test:

--- PASS: TestAccAWSLogsLogGroup_basic (24.62s)

@anGie44 anGie44 marked this pull request as ready for review September 16, 2021 23:43
@anGie44 anGie44 force-pushed the f-import-support branch 2 times, most recently from a15741e to 069461a Compare September 20, 2021 17:42
…96221591e08b2ffe1b20c7098dcb25b && go mod tidy && go mod vendor'.
@ewbankkit ewbankkit self-assigned this Sep 21, 2021
@ewbankkit
Copy link
Contributor

Integrated changes to terraform-plugin-framework from hashicorp/terraform-plugin-framework#165.

% TF_LOG=ERROR make testacc PKG_NAME=internal/aws/logs TESTARGS='-run=TestAccAWSLogsLogGroup_basic'
TF_ACC=1 go test ./internal/aws/logs -v -count 1 -parallel 20 -run=TestAccAWSLogsLogGroup_basic -timeout 180m
=== RUN   TestAccAWSLogsLogGroup_basic
=== PAUSE TestAccAWSLogsLogGroup_basic
=== CONT  TestAccAWSLogsLogGroup_basic
--- PASS: TestAccAWSLogsLogGroup_basic (22.34s)
PASS
ok  	github.com/hashicorp/terraform-provider-awscc/internal/aws/logs	22.980s

@ewbankkit
Copy link
Contributor

If a file examples/resources/<Resource Name>/import.shexists then its contents will be included in an Import section in the resource's generated documentation.

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 🚀.

I'll open an additional issue for the documentation generation.

@anGie44 anGie44 merged commit 5ac72f3 into main Sep 21, 2021
@anGie44 anGie44 deleted the f-import-support branch September 21, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support existing resource import
2 participants