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

Error fetching the list of security groups for the VPC. #4946

Open
Aashiq-J opened this issue Nov 23, 2023 · 0 comments
Open

Error fetching the list of security groups for the VPC. #4946

Aashiq-J opened this issue Nov 23, 2023 · 0 comments
Labels
service/Kubernetes Service Issues related to Kubernetes Service Issues

Comments

@Aashiq-J
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

  • provider registry.terraform.io/ibm-cloud/ibm v1.59.0

Affected Resource(s)

  • ibm_container_vpc_cluster

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "ibm_container_vpc_cluster" "cluster" {
  depends_on                      = [null_resource.reset_api_key]
  count                           = var.ignore_worker_pool_size_changes ? 0 : 1
  name                            = var.cluster_name
  vpc_id                          = var.vpc_id
  tags                            = var.tags
  kube_version                    = local.ocp_version
  flavor                          = local.default_pool.machine_type
  entitlement                     = var.ocp_entitlement
  cos_instance_crn                = local.cos_instance_crn
  worker_count                    = local.default_pool.workers_per_zone
  resource_group_id               = var.resource_group_id
  wait_till                       = var.cluster_ready_when
  force_delete_storage            = var.force_delete_storage
  disable_public_service_endpoint = var.disable_public_endpoint
  worker_labels                   = local.default_pool.labels
  crk                             = local.default_pool.boot_volume_encryption_kms_config == null ? null : local.default_pool.boot_volume_encryption_kms_config.crk
  kms_instance_id                 = local.default_pool.boot_volume_encryption_kms_config == null ? null : local.default_pool.boot_volume_encryption_kms_config.kms_instance_id
  kms_account_id                  = local.default_pool.boot_volume_encryption_kms_config == null ? null : local.default_pool.boot_volume_encryption_kms_config.kms_account_id

  lifecycle {
    ignore_changes = [kube_version]
  }

  # default workers are mapped to the subnets that are "private"
  dynamic "zones" {
    for_each = local.default_pool.subnet_prefix != null ? var.vpc_subnets[local.default_pool.subnet_prefix] : local.default_pool.vpc_subnets
    content {
      subnet_id = zones.value.id
      name      = zones.value.zone
    }
  }

  # Apply taints to the default worker pools i.e private

  dynamic "taints" {
    for_each = var.worker_pools_taints == null ? [] : concat(var.worker_pools_taints["all"], var.worker_pools_taints["default"])
    content {
      effect = taints.value.effect
      key    = taints.value.key
      value  = taints.value.value
    }
  }

  dynamic "kms_config" {
    for_each = var.kms_config != null ? [1] : []
    content {
      crk_id           = var.kms_config.crk_id
      instance_id      = var.kms_config.instance_id
      private_endpoint = var.kms_config.private_endpoint == null ? true : var.kms_config.private_endpoint
    }
  }

  timeouts {
    # Extend create, update and delete timeout to static values.
    delete = local.delete_timeout
    create = local.create_timeout
    update = local.update_timeout
  }
}

complete code: https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc/blob/d1f05dd2037a8696bd0ac8a6c079680c99e75dbd/main.tf#L76

Debug Output

│ Error: Request failed with status code: 400, ServerErrorResponse: {"incidentID":"7a84020a-cc80-4188-a711-e419efd80f46","code":"Edbcc","description":"Error fetching the list of security groups for the VPC. Try again.","type":"BadRequest"}
│ 
│   with module.ocp_fscloud.module.fscloud.ibm_container_vpc_cluster.cluster[0],
│   on ../../main.tf line 76, in resource "ibm_container_vpc_cluster" "cluster":
│   76: resource "ibm_container_vpc_cluster" "cluster" {
│ 
╵}

Panic Output

Expected Behavior

apply without error

Actual Behavior

Cannot reproduce at will.

This provider crash happens intermittently, and is not consistent.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/Kubernetes Service Issues related to Kubernetes Service Issues label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Kubernetes Service Issues related to Kubernetes Service Issues
Projects
None yet
Development

No branches or pull requests

1 participant