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

CSS failing because CIDR Block in VPC produced by opentelekomcloud_networking_router_v2 is missing. #2602

Open
thomaswetzler opened this issue Aug 1, 2024 · 3 comments
Labels
otc-issue Blocked by OTC issues

Comments

@thomaswetzler
Copy link

Terraform provider version

terraform --version
Terraform v1.9.2
on darwin_arm64

  • provider registry.terraform.io/newrelic/newrelic v2.25.0
  • provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.36.15

Affected Resource(s)

Terraform Configuration Files

resource "opentelekomcloud_networking_router_v2" "router" {
  name             = var.name
  admin_state_up   = "true"
  external_gateway = var.internet ? "0a2228f2-7f8a-45f1-8e09-9039e1d09975" : ""
}

Debug Output/Panic Output

Error: error creating CSS cluster: Bad request with: [POST https://css.eu-de.otc.t-systems.com/v1.0/85a9edeb35004b0d980ff5116452814b/clusters], error message: {"errCode":"CSS.0001","externalMessage":"CSS.0001 : Incorrect parameters. (the cidr of vpc external is null, need to set the cidr)"}

Steps to Reproduce

Create a VPC and a subnet with terraform. Afterwards try to create a CSS with terraform or the UI. After producing the VPC with UI, everythink works! The difference is that in terraform VPC the CIDR Block is "--", the UI VPC has a CIDR Bock "192.168.0.0/16".

Expected Behavior

CSS shoud be deployed, the VPC shoud have assigned a CIDR Bock. (Subnet has it). There should be a possibility to set the CIDR within the "opentelekomcloud_networking_router_v2" resource.

Actual Behavior

No CIDR Block assigned to VPC, the CSS deployment fails with the Panic Output above.

Important Factoids

Running on eu-de

References

none

@anton-sidelnikov
Copy link
Member

Hi @thomaswetzler, yes interesting issue, by default primary cidr not assigned, but subnet with cidr attached, so I created internal issue https://jira.tsi-dev.otc-service.com/browse/BM-5659. I only can suggest you to use VPC api for CSS
https://docs.otc.t-systems.com/virtual-private-cloud/api-ref/apis/virtual_private_cloud/creating_a_vpc.html#vpc-api01-0001 and tf resource:

resource "opentelekomcloud_vpc_v1" "vpc_sec_cidr" {
  name           = "tf_vpc"
  description    = "description"
  cidr           = "192.168.0.0/16"
  secondary_cidr = "23.9.0.0/16"

  tags = {
    foo = "bar"
    key = "value"
  }
}

@anton-sidelnikov anton-sidelnikov added the otc-issue Blocked by OTC issues label Aug 5, 2024
@thomaswetzler
Copy link
Author

Hi Anton,

opentelekomcloud_vpc_v1 was my favorite for a while. Unfortunately, the resource cannot provide the router ID. I remember that I need it to create VPC routing. It is present in opentelekomcloud_networking_router_v2, but not in opentelekomcloud_vpc_v1.

BR

Thomas

@anton-sidelnikov
Copy link
Member

anton-sidelnikov commented Aug 6, 2024

Hi @thomaswetzler, but for routing there are opentelekomcloud_vpc_route_v2 and opentelekomcloud_vpc_route_table_v1, and also for some resources vpc_id equal to router_id, but i think you won't find this note in documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otc-issue Blocked by OTC issues
Projects
None yet
Development

No branches or pull requests

2 participants