Open venkatmarella opened 1 year ago
@venkatmarella
I am not able to reproduce the issue.
Configuration Discovery tool was able to reverse engineer the container cluster resource with hardware
& datacenter
arguments.
resource "ibm_container_cluster" "tfer--container_cluster_poc" {
datacenter = "dal10"
default_pool_size = "1"
disk_encryption = "true"
force_delete_storage = "true"
hardware = "shared"
image_security_enforcement = "false"
kube_version = "1.23.13"
machine_type = "b3c.4x16"
name = "container-cluster-poc"
pod_subnet = "172.30.0.0/16"
private_service_endpoint = "false"
private_vlan_id = "3266033"
public_service_endpoint = "true"
public_vlan_id = "3266031"
resource_group_id = "e7bd0d0e05f94c938c578b898751a0b3"
service_subnet = "172.21.0.0/16"
tags = ["dnd", "schematicsid:us-south.workspace.iks_-_cluster_integrations.27f5ef18", "tf-int"]
update_all_workers = "false"
wait_for_worker_update = "true"
workers_info {
id = "kube-ccgm7cdd0qkvl3dr0jtg-containercl-default-000001e8"
version = "1.23.10"
}
workers_info {
id = "kube-ccgm7cdd0qkvl3dr0jtg-containercl-default-0000025a"
version = "1.23.10"
}
workers_info {
id = "kube-ccgm7cdd0qkvl3dr0jtg-containercl-default-00000325"
version = "1.23.10"
}
}
Could you please follow the below steps and let us know if the issue still persists?
terraformer version
command - If the version is lower than "v0.8.22", Get the latest one and try.~/.terraform.d/plugins/{darwin,linux}_amd64/
folder and try discovery command.Hello @anilkumarnagaraj, this is Eddie. I'm working with @venkatmarella on this. Here are the results when running terraformer version
:
➜ personal/ibm-discovery
% terraformer version
Terraformer v0.8.22
➜ personal/ibm-discovery
% ls ~/.terraform.d/plugins/darwin_arm64
terraform-provider-helm terraform-provider-ibm
➜ personal/ibm-discovery
% discovery import --services ibm_container_cluster --tags 'region:us-south' --config_name ibm_config
...
2022/11/01 15:02:01 terraform | │ Error: Missing required argument
2022/11/01 15:02:01 terraform | │
2022/11/01 15:02:01 terraform | │ on container_cluster.tf line 228, in resource "ibm_container_cluster" "tfer--management_cluster":
2022/11/01 15:02:01 terraform | │ 228: resource "ibm_container_cluster" "tfer--management_cluster" {
2022/11/01 15:02:01 terraform | │
2022/11/01 15:02:01 terraform | │ The argument "hardware" is required, but no definition was found.
2022/11/01 15:02:01 terraform | ╵
2022/11/01 15:02:01 terraform | ╷
2022/11/01 15:02:01 terraform | │ Error: Missing required argument
2022/11/01 15:02:01 terraform | │
2022/11/01 15:02:01 terraform | │ on container_cluster.tf line 228, in resource "ibm_container_cluster" "tfer--management_cluster":
2022/11/01 15:02:01 terraform | │ 228: resource "ibm_container_cluster" "tfer--management_cluster" {
2022/11/01 15:02:01 terraform | │
2022/11/01 15:02:01 terraform | │ The argument "datacenter" is required, but no definition was found.
2022/11/01 15:02:01 terraform | ╵
FAILED
Error in Importing resources: exit status 1
exit status 1
➜ personal/ibm-discovery
% ~/.terraform.d/plugins/darwin_arm64/terraform-provider-ibm --help
2022/11/01 15:05:13 IBM Cloud Provider version 1.45.1
This binary is a plugin. These are not meant to be executed directly.
Please execute the program that consumes these plugins, which will
load any plugins automatically
➜ personal/ibm-discovery
% terraform -v
Terraform v1.0.3
on darwin_arm64
Your version of Terraform is out of date! The latest version
is 1.3.3. You can update by downloading from https://www.terraform.io/downloads.html
@DrkCloudStrife
Thanks for the update.
Terraformer & provider version looks good to me.
Question: Cluster which you are trying to reverse engineer is it a free or paid one?
If it's a free cluster, Terraform provider doesn't set datacenter
and hardware
parameter in ibm_container_cluster
resource'.
@anilkumarnagaraj The clusters that we are retrieving from are paid. We originally opened a ticket with IBM Support and they directed us to this tool.
@DrkCloudStrife
We will fix the issue in Terraformer code by setting datacenter
and hardware
parameters explicitly in ibm_container_cluster, will update you by tomorrow.
@anilkumarnagaraj , any update on this?
@venkatmarella @DrkCloudStrife
Please check the below slack channel link for a fix: https://ibm-cloud-schematics.slack.com/archives/C4R15M6SZ/p1667537273181949?thread_ts=1667228816.593309&cid=C4R15M6SZ
If the error still persists, share Terraformer generated files for our debugging.
Describe the bug
We are attempting to retrieve one of our IBM container cluster services and we were pointed to this tool. During the
discovery import
attempt we encountered withError: missing required argument
where the missing arguments aredatacenter
andhardware
.To Reproduce Steps to reproduce the behavior:
Expected behavior I expect that the discovery tool would provide a list of the
IBM container clusters
that I can import to my existing terraform configuration.Screenshots