Skip to content

use_existing_network not respected using terraform on openstack #12271

Open
@mohamed-elsakhawy

Description

@mohamed-elsakhawy

What happened?

Trying to deploy k8s using kubespray on Openstack using the existing tenant network using the directives in the cluster.tfvars

use_existing_network = "true"
network_name = "NETWORK_NAME"
network_id = "NETWORK_ID"
subnet_cidr = "CIDR/24"

the tenant network exists , but terraform seems to ignore the use_existing_network , and create a new network with the name NETWORK_NAME and initiate a subnet create..etc.

What did you expect to happen?

The deployment should have used the existing network instead of creating a new network

How can we reproduce it (as minimally and precisely as possible)?

use the following variables in cluster.tfvars

use_existing_network = "true"
network_name = "NETWORK_NAME"
network_id = "NETWORK_ID"
subnet_cidr = "CIDR/24"

OS

Ubuntu 20

Version of Ansible

2.16.14

Version of Python

Python 3.10.12

Version of Kubespray (commit)

v2.27.0

Network plugin used

calico

Full inventory with variables

N/A . The error occurs in
terraform -chdir="contrib/terraform/openstack" apply -var-file=$PWD/cluster.tfvars

Command used to invoke ansible

n/a

Output of ansible run

n/a

Anything else we need to know

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ubuntu 20kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions