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

ibm_container_worker_pool_zone_attachment improperly waits for disabled ALBs #1492

Closed
alanbyr5 opened this issue May 26, 2020 · 2 comments
Closed

Comments

@alanbyr5
Copy link

Terraform Version

Terraform v0.12.25

Affected Resource(s)

  • ibm_container_worker_pool_zone_attachment

Terraform Configuration Files

data "ibm_resource_group" "group" {
  name = var.ibm_resource_group
}

resource "ibm_container_cluster" "iks_cluster" {
  name              = var.cluster_name
  datacenter        = var.zone
  resource_group_id = data.ibm_resource_group.group.id
  public_service_endpoint  = "true"
  private_service_endpoint = "true"
  kube_version             = var.kube_version
  machine_type             = var.app_machine_type
  hardware                 = var.app_hardware
  private_vlan_id          = var.default_private_vlan_id
  no_subnet                = "true"

  subnet_id         = var.edge_private_subnet_id
  default_pool_size = var.app_worker_count_per_zone
  disk_encryption   = "true"
}

resource "ibm_container_worker_pool" "edge_pool" {
  worker_pool_name  = "edge"
  cluster           = ibm_container_cluster.iks_cluster.id
  resource_group_id = data.ibm_resource_group.group.id
  hardware        = var.edge_hardware
  machine_type    = var.edge_machine_type
  size_per_zone   = var.edge_worker_count_per_zone
  disk_encryption = "true"

  labels = {
    "dedicated"          = "edge"
    "kubernetes.io/role" = "edge"
  }
  depends_on = [ibm_container_cluster.iks_cluster]
}

resource "ibm_container_worker_pool_zone_attachment" "edge_pool_zone" {
  cluster           = ibm_container_cluster.iks_cluster.id
  worker_pool       = "edge"
  resource_group_id = data.ibm_resource_group.group.id
  zone            = var.zone
  private_vlan_id = var.default_private_vlan_id
  public_vlan_id  = var.edge_public_vlan_id

  depends_on = [ibm_container_worker_pool.edge_pool]
}

Expected Behavior

The outcome of the ibm_container_cluster resource is that the cluster will contain a private ALB, but that ALB will be disabled. This is because of the no_subnet = "true" flag.
The ibm_container_worker_pool_zone_attachment edge_pool_zone resource should therefore not wait for the ALB to be enabled. It will never be enabled. (i enable the ALBs later after the edge nodes are active)

Actual Behavior

ibm_container_worker_pool_zone_attachment edge_pool_zone waited for the ALB to be ready. It never became ready due to no_subnet = "true" and the terraform script eventually timed out.

Steps to Reproduce

  1. terraform apply

Important Factoids

None

References

This problem was introduced in v1.5.0 of the plugin via this ticket

@hkantare
Copy link
Collaborator

Can you please add an argument wait_till_albs to ignore the wait for albs
https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/website/docs/r/container_worker_pool_zone_attachment.html.markdown

We have some other clients who require to wait for albs for their application to works

#1372

We introduced the parameter wait_till_albs to wait for albs based on user decision..

@alanbyr5
Copy link
Author

Thanks for the quick response, i hadn't seen this new parameter.
This works.

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