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

Import ibm_container_vpc_cluster is missing zones blocks #5269

Open
SRodi opened this issue Apr 11, 2024 · 0 comments
Open

Import ibm_container_vpc_cluster is missing zones blocks #5269

SRodi opened this issue Apr 11, 2024 · 0 comments
Labels
service/Kubernetes Service Issues related to Kubernetes Service Issues

Comments

@SRodi
Copy link
Contributor

SRodi commented Apr 11, 2024

Terraform import for ibm_container_vpc_cluster is failing as "zones" blocks are missing.

❯ terraform plan -generate-config-out=generated.tf
ibm_container_vpc_cluster.cluster: Preparing import... [id=c4i5focd0ltfi203fbog]
data.ibm_resource_group.resourceGroup: Reading...
ibm_container_vpc_cluster.cluster: Refreshing state... [id=c4i5focd0ltfi203fbog]
data.ibm_is_vpc.vpc: Reading...
data.ibm_resource_group.resourceGroup: Read complete after 3s [id=a9f52d88da0d41c9a0c52cd2dad7eb74]
data.ibm_is_vpc.vpc: Read complete after 8s [id=r006-f959e8c7-d35b-479e-ac7b-4df32d07c007]

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Warning: Config generation is experimental
│ 
│ Generating configuration during import is currently experimental, and the generated configuration format may change in future versions.
╵
╷
│ Error: Insufficient zones blocks
│ 
│   on generated.tf line 1:
│   (source code not available)
│ 
│ At least 1 "zones" blocks are required.

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

❯ terraform version
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.61.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.

import {
  to = ibm_container_vpc_cluster.cluster
  id = "c4i5focd0ltfi203fbog"
}

Debug Output

Panic Output

Expected Behavior

The resource should be imported correctly by generating the resource configuration and the consequent Terraform apply should be successful.

Actual Behavior

The generated Terraform configuration is the following

# __generated__ by Terraform
# Please review these resources and move them into your main configuration files.

# __generated__ by Terraform
resource "ibm_container_vpc_cluster" "cluster" {
  cos_instance_crn                = null
  crk                             = null
  disable_public_service_endpoint = false
  entitlement                     = null
  flavor                          = ""
  force_delete_storage            = null
  host_pool_id                    = null
  image_security_enforcement      = true
  kms_account_id                  = null
  kms_instance_id                 = null
  kube_version                    = "4.12.51_openshift"
  name                            = "ic4v-roks-dallas-nonprod"
  operating_system                = null
  patch_version                   = null
  pod_subnet                      = "172.17.0.0/18"
  resource_group_id               = "a9f52d88da0d41c9a0c52cd2dad7eb74"
  retry_patch_version             = null
  secondary_storage               = null
  service_subnet                  = "172.21.0.0/16"
  tags                            = ["nextgen", "nonprod"]
  update_all_workers              = null
  vpc_id                          = "r006-f959e8c7-d35b-479e-ac7b-4df32d07c007"
  wait_for_worker_update          = null
  wait_till                       = null
  worker_count                    = 0
  worker_labels                   = {}
}

But the import fails with the following message

╷
│ Error: Insufficient zones blocks
│ 
│   on generated.tf line 1:
│   (source code not available)
│ 
│ At least 1 "zones" blocks are required.

Steps to Reproduce

  1. terraform plan -generate-config-out=generated.tf

Important Factoids

  • Openshift Cluster on VPC version 4.12.51_1585_openshift

References

@github-actions github-actions bot added the service/Kubernetes Service Issues related to Kubernetes Service Issues label Apr 11, 2024
@SRodi SRodi changed the title ibm_container_vpc_cluster is missing zones blocks Import ibm_container_vpc_cluster is missing zones blocks Apr 11, 2024
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