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

aws_dx_hosted_transit_virtual_interface missing directConnectGatewayId #12336

Open
bernadinm opened this issue Mar 10, 2020 · 6 comments
Open
Labels
service/directconnect Issues and PRs that pertain to the directconnect service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. waiting-response Maintainers are waiting on response from community or contributor.

Comments

@bernadinm
Copy link

When creating Transit Virtual Interface on AWS web console, it performs successfully. When using terraform, it looks like its missing the directConnectGatewayId.

https://docs.aws.amazon.com/cli/latest/reference/directconnect/create-transit-virtual-interface.html

Terraform Version

terraform -v
Terraform v0.12.23
+ provider.aws v2.52.0

Affected Resource(s)

  • aws_dx_hosted_transit_virtual_interface

Terraform Configuration Files

resource "aws_dx_hosted_transit_virtual_interface" "vif" {
  connection_id = "dxcon-ffp8241a"

  name             = "tf-transit-vif-sf-dc"
  vlan             = 1501
  address_family   = "ipv4"
  bgp_asn          = 64100
  amazon_address   = "169.254.32.206/30"
  customer_address = "169.254.32.207/30"
  owner_account_id = "12345678910"
  bgp_auth_key     = "<REDACTED"
}

Debug Output

Panic Output

Error: error creating Direct Connect hosted transit virtual interface: DirectConnectClientException: Cannot allocate VirtualInterface for the connection owner.

  on tgw.tf line 60, in resource "aws_dx_hosted_transit_virtual_interface" "vif":
  60: resource "aws_dx_hosted_transit_virtual_interface" "vif" {

Expected Behavior

Successful deploy.

Actual Behavior

Failed with error above.

Steps to Reproduce

  1. terraform apply
@ghost ghost added the service/directconnect Issues and PRs that pertain to the directconnect service. label Mar 10, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 10, 2020
@ewbankkit
Copy link
Contributor

Similar:

@bernadinm Is the owner_account_id a different AWS account from the one that is attempting to create the aws_dx_hosted_transit_virtual_interface resource?

@bernadinm
Copy link
Author

@ewaltman It's the same owner.

@ewbankkit
Copy link
Contributor

@bernadinm owner_id should be set to the ID of the AWS account that will accept the hosted VIF.
If it is the same AWS account ID then the aws_dx_transit_virtual_interface resource should be used.

@bernadinm
Copy link
Author

Thank's @ewbankkit. In this case, I should expect to import it with the command below but this is what I see.

terraform import aws_dx_transit_virtual_interface.vif dxvif-a1b2c3f4

Error: virtual interface (dxvif-a1b2c3f4) not found

I could another issue for this but I see that I cannot use the AWS cli to find the manually created virtual interface.

aws directconnect describe-virtual-interfaces
{
    "virtualInterfaces": []
}

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Oct 12, 2021
@justinretzolk
Copy link
Member

Hey @bernadinm 👋 Thank you for filing this issue, and for the continued discussion. I wanted to follow up here and see if you were able to get the resource working as expected, given that there's been a number of AWS Provider releases since you initially filed the issue. Were you able to get this sorted out?

@justinretzolk justinretzolk added the waiting-response Maintainers are waiting on response from community or contributor. label Oct 12, 2021
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/directconnect Issues and PRs that pertain to the directconnect service. stale Old or inactive issues managed by automation, if no further action taken these will get closed. waiting-response Maintainers are waiting on response from community or contributor.
Projects
None yet
Development

No branches or pull requests

3 participants