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

provider/aws: aws_vpc_peering_connection: import fix #10635

Merged
merged 1 commit into from
Dec 9, 2016

Commits on Dec 9, 2016

  1. provider/aws: aws_vpc_peering_connection: import fix

    When importing an `aws_vpc_peering_connection`, the code assumes that
    the account under Terraform control is the initiator (requester) of the
    VPC peering request. This holds true when the peering connection is
    between two VPCs in the same account, or when the peering connection has
    been initiated from the controlled account to another.
    
    However, when the peering connection has been initiated from a foreign
    account towards the account under management, importing the peering
    connection into the statefile results in values of `peer_vpc_id` and
    `vpc_id` being the opposite way round to what they should be, and in the
    `peer_owner_id` being set to the managed account's ID rather than the
    foreign account's ID.
    
    This patch checks the Accepter and Requester Owner IDs against the AWS
    connection's reported owner ID, and reverses the mapping if it is
    determined that the VPC peering connection is owned by the foreign
    account.
    dougneal committed Dec 9, 2016
    Configuration menu
    Copy the full SHA
    24baa38 View commit details
    Browse the repository at this point in the history