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

Gateway enabled cluster recreated on every apply. #1706

Closed
grommir opened this issue Jul 19, 2020 · 2 comments
Closed

Gateway enabled cluster recreated on every apply. #1706

grommir opened this issue Jul 19, 2020 · 2 comments
Assignees

Comments

@grommir
Copy link

grommir commented Jul 19, 2020

Hi there,

I tried to create kubernetes cluster with "gateway_enabled".
Cluster created correctly but on next "terraform apply" it forces recreation.
Looks like terraform won't see "public_vlan_id" for such cluster.

Terraform Version

Terraform v0.12.28

  • provider.ibm v1.8.1

Affected Resource(s)

  • ibm_container_cluster

Terraform Configuration Files

provider "ibm" {}

variable "hardware_type" { default = "shared" }
variable "dal10_public_vlan" { default = "k8s-dal10.1pub-prod" }
variable "dal10_private_vlan" { default = "k8s-dal10.1priv-prod" }
variable "resource_group" { default = "test" }
variable "cluster_name" { default = "gateway-test-cluster" }

# gather data
data "ibm_network_vlan" "dal10_public_vlan" {
    name = var.dal10_public_vlan
}
data "ibm_network_vlan" "dal10_private_vlan" {
    name = var.dal10_private_vlan
}
data ibm_resource_group "resource_group" {
    name = var.resource_group
}
# create cluster
resource ibm_container_cluster "cluster" {
    name                        = var.cluster_name
    datacenter                  = "dal10"
    machine_type                = "u3c.2x4"
    hardware                    = var.hardware_type
    public_vlan_id              = data.ibm_network_vlan.dal10_public_vlan.id
    private_vlan_id             = data.ibm_network_vlan.dal10_private_vlan.id
    default_pool_size           = 1
    public_service_endpoint     = "true"
    private_service_endpoint    = "true"
    resource_group_id           = data.ibm_resource_group.resource_group.id
    gateway_enabled             = "true"
}

Expected Behavior

No changes. Infrastructure is up-to-date.

Actual Behavior

---
+ public_vlan_id               = "2906496" # forces replacement
---
Plan: 1 to add, 0 to change, 1 to destroy.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. terraform apply
@hkantare
Copy link
Collaborator

@hkantare hkantare assigned hkantare and Anil-CM and unassigned hkantare Jul 23, 2020
@hkantare
Copy link
Collaborator

closing the issue

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

3 participants