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 'aws_dx_hosted_private_virtual_interface'/'aws_dx_hosted_private_virtual_interface_accepter' resources #3255

Merged
merged 8 commits into from
Jun 25, 2018

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Feb 4, 2018

@ewbankkit
Copy link
Contributor Author

Acceptance tests require an active Direct Connect connection which should be specified via the DX_CONNECTION_ID environment variable and an AWS account ID for the owner (accepter) of the virtual interface which should be specified via the DX_HOSTED_VIF_OWNER_ACCOUNT environment variable.

export DX_CONNECTION_ID=dxcon-xxxxxxxx
export DX_HOSTED_VIF_OWNER_ACCOUNT=xxxxxxxx
make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAwsDxHostedPrivateVirtualInterface_ -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (41.78s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	51.482s

@ewbankkit
Copy link
Contributor Author

Relates also to #2861.

@bflad bflad added service/directconnect Issues and PRs that pertain to the directconnect service. new-resource Introduces a new resource. labels Feb 5, 2018
@ghost ghost added the size/XXL Managed by automation to categorize the size of a PR. label Feb 13, 2018
@n3ph
Copy link
Contributor

n3ph commented Feb 20, 2018

This is looking great. ATM we are still waiting for our DX connection, but are definitely looking forward to use this. I would love to see this in the upcoming release.. Are there any blockers or concerns regarding this merge request?

Is there anything we can do here? I would like to support this in every possible ways..

Best regards!

@gerr1t
Copy link

gerr1t commented Jun 14, 2018

Hey @ewbankkit , whats the status of these PR's? Would love to use them :)

@ewbankkit
Copy link
Contributor Author

Hoping to make some progress getting this and related PRs merged at next week's gardening event.

@grealish
Copy link

@ewbankkit let me know if I can do any testing, currently accepting a hosted DX connection on a non-productive AWS account, where i'd like to test this automation.

@ghost ghost added the size/XXL Managed by automation to categorize the size of a PR. label Jun 21, 2018
@ewbankkit
Copy link
Contributor Author

Rebased to remove conflicts.

@n3ph
Copy link
Contributor

n3ph commented Jun 22, 2018

Confirming acceptance tests in eu-central-1

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAwsDxHostedPrivateVirtualInterface_ -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (43.62s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	43.638s

@ewbankkit
Copy link
Contributor Author

Changes after code review on #3253.
Acceptance tests:

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAwsDxHostedPrivateVirtualInterface_ -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (43.80s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	44.496s

Copy link
Member

@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 @ewbankkit -- I left some initial feedback below, all of it surrounding the _accepter resource.

Can you please take a look and let us know if you have any questions?

ForceNew: true,
ConflictsWith: []string{"vpn_gateway_id"},
},
"tags": tagsSchema(),
Copy link
Member

Choose a reason for hiding this comment

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

Unless the "confirmation" itself has some sort of resource tagging, this should be removed 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The accepting side of the interface IS allowed to tag the VIF (this is done in dxVirtualInterfaceUpdate).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tags can only be set on the accepting side - The allocating side can't see the tags (I guess they live in the owning account).

return resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d, meta)
}

func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceData, meta interface{}) error {
Copy link
Member

Choose a reason for hiding this comment

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

The read function doesn't seem to be checking the VIF state to trigger resource recreation (e.g. ensure the VIF state is available/down) if its for some reason disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll address this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think once we no longer delete on the accepting side, if the resource is in an "acceptable" state during Read we should clear the Id and trigger a re-acceptance.

return nil
}

func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error {
Copy link
Member

Choose a reason for hiding this comment

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

This resource should not perform anything during update.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tags can be modified - see #3255 (comment).

return resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d, meta)
}

func resourceAwsDxHostedPrivateVirtualInterfaceAccepterDelete(d *schema.ResourceData, meta interface{}) error {
Copy link
Member

Choose a reason for hiding this comment

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

This resource should not perform anything during delete and that should be noted in the resource documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to play around in the AWS console and see what the correct way of deleting a hosted VIF is; Documentation is non-existent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the VIF is deleted on the allocating side then it becomes deleted on the accepting side also. Agree that the accepter shouldn't initiate the delete (this keeps consistency with aws_vpc_peering_connection_accepter). I'll update the code and documentation (and the same for #3254).

@ewbankkit
Copy link
Contributor Author

Changes after additional code review.
Ran the example code in the documentation:

$ terraform apply
aws_vpn_gateway.vpn_gw: Creating...
  amazon_side_asn: "" => "<computed>"
  vpc_id:          "" => "<computed>"
aws_dx_hosted_private_virtual_interface.creator: Creating...
  address_family:   "" => "ipv4"
  amazon_address:   "" => "<computed>"
  arn:              "" => "<computed>"
  bgp_asn:          "" => "65352"
  bgp_auth_key:     "" => "<computed>"
  connection_id:    "" => "dxcon-ffffffff"
  customer_address: "" => "<computed>"
  name:             "" => "vif-foo"
  owner_account_id: "" => "000000000000"
  vlan:             "" => "4094"
aws_vpn_gateway.vpn_gw: Creation complete after 1s (ID: vgw-00000000)
aws_dx_hosted_private_virtual_interface.creator: Still creating... (10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Creation complete after 11s (ID: dxvif-ffffffff)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Creating...
  arn:                  "" => "<computed>"
  tags.%:               "" => "1"
  tags.Side:            "" => "Accepter"
  virtual_interface_id: "" => "dxvif-ffffffff"
  vpn_gateway_id:       "" => "vgw-00000000"
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (1m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (2m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (3m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (4m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (5m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (6m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Still creating... (6m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Creation complete after 6m11s (ID: dxvif-ffffffff)

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_vpn_gateway.vpn_gw: Refreshing state... (ID: vgw-00000000)
data.aws_caller_identity.accepter: Refreshing state...
aws_dx_hosted_private_virtual_interface.creator: Refreshing state... (ID: dxvif-ffffffff)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Refreshing state... (ID: dxvif-ffffffff)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
$ terraform destroy
aws_vpn_gateway.vpn_gw: Refreshing state... (ID: vgw-00000000)
data.aws_caller_identity.accepter: Refreshing state...
aws_dx_hosted_private_virtual_interface.creator: Refreshing state... (ID: dxvif-ffffffff)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Refreshing state... (ID: dxvif-ffffffff)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  - aws_dx_hosted_private_virtual_interface.creator

  - aws_dx_hosted_private_virtual_interface_accepter.accepter

  - aws_vpn_gateway.vpn_gw


Plan: 0 to add, 0 to change, 3 to destroy.

Do you really want to destroy?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

aws_dx_hosted_private_virtual_interface_accepter.accepter: Destroying... (ID: dxvif-ffffffff)
aws_dx_hosted_private_virtual_interface_accepter.accepter: Destruction complete after 0s
aws_vpn_gateway.vpn_gw: Destroying... (ID: vgw-00000000)
aws_dx_hosted_private_virtual_interface.creator: Destroying... (ID: dxvif-ffffffff)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 10s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 20s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 20s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 30s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 40s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 40s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 50s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 50s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m0s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m0s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m10s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m20s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m20s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m30s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m40s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m40s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 1m50s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 1m50s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m0s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m0s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m10s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m20s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m20s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m30s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m40s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m40s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 2m50s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 2m50s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m0s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m0s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m10s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m20s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m20s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m30s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m40s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m40s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 3m50s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 3m50s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 4m0s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 4m0s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 4m10s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 4m10s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 4m20s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 4m20s elapsed)
aws_vpn_gateway.vpn_gw: Still destroying... (ID: vgw-00000000, 4m30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Still destroying... (ID: dxvif-ffffffff, 4m30s elapsed)
aws_dx_hosted_private_virtual_interface.creator: Destruction complete after 4m37s
aws_vpn_gateway.vpn_gw: Destruction complete after 4m38s

Destroy complete! Resources: 3 destroyed.

ewbankkit pushed a commit to ewbankkit/terraform-provider-aws that referenced this pull request Jun 22, 2018
@n3ph
Copy link
Contributor

n3ph commented Jun 23, 2018

Acceptance test in eu-central-1

$ make testacc TEST=./aws/ TESTARGS='-run=TestAccAwsDxHostedPrivateVirtualInterface_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws/ -v -run=TestAccAwsDxHostedPrivateVirtualInterface_ -timeout 120m
=== RUN   TestAccAwsDxHostedPrivateVirtualInterface_basic
--- PASS: TestAccAwsDxHostedPrivateVirtualInterface_basic (49.45s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	49.462s

@n3ph
Copy link
Contributor

n3ph commented Jun 23, 2018

Here is small test case

provider "aws" {
  max_retries = 3
  region      = "eu-central-1"
  profile     = "connect"
}

provider "aws" {
  max_retries = 3
  region      = "eu-central-1"
  profile     = "devops"
  alias       = "accepter"
}

variable "connection_id" {
  default = "dxcon-xxxxxxxx"
}

data "aws_caller_identity" "accepter" {
  provider = "aws.accepter"
}

resource "aws_dx_hosted_private_virtual_interface" "test" {
  connection_id    = "${var.connection_id}"
  owner_account_id = "${data.aws_caller_identity.accepter.account_id}"

  name           = "vif-test"
  vlan           = 1
  address_family = "ipv4"
  bgp_asn        = 65001
}

resource "aws_vpn_gateway" "test" {
  amazon_side_asn = 65100

  provider = "aws.accepter"
}

resource "aws_dx_hosted_private_virtual_interface_accepter" "test" {
  virtual_interface_id = "${aws_dx_hosted_private_virtual_interface.test.id}"
  vpn_gateway_id       = "${aws_vpn_gateway.test.id}"

  provider = "aws.accepter"
}
$ terraform apply
data.aws_caller_identity.accepter: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + aws_dx_hosted_private_virtual_interface.test
      id:                   <computed>
      address_family:       "ipv4"
      amazon_address:       <computed>
      arn:                  <computed>
      bgp_asn:              "65001"
      bgp_auth_key:         <computed>
      connection_id:        "dxcon-xxxxxxxx"
      customer_address:     <computed>
      name:                 "vif-test"
      owner_account_id:     "012345678901"
      vlan:                 "1"

  + aws_dx_hosted_private_virtual_interface_accepter.test
      id:                   <computed>
      arn:                  <computed>
      virtual_interface_id: "${aws_dx_hosted_private_virtual_interface.test.id}"
      vpn_gateway_id:       "${aws_vpn_gateway.test.id}"

  + aws_vpn_gateway.test
      id:                   <computed>
      amazon_side_asn:      "65100"
      vpc_id:               <computed>


Plan: 3 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_dx_hosted_private_virtual_interface.test: Creating...
  address_family:   "" => "ipv4"
  amazon_address:   "" => "<computed>"
  arn:              "" => "<computed>"
  bgp_asn:          "" => "65001"
  bgp_auth_key:     "" => "<computed>"
  connection_id:    "" => "dxcon-xxxxxxxx"
  customer_address: "" => "<computed>"
  name:             "" => "vif-test"
  owner_account_id: "" => "012345678901"
  vlan:             "" => "1"
aws_vpn_gateway.test: Creating...
  amazon_side_asn: "" => "65100"
  vpc_id:          "" => "<computed>"
aws_vpn_gateway.test: Creation complete after 2s (ID: vgw-0a0faa02b530232a6)
aws_dx_hosted_private_virtual_interface.test: Still creating... (10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Creation complete after 11s (ID: dxvif-ffseyuwz)
aws_dx_hosted_private_virtual_interface_accepter.test: Creating...
  arn:                  "" => "<computed>"
  virtual_interface_id: "" => "dxvif-ffseyuwz"
  vpn_gateway_id:       "" => "vgw-0a0faa02b530232a6"
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (1m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (2m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (3m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m40s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (4m50s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (5m0s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (5m10s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (5m20s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Still creating... (5m30s elapsed)
aws_dx_hosted_private_virtual_interface_accepter.test: Creation complete after 5m33s (ID: dxvif-ffseyuwz)

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
$ terraform apply
aws_vpn_gateway.test: Refreshing state... (ID: vgw-0a0faa02b530232a6)
data.aws_caller_identity.accepter: Refreshing state...
aws_dx_hosted_private_virtual_interface.test: Refreshing state... (ID: dxvif-ffseyuwz)
aws_dx_hosted_private_virtual_interface_accepter.test: Refreshing state... (ID: dxvif-ffseyuwz)

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
$ terraform destroy
aws_vpn_gateway.test: Refreshing state... (ID: vgw-0a0faa02b530232a6)
data.aws_caller_identity.accepter: Refreshing state...
aws_dx_hosted_private_virtual_interface.test: Refreshing state... (ID: dxvif-ffseyuwz)
aws_dx_hosted_private_virtual_interface_accepter.test: Refreshing state... (ID: dxvif-ffseyuwz)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  - aws_dx_hosted_private_virtual_interface.test

  - aws_dx_hosted_private_virtual_interface_accepter.test

  - aws_vpn_gateway.test


Plan: 0 to add, 0 to change, 3 to destroy.

Do you really want to destroy?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes

+aws_dx_hosted_private_virtual_interface_accepter.test: Destroying... (ID: dxvif-ffseyuwz)
aws_dx_hosted_private_virtual_interface_accepter.test: Destruction complete after 0s
aws_vpn_gateway.test: Destroying... (ID: vgw-0a0faa02b530232a6)
aws_dx_hosted_private_virtual_interface.test: Destroying... (ID: dxvif-ffseyuwz)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 10s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 20s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 30s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 40s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 50s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m0s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m0s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m10s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m20s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m20s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 1m50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 1m50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m0s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m0s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m10s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m30s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 2m50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 2m50s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m0s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m0s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m10s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m20s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m30s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m40s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 3m50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 3m50s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m0s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m0s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m10s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m10s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m20s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m30s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m30s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m40s elapsed)
aws_dx_hosted_private_virtual_interface.test: Still destroying... (ID: dxvif-ffseyuwz, 4m50s elapsed)
aws_vpn_gateway.test: Still destroying... (ID: vgw-0a0faa02b530232a6, 4m50s elapsed)
aws_dx_hosted_private_virtual_interface.test: Destruction complete after 4m52s
aws_vpn_gateway.test: Destruction complete after 4m53s

Destroy complete! Resources: 3 destroyed.

@bflad bflad added this to the v1.25.0 milestone Jun 25, 2018
@bflad bflad merged commit 64f9a62 into hashicorp:master Jun 25, 2018
bflad added a commit that referenced this pull request Jun 25, 2018
@ewbankkit ewbankkit deleted the issue-3251 branch June 25, 2018 14:01
@bflad
Copy link
Member

bflad commented Jun 27, 2018

This has been released in version 1.25.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 5, 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 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/directconnect Issues and PRs that pertain to the directconnect service. size/XXL Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add aws_dx_hosted_private_virtual_interface resource
5 participants