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] res/vpc_peering_connection_accepter: add Importer #4486

Merged

Conversation

Dominik-K
Copy link
Contributor

Changes proposed in this pull request

  • adds import functionality to aws_vpc_peering_connection_accepter

Questions

  • How to get the provider's account_id and region inside this code? I want to add a usage validating function that will check that

      account_id != peer_owner_id OR
      region != peer_region
    

    If it's true, i.e. only VPC's differ, you'll need to use one aws_vpc_peering_connection instead. Otherwise the options on both resources can be ambiguous.

Remarks

  • Simply using schema.ImportStatePassthrough forces new resource on next plan. The ID is the same on both sides of the peering connection.

@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label May 8, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels May 9, 2018
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Oct 18, 2018
@bluemalkin
Copy link

bluemalkin commented Jun 12, 2019

Hi - has this been released or is there an ETA please ?

@aeschright aeschright requested a review from a team June 25, 2019 19:22
@tyrken
Copy link

tyrken commented Oct 17, 2019

While not necessary (can just apply it over the top) adding import would be a much nicer experience

@tyrken
Copy link

tyrken commented Oct 28, 2019

Would like to add to please DONT add the assertion against use with the same region/account as your "Question" implies. I'm using explicit accepter & separate option resources for a VPC module with combined peering I'm working on...

Instead please just test/merge as is.

@bflad
Copy link
Contributor

bflad commented Jan 11, 2020

Hi @Dominik-K 👋 Since we haven't seen any updates to this pull request in a very long time, we went ahead and finished the implementation (testing and documentation) in a followup commit. Thanks for your contribution!

bflad added a commit that referenced this pull request Jan 11, 2020
…ation

Reference: #4486

Output from acceptance testing:

```
--- PASS: TestAccAWSVPCPeeringConnectionAccepter_sameRegionSameAccount (38.63s)
--- PASS: TestAccAWSVPCPeeringConnectionAccepter_sameRegionDifferentAccount (39.03s)
--- PASS: TestAccAWSVPCPeeringConnectionAccepter_differentRegionDifferentAccount (39.65s)
--- PASS: TestAccAWSVPCPeeringConnectionAccepter_differentRegionSameAccount (42.12s)
```
@bflad bflad added this to the v2.45.0 milestone Jan 11, 2020
bflad added a commit that referenced this pull request Jan 11, 2020
@bflad bflad merged commit 3169656 into hashicorp:master Jan 11, 2020
@ghost
Copy link

ghost commented Jan 17, 2020

This has been released in version 2.45.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 for triage. Thanks!

@ghost
Copy link

ghost commented Mar 27, 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 Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants