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

ibm_tg_connection fails saying connection already added on a new transit gateway #5482

Open
prb112 opened this issue Jul 2, 2024 · 0 comments
Labels
service/Transit Gateway Issues related to Transit Gateway

Comments

@prb112
Copy link

prb112 commented Jul 2, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

ibm_tg_connection fails saying connection already added on a new transit gateway

Terraform v1.5.5

Affected Resource(s)

  • ibm_tg_connection

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Ref: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/tg_gateway
resource "ibm_tg_gateway" "mac_tg_gw" {
  name           = "${var.vpc_name}-tg"
  location       = var.vpc_region
  global         = false
  resource_group = var.resource_group
}

# Ref: https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/tg_connection
resource "ibm_tg_connection" "vpc_tg_connection" {
  depends_on = [ibm_tg_gateway.mac_tg_gw]

  gateway      = ibm_tg_gateway.mac_tg_gw.id
  network_type = "vpc"
  name         = "${var.vpc_name}-vpc-conn"
  network_id   = var.resource_crn
}

Debug Output

module.vpc_support.module.transit_gateway[0].ibm_resource_tag.tag: Creation complete after 4s [id=crn:v1:bluemix:public:transit:us-east:a/3c24cb272ca44aa1ac9f6e9490ac5ecd::gateway:abdd0781-6c87-45f9-8a42-c0aab192c872] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [10s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [20s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [30s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [40s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [50s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [1m0s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [1m10s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [1m20s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [1m30s elapsed] module.vpc_support.module.transit_gateway[0].ibm_tg_connection.vpc_tg_connection: Still creating... [1m40s elapsed] Error: [ERROR] Create Transit Gateway connection err The requested network is already connected to an existing transit gateway.

Panic Output

n/a

Expected Behavior

201 should have been detected and succeeded.
Or should have passed successfully.

Actual Behavior

Error: [ERROR] Create Transit Gateway connection err The requested network is already connected to an existing transit gateway.
{
    "StatusCode": 409,
    "Headers": {
        "Cache-Control": [
            "no-cache,no-store,must-revalidate"
        ],
        "Cf-Cache-Status": [
            "DYNAMIC"
        ],
        "Cf-Ray": [
            "89cceaf62ffc452c-ATL"
        ],
        "Content-Length": [
            "246"
        ],
        "Content-Type": [
            "application/json; charset=utf-8"
        ],
        "Date": [
            "Tue, 02 Jul 2024 07:28:19 GMT"
        ],
        "Server": [
            "cloudflare"
        ],
        "Strict-Transport-Security": [
            "max-age=31536000; includeSubDomains; preload"
        ],
        "Transaction-Id": [
            "xxxxx-6ade-4260-9806-xxxxxxxx"
        ],
        "X-Content-Type-Options": [
            "nosniff"
        ],
        "X-Correlation-Id": [
            "xxxxxxx-6ade-4260-xxxxxx-0c75a3ec7454"
        ],
        "X-Envoy-Upstream-Service-Time": [
            "5817"
        ],
        "X-Frame-Options": [
            "DENY"
        ],
        "X-Request-Id": [
            "99d854dd-5b1f-45e1-8728-9c832e68f946"
        ],
        "X-Xss-Protection": [
            "1; mode=block"
        ]
    },
    "Result": {
        "errors": [
            {
                "code": "invalid_state",
                "message": "The requested network is already connected to an existing transit gateway.",
                "more_info": "https://cloud.ibm.com/apidocs/transit-gateway#error-handling"
            }
        ],
        "trace": "ab9497a8-6ade-4260-9806-0c75a3ec7454"
    },
    "RawResult": null
}

Steps to Reproduce

  1. terraform apply
    You may have to do this a number of times in parallel in the same account.

Important Factoids

n/a

References

n/a

  • #0000
@github-actions github-actions bot added the service/Transit Gateway Issues related to Transit Gateway label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Transit Gateway Issues related to Transit Gateway
Projects
None yet
Development

No branches or pull requests

1 participant