https://rancher.com/ logo
s

silly-jordan-81965

05/13/2022, 7:41 AM
Im deploying a rancher2_cluster_v2 cluster and want to add cloud provider config. But receives the following error when doing that: on main.tf line 109, in resource “rancher2_cluster_v2” “k8s-sandbox-sc-mr”: │ 109: cloud_provider { │ │ Blocks of type “cloud_provider” are not expected here. My terraform code looks like this:
Copy code
rke_config {
    cloud_provider {
      name = "openstack"
      openstack_cloud_provider {
        global {
          auth_url = var.openstack_auth_url
          username = var.openstack_username
          password = var.openstack_password
          tenant_id = var.openstack_tenant_id
        }
      }
    }
    machine_global_config = <<EOF
Anyone that can point me in the right direction?
I see that this gets added into the yaml when i create a cluster manually:
Copy code
machineSelectorConfig:
      - config:
          cloud-provider-config: |-
            cloud_provider:
                name: openstack
                openstackCloudProvider:
                  global:
                    username: xxxxxxxxxxxxxx
                    password: xxxxxxxxxxxxxx
                    auth-url: <https://1.2.3.4/identity/v3>
                    tenant-id: xxxxxxxxxxxxxx
          cloud-provider-name: external
How and where do i add that in my rke_config in terraform?
c

curved-army-69172

05/16/2022, 8:03 AM
Maybe a dumb question, but I was actually trying to create a cluster via UI manually via Openstack including the external OCCM. How did you manage to get that via UI? Where did you add the external cloud provider and more importantly - did the spawned nodes receive the taints you'd want them to have until the OCCM is deployed?
105 Views