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

Plan always showing changes unless empty RKE config elements defined #19

Closed
davidarcher opened this issue May 23, 2019 · 2 comments
Closed

Comments

@davidarcher
Copy link

When defining a cluster using Rancher-launched Kubernetes on Openstack, my terraform plan always shows changes to the openstack_cloud_provider sub-objects that I haven't explicitly defined in my TF code.

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ rancher2_cluster.cluster
      rke_config.0.cloud_provider.0.openstack_cloud_provider.0.block_storage.#: "1" => "0"
      rke_config.0.cloud_provider.0.openstack_cloud_provider.0.metadata.#:      "1" => "0"
      rke_config.0.cloud_provider.0.openstack_cloud_provider.0.route.#:         "1" => "0"
      rke_config.0.network.0.weave_network_provider.#:                          "1" => "0"

To workaround this, I have to add empty objects to the TF code but this should really be handled by the provider.

resource "rancher2_cluster" "cluster" {
  name        = "${var.cluster_name}"
  description = "${var.cluster_description}"

  rke_config {
    cloud_provider {
      openstack_cloud_provider {
        global {
          ...
       }

        load_balancer {
          ...
        }

        #### WORKAROUND
        block_storage {}
        metadata {}
        route {}
      }
    }

    network {
      plugin = "weave"
      #### WORKAROUND
      weave_network_provider {
        password= ""
      }
    }
  }
}
@rawmind0
Copy link
Contributor

@davidarcher, i could reproduce this behaviour if block_storage, metadata, route and/or load_balancer are not specified in cloud_provider - openstack_cloud_provider, but not in the network section, this is working fine for me...

    network {
      plugin = "weave"
    }

cloud_provider section is fixed on PR #8

@rawmind0
Copy link
Contributor

Fix for this issue is included on new release v1.1.0

@davidarcher please, reopen issue if needed.

eatsoup pushed a commit to eatsoup/terraform-provider-rancher2 that referenced this issue Jan 6, 2021
…d corresponding documentation for timeouts.

This is specifically to resolve issue: rancher/terraform-provider-rancher2#19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants