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

[wip] resource/aws_ses_receipt_rule: support import functionality #6237

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

acburdine
Copy link
Contributor

@acburdine acburdine commented Oct 22, 2018

Changes proposed in this pull request:

  • Add import functionality for aws_ses_receipt_rule

Output from acceptance testing:

Haven't run it yet, waiting on response to the below comment.

@acburdine
Copy link
Contributor Author

acburdine commented Oct 22, 2018

After doing some more looking at other resources with imports, it appears this isn't quite the right approach since it won't import the whole state (with all of the more complicated rules and whatnot).

Ideally, we could use schema.ImportStatePassthrough to lookup the rule, but as far as I can tell the resource currently uses just the rule name as an ID, rather than a composite id in the form <ruleset name>:<rule name>. Based on the fact that rules are specific to a ruleset, I think it would be better to have the ID be a composite of the ruleset and rule (similar to the iam_role_policy resource).

I'm not sure what the policy is for changing the ID format, so I'd appreciate some feedback on what the best approach to implement this is 😄

@ghost ghost added size/S Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ses Issues and PRs that pertain to the ses service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Oct 22, 2018
@acburdine acburdine changed the title Add import for aws_ses_receipt_rule [wip] resource/aws_ses_receipt_rule: support import functionality Oct 24, 2018
@bflad
Copy link
Contributor

bflad commented Oct 25, 2018

Hi @acburdine! 👋 Thanks for submitting this. We currently denote changing resource IDs as a major version breaking change since some folks might be relying on the attribute in other references. See also: https://www.terraform.io/docs/extend/best-practices/versioning.html#example-major-number-increments

During import, we only need to d.Set() enough information to make the Read function succeed, which is immediately called. This looks like its in pretty good shape to implement the import functionality without changing the ID minus the CI errors. Once that's fixed up we can verify the acceptance testing. 👍

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 25, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Hi again, @acburdine. 👋 Since we haven't heard back from you for awhile and the fix was trivial, I added a commit after yours so we could get this feature in.

--- PASS: TestAccAWSSESReceiptRule_actions (12.99s)
--- PASS: TestAccAWSSESReceiptRule_basic (12.99s)
--- PASS: TestAccAWSSESReceiptRule_order (16.54s)
--- PASS: TestAccAWSSESReceiptRule_s3Action (28.28s)

@bflad bflad added this to the v1.44.0 milestone Nov 12, 2018
@bflad bflad merged commit 1fb5a10 into hashicorp:master Nov 12, 2018
bflad added a commit that referenced this pull request Nov 12, 2018
@bflad
Copy link
Contributor

bflad commented Nov 15, 2018

This has been released in version 1.44.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
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. service/ses Issues and PRs that pertain to the ses service. size/S 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.

3 participants