IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
336 stars 646 forks source link

Kmip mgmt PR #5352

Closed william8siew closed 1 month ago

william8siew commented 1 month ago

Meant as a followup to this as I do not have access to original branch owners fork

https://github.com/IBM-Cloud/terraform-provider-ibm/pull/5322

Community Note

Relates OR Closes #0000

Output from acceptance testing:

(base) wsiew@Williams-MacBook-Pro terraform-provider-ibm % make testacc TEST=./ibm/service/kms TESTARGS='-run=TestAccIBMKMS'         
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/kms -v -run=TestAccIBMKMS -timeout 700m
[WARN] Set the environment variable IBM_PROJECTS_CONFIG_APIKEY for testing IBM Projects Config resources, the tests will fail if this is not set
[WARN] Set the environment variable IBM_APPID_TENANT_ID for testing AppID resources, AppID tests will fail if this is not set
[WARN] Set the environment variable IBM_APPID_TEST_USER_EMAIL for testing AppID user resources, the tests will fail if this is not set
[WARN] Set the environment variable IBM_ORG for testing ibm_org  resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_SPACE for testing ibm_space  resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_ID1 for testing ibm_space resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_ID2 for testing ibm_space resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_IAMUSER for testing ibm_iam_user_policy resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_IAMACCOUNTID for testing ibm_iam_trusted_profile resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_IAM_SERVICE_ID for testing ibm_iam_trusted_profile_identity resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_IAM_TRUSTED_PROFILE_ID for testing ibm_iam_trusted_profile_identity resource Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_DATACENTER for testing ibm_container_cluster resource else it is set to default value 'par01'
[WARN] Set the environment variable IBM_MACHINE_TYPE for testing ibm_container_cluster resource else it is set to default value 'b3c.4x16'
[WARN] Set the environment variable IBM_CERT_CRN for testing ibm_container_alb_cert or ibm_container_ingress_secret_tls resource else it is set to default value
[WARN] Set the environment variable IBM_UPDATE_CERT_CRN for testing ibm_container_alb_cert or ibm_container_ingress_secret_tls resource else it is set to default value
[WARN] Set the environment variable IBM_SECRET_CRN for testing ibm_container_ingress_secret_opaque resource else it is set to default value
[WARN] Set the environment variable IBM_SECRET_CRN_2 for testing ibm_container_ingress_secret_opaque resource else it is set to default value
[WARN] Set the environment variable IBM_INGRESS_INSTANCE_CRN for testing ibm_container_ingress_instance resource. Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_INGRESS_INSTANCE_SECRET_GROUP_ID for testing ibm_container_ingress_instance resource. Some tests for that resource will fail if this is not set correctly
[WARN] Set the environment variable IBM_CONTAINER_REGION for testing ibm_container resources else it is set to default value 'eu-de'
[WARN] Set the environment variable IBM_CIS_INSTANCE with a VALID CIS Instance NAME for testing ibm_cis resources on staging/test
[WARN] Set the environment variable IBM_CIS_DOMAIN_STATIC with the Domain name registered with the CIS instance on test/staging. Domain must be predefined in CIS to avoid CIS billing costs due to domain delete/create
[WARN] Set the environment variable IBM_CIS_DOMAIN_TEST with a VALID Domain name for testing the one time create and delete of a domain in CIS. Note each create/delete will trigger a monthly billing instance. Only to be run in staging/test
[WARN] Set the environment variable IBM_CIS_RESOURCE_GROUP with the resource group for the CIS Instance 
[WARN] Set the environment variable IBM_COS_CRN with a VALID COS instance CRN for testing ibm_cos_* resources
[WARN] Set the environment variable IBM_COS_Bucket_CRN with a VALID BUCKET CRN for testing ibm_cos_bucket* resources
[WARN] Set the environment variable IBM_COS_BUCKET_NAME with a VALID BUCKET Name for testing ibm_cos_bucket* resources
[WARN] Set the environment variable IBM_COS_NAME with a VALID COS instance name for testing resources with cos deps
[WARN] Set the environment variable IBM_TRUSTED_MACHINE_TYPE for testing ibm_container_cluster resource else it is set to default value 'mb1c.16x64'
[WARN] Set the environment variable IBM_BM_EXTENDED_HW_TESTING to true/false for testing ibm_compute_bare_metal resource else it is set to default value 'false'
[WARN] Set the environment variable IBM_PUBLIC_VLAN_ID for testing ibm_container_cluster resource else it is set to default value '2393319'
[WARN] Set the environment variable IBM_PRIVATE_VLAN_ID for testing ibm_container_cluster resource else it is set to default value '2393321'
[WARN] Set the environment variable IBM_KUBE_VERSION for testing ibm_container_cluster resource else it is set to default value '1.18.14'
[WARN] Set the environment variable IBM_KUBE_UPDATE_VERSION for testing ibm_container_cluster resource else it is set to default value '1.19.6'
[WARN] Set the environment variable IBM_PRIVATE_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1636107'
[WARN] Set the environment variable IBM_PUBLIC_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1165645'
[WARN] Set the environment variable IBM_SUBNET_ID for testing ibm_container_cluster resource else it is set to default value '1165645'
[INFO] Set the environment variable IBM_IPSEC_DATACENTER for testing ibm_ipsec_vpn resource else it is set to default value 'tok02'
[INFO] Set the environment variable IBM_IPSEC_CUSTOMER_SUBNET_ID for testing ibm_ipsec_vpn resource else it is set to default value '123456'
[INFO] Set the environment variable IBM_IPSEC_CUSTOMER_PEER_IP for testing ibm_ipsec_vpn resource else it is set to default value '192.168.0.1'
[WARN] Set the environment variable IBM_LBAAS_DATACENTER for testing ibm_lbaas resource else it is set to default value 'dal13'
[WARN] Set the environment variable IBM_LBAAS_SUBNETID for testing ibm_lbaas resource else it is set to default value '2144241'
[WARN] Set the environment variable IBM_LB_LISTENER_CERTIFICATE_INSTANCE for testing ibm_is_lb_listener resource for https redirect else it is set to default value 'crn:v1:staging:public:cloudcerts:us-south:a/2d1bace7b46e4815a81e52c6ffeba5cf:af925157-b125-4db2-b642-adacb8b9c7f5:certificate:c81627a1bf6f766379cc4b98fd2a44ed'
[WARN] Set the environment variable IBM_DEDICATED_HOSTNAME for testing ibm_compute_vm_instance resource else it is set to default value 'terraform-dedicatedhost'
[WARN] Set the environment variable IBM_DEDICATED_HOST_ID for testing ibm_compute_vm_instance resource else it is set to default value '30301'
[WARN] Set the environment variable IBM_WORKER_POOL_ZONE for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value 'ams03'
[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_PRIVATE_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2538975'
[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_PUBLIC_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2538967'
[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_UPDATE_PRIVATE_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2388377'
[WARN] Set the environment variable IBM_WORKER_POOL_ZONE_UPDATE_PUBLIC_VLAN for testing ibm_container_worker_pool_zone_attachment resource else it is set to default value '2388375'
[WARN] Set the environment variable IBM_WORKER_POOL_SECONDARY_STORAGE for testing secondary_storage attachment to IKS workerpools
[WARN] Set the environment variable IBM_PLACEMENT_GROUP_NAME for testing ibm_compute_vm_instance resource else it is set to default value 'terraform-group'
[INFO] Set the environment variable SL_REGION for testing ibm_is_region datasource else it is set to default value 'us-south'
[INFO] Set the environment variable SL_ZONE for testing ibm_is_zone datasource else it is set to default value 'us-south-1'
[INFO] Set the environment variable SL_ZONE_2 for testing ibm_is_zone datasource else it is set to default value 'us-south-2'
[INFO] Set the environment variable SL_ZONE_3 for testing ibm_is_zone datasource else it is set to default value 'us-south-3'
[INFO] Set the environment variable SL_CIDR for testing ibm_is_subnet else it is set to default value '10.240.0.0/24'
[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_subnet else it is set to default value '10.240.64.0/24'
[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_subnet else it is set to default value '10.240.64.0/24'
[INFO] Set the environment variable SL_CIDR_2 for testing ibm_is_instance datasource else it is set to default value './test-fixtures/.ssh/pkcs8_rsa.pub'
[INFO] Set the environment variable IS_PRIVATE_SSH_KEY_PATH for testing ibm_is_instance datasource else it is set to default value './test-fixtures/.ssh/pkcs8_rsa'
[INFO] Set the environment variable SL_RESOURCE_GROUP_ID for testing with different resource group id else it is set to default value 'c01d34dff4364763476834c990398zz8'
[INFO] Set the environment variable IS_RESOURCE_CRN for testing with created resource instance
[INFO] Set the environment variable IS_IMAGE for testing ibm_is_instance, ibm_is_floating_ip else it is set to default value 'r006-907911a7-0ffe-467e-8821-3cc9a0d82a39'
[INFO] Set the environment variable IS_IMAGE2 for testing ibm_is_instance, ibm_is_floating_ip else it is set to default value 'r134-f47cc24c-e020-4db5-ad96-1e5be8b5853b'
[INFO] Set the environment variable IS_WIN_IMAGE for testing ibm_is_instance data source else it is set to default value 'r006-d2e0d0e9-0a4f-4c45-afd7-cab787030776'
[INFO] Set the environment variable IS_COS_BUCKET_NAME for testing ibm_is_image_export_job else it is set to default value 'bucket-27200-lwx4cfvcue'
[INFO] Set the environment variable IS_COS_BUCKET_CRN for testing ibm_is_image_export_job else it is set to default value 'bucket-27200-lwx4cfvcue'
[INFO] Set the environment variable IS_INSTANCE_NAME for testing ibm_is_instance resource else it is set to default value 'instance-01'
[INFO] Set the environment variable IS_BACKUP_POLICY_JOB_ID for testing ibm_is_backup_policy_job datasource
[INFO] Set the environment variable IS_BACKUP_POLICY_ID for testing ibm_is_backup_policy_jobs datasource
[INFO] Set the environment variable IS_REMOTE_CP_BAAS_ENCRYPTION_KEY_CRN for testing remote_copies_policy with Baas plans, else it is set to default value, 'crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179'
[INFO] Set the environment variable SL_INSTANCE_PROFILE for testing ibm_is_instance resource else it is set to default value 'cx2-2x4'
[INFO] Set the environment variable SL_KMS_INSTANCE_ID for testing ibm_kms_key resource else it is set to default value '30222bb5-1c6d-3834-8d78-ae6348cf8z61'
[INFO] Set the environment variable SL_KMS_KEY_NAME for testing ibm_kms_key resource else it is set to default value 'tfp-test-key'
[INFO] Set the environment variable SL_INSTANCE_PROFILE_UPDATE for testing ibm_is_instance resource else it is set to default value 'cx2-4x8'
[INFO] Set the environment variable IS_BARE_METAL_SERVER_PROFILE for testing ibm_is_bare_metal_server resource else it is set to default value 'bx2-metal-96x384'
[INFO] Set the environment variable IsBareMetalServerImage for testing ibm_is_bare_metal_server resource else it is set to default value 'r006-2d1f36b0-df65-4570-82eb-df7ae5f778b1'
[INFO] Set the environment variable IS_DNS_INSTANCE_CRN for testing ibm_is_lb resource else it is set to default value 'crn:v1:staging:public:dns-svcs:global:a/efe5afc483594adaa8325e2b4d1290df:82df2e3c-53a5-43c6-89ce-dcf78be18668::'
[INFO] Set the environment variable IS_DNS_INSTANCE_CRN1 for testing ibm_is_lb resource else it is set to default value 'crn:v1:staging:public:dns-svcs:global:a/efe5afc483594adaa8325e2b4d1290df:599ae4aa-c554-4a88-8bb2-b199b9a3c046::'
[INFO] Set the environment variable IS_DNS_ZONE_ID for testing ibm_is_lb resource else it is set to default value 'dd501d1d-490b-4bb4-a05d-a31954a1c59e'
[INFO] Set the environment variable IS_DNS_ZONE_ID_1 for testing ibm_is_lb resource else it is set to default value 'b1def78d-51b3-4ea5-a746-1b64c992fcab'
[INFO] Set the environment variable IS_DEDICATED_HOST_NAME for testing ibm_is_instance resource else it is set to default value 'tf-dhost-01'
[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_ID for testing ibm_is_instance resource else it is set to default value '0717-9104e7b5-77ad-44ad-9eaa-091e6b6efce1'
[INFO] Set the environment variable IS_DEDICATED_HOST_PROFILE for testing ibm_is_instance resource else it is set to default value 'bx2d-host-152x608'
[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_CLASS for testing ibm_is_instance resource else it is set to default value 'bx2d'
[INFO] Set the environment variable IS_DEDICATED_HOST_GROUP_FAMILY for testing ibm_is_instance resource else it is set to default value 'balanced'
[INFO] Set the environment variable SL_INSTANCE_PROFILE for testing ibm_is_instance resource else it is set to default value 'bx2d-16x64'
[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value 'tier-3iops'
[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value
[INFO] Set the environment variable IS_SHARE_PROFILE for testing ibm_is_instance resource else it is set to default value
[INFO] Set the environment variable IS_VOLUME_PROFILE for testing ibm_is_volume_profile else it is set to default value 'general-purpose'
[INFO] Set the environment variable IS_VIRTUAL_NETWORK_INTERFACE for testing ibm_is_virtual_network_interface else it is set to default value 'c93dc4c6-e85a-4da2-9ea6-f24576256122'
[INFO] Set the environment variable IS_UNATTACHED_BOOT_VOLUME_NAME for testing ibm_is_image else it is set to default value 'r006-1cbe9f0a-7101-4d25-ae72-2a2d725e530e'
[INFO] Set the environment variable IS_VSI_DATA_VOLUME_ID for testing ibm_is_image else it is set to default value 'r006-1cbe9f0a-7101-4d25-ae72-2a2d725e530e'
[INFO] Set the environment variable SL_ROUTE_NEXTHOP else it is set to default value '10.0.0.4'
[INFO] Set the environment variable ISSnapshotCRN for ibm_is_snapshot resource else it is set to default value 'crn:v1:bluemix:public:is:ca-tor:a/xxxxxxxx::snapshot:xxxx-xxxxc-xxx-xxxx-xxxx-xxxxxxxxxx'
[INFO] Set the environment variable ICD_DB_DEPLOYMENT_ID for testing ibm_cloud_databases else it is set to default value 'crn:v1:bluemix:public:databases-for-redis:au-syd:a/40ddc34a953a8c02f10987b59085b60e:5042afe1-72c2-4231-89cc-c949e5d56251::'
[INFO] Set the environment variable ICD_DB_BACKUP_ID for testing ibm_cloud_databases else it is set to default value 'crn:v1:bluemix:public:databases-for-redis:au-syd:a/40ddc34a953a8c02f10987b59085b60e:5042afe1-72c2-4231-89cc-c949e5d56251:backup:0d862fdb-4faa-42e5-aecb-5057f4d399c3'
[INFO] Set the environment variable ICD_DB_TASK_ID for testing ibm_cloud_databases else it is set to default value 'crn:v1:bluemix:public:databases-for-redis:au-syd:a/40ddc34a953a8c02f10987b59085b60e:367b0a22-05bb-41e3-a1ed-ded1ff0889e5:task:882013a6-2751-4df7-a77a-98d258638704'
[INFO] Set the environment variable PI_IMAGE for testing ibm_pi_image resource else it is set to default value '7200-03-03'
[INFO] Set the environment variable PI_SAP_IMAGE for testing ibm_pi_image resource else it is set to default value 'Linux-RHEL-SAP-8-2'
[INFO] Set the environment variable PI_IMAGE_BUCKET_NAME for testing ibm_pi_image resource else it is set to default value 'images-public-bucket'
[INFO] Set the environment variable PI_IMAGE_BUCKET_FILE_NAME for testing ibm_pi_image resource else it is set to default value 'rhel.ova.gz'
[INFO] Set the environment variable PI_IMAGE_BUCKET_ACCESS_KEY for testing ibm_pi_image_export resource else it is set to default value 'images-bucket-access-key'
[INFO] Set the environment variable PI_IMAGE_BUCKET_SECRET_KEY for testing ibm_pi_image_export resource else it is set to default value 'PI_IMAGE_BUCKET_SECRET_KEY'
[INFO] Set the environment variable PI_IMAGE_BUCKET_REGION for testing ibm_pi_image_export resource else it is set to default value 'us-east'
[INFO] Set the environment variable PI_KEY_NAME for testing ibm_pi_key_name resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_NETWORK_NAME for testing ibm_pi_network_name resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_NAME for testing ibm_pi_network_name resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_ID for testing ibm_pi_volume_flash_copy_mappings resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_REPLICATION_VOLUME_NAME for testing ibm_pi_volume resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_ONBARDING_SOURCE_CRN for testing ibm_pi_volume_onboarding resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_AUXILIARY_VOLUME_NAME for testing ibm_pi_volume_onboarding resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_GROUP_NAME for testing ibm_pi_volume_group resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_GROUP_ID for testing ibm_pi_volume_group_storage_details data source else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_VOLUME_ONBOARDING_ID for testing ibm_pi_volume_onboarding resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_CLOUDINSTANCE_ID for testing ibm_pi_image resource else it is set to default value 'd16705bd-7f1a-48c9-9e0e-1c17b71e7331'
[INFO] Set the environment variable PI_SNAPSHOT_ID for testing ibm_pi_instance_snapshot data source else it is set to default value '1ea33118-4c43-4356-bfce-904d0658de82'
[INFO] Set the environment variable PI_PVM_INSTANCE_ID for testing Pi_instance_name resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_DHCP_ID for testing ibm_pi_dhcp resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_CLOUD_CONNECTION_NAME for testing ibm_pi_cloud_connection resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_SAP_PROFILE_ID for testing ibm_pi_sap_profile resource else it is set to default value 'terraform-test-power'
[WARN] Set the environment variable PI_PLACEMENT_GROUP_NAME for testing ibm_pi_placement_group resource else it is set to default value 'tf-pi-placement-group'
[WARN] Set the environment variable PI_SPP_PLACEMENT_GROUP_ID for testing ibm_pi_spp_placement_group resource else it is set to default value 'tf-pi-spp-placement-group'
[INFO] Set the environment variable PI_STORAGE_POOL for testing ibm_pi_storage_pool_capacity else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_STORAGE_TYPE for testing ibm_pi_storage_type_capacity else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_CAPTURE_STORAGE_IMAGE_PATH for testing Pi_capture_storage_image_path resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_CAPTURE_CLOUD_STORAGE_ACCESS_KEY for testing Pi_capture_cloud_storage_access_key resource else it is set to default value 'terraform-test-power'
[INFO] Set the environment variable PI_CAPTURE_CLOUD_STORAGE_SECRET_KEY for testing Pi_capture_cloud_storage_secret_key resource else it is set to default value 'terraform-test-power'
[WARN] Set the environment variable PI_SHARED_PROCESSOR_POOL_ID for testing ibm_pi_shared_processor_pool resource else it is set to default value 'tf-pi-shared-processor-pool'
[INFO] Set the environment variable PI_TARGET_STORAGE_TIER for testing Pi_target_storage_tier resource else it is set to default value 'terraform-test-tier'
[INFO] Set the environment variable PI_VOLUME_CLONE_TASK_ID for testing Pi_volume_clone_task_id resource else it is set to default value 'terraform-test-volume-clone-task-id'
[WARN] Set the environment variable PI_RESOURCE_GROUP_ID for testing ibm_pi_workspace resource else it is set to default value ''
[INFO] Set the environment variable SCHEMATICS_WORKSPACE_ID for testing schematics resources else it is set to default value
[INFO] Set the environment variable SCHEMATICS_TEMPLATE_ID for testing schematics resources else it is set to default value
[INFO] Set the environment variable SCHEMATICS_ACTION_ID for testing schematics resources else it is set to default value
[INFO] Set the environment variable SCHEMATICS_JOB_ID for testing schematics resources else it is set to default value
[INFO] Set the environment variable SCHEMATICS_REPO_URL for testing schematics resources else tests will fail if this is not set correctly
[INFO] Set the environment variable SCHEMATICS_REPO_BRANCH for testing schematics resources else tests will fail if this is not set correctly
[WARN] Set the environment variable IMAGE_COS_URL with a VALID COS Image SQL URL for testing ibm_is_image resources on staging/test
[WARN] Set the environment variable IS_DELEGATED_VPC with a VALID created vpc name for testing ibm_is_vpc data source on staging/test
[WARN] Set the environment variable IMAGE_COS_URL_ENCRYPTED with a VALID COS Image SQL URL for testing ibm_is_image resources on staging/test
[WARN] Set the environment variable IMAGE_OPERATING_SYSTEM with a VALID Operating system for testing ibm_is_image resources on staging/test
[INFO] Set the environment variable IS_IMAGE_NAME for testing data source ibm_is_image else it is set to default value `ibm-ubuntu-18-04-1-minimal-amd64-2`
[INFO] Set the environment variable IS_IMAGE_ENCRYPTED_DATA_KEY for testing resource ibm_is_image else it is set to default value
[INFO] Set the environment variable IS_IMAGE_ENCRYPTION_KEY for testing resource ibm_is_image else it is set to default value
[INFO] Set the environment variable IBM_FUNCTION_NAMESPACE for testing ibm_function_package, ibm_function_action, ibm_function_rule, ibm_function_trigger resource else  tests will fail if this is not set correctly
[INFO] Set the environment variable HPCS_INSTANCE_ID for testing data_source_ibm_kms_key_test else it is set to default value
[INFO] Set the environment variable SECRETS_MANAGER_INSTANCE_ID for testing Secrets Manager's tests else tests will fail if this is not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_INSTANCE_REGION for testing Secrets Manager's tests else tests will fail if this is not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_EN_INSTANCE_CRN for testing Event Notifications for Secrets Manager tests else tests will fail if this is not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_EN_INSTANCE_CRN for testing IAM Credentials secret's tests else tests will assume that IAM Credentials engine is already configured and fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_IAM_CREDENTIALS_SECRET_SERVICE_ID or SECRETS_MANAGER_IAM_CREDENTIALS_SECRET_ACCESS_GROUP for testing IAM Credentials secret's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CERTIFICATE_LETS_ENCRYPT_ENVIRONMENT for testing public certificate's tests, else it is set to default value ('production'). For public certificate's tests, tests will fail if this is not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CERTIFICATE_LETS_ENCRYPT_PRIVATE_KEY for testing public certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CERTIFICATE_COMMON_NAME for testing public certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_VALIDATE_MANUAL_DNS_CIS_ZONE_ID for testing validate manual dns' test, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CERTIFICATE_CIS_CRN for testing public certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CLASSIC_INFRASTRUCTURE_USERNAME for testing public certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_PUBLIC_CLASSIC_INFRASTRUCTURE_PASSWORD for testing public certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_IMPORTED_CERTIFICATE_PATH_TO_CERTIFICATE for testing imported certificate's tests, else tests fail if not set correctly
[INFO] Set the environment variable SECRETS_MANAGER_SERVICE_CREDENTIALS_COS_CRN for testing service credentials' tests, else tests fail if not set correctly
[INFO] Set the environment variable IBM_TG_CROSS_ACCOUNT_API_KEY for testing ibm_tg_connection resource else  tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_TG_CROSS_ACCOUNT_ID for testing ibm_tg_connection resource else  tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_TG_CROSS_NETWORK_ID for testing ibm_tg_connection resource else  tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_TG_POWER_VS_NETWORK_ID for testing ibm_tg_connection resource else tests will fail if this is not set correctly
[INFO] Set the environment variable ACCOUNT_TO_BE_IMPORTED for testing import enterprise account resource else  tests will fail if this is not set correctly
[INFO] Set the environment variable COS_BUCKET for testing CRUD operations on billing snapshot configuration APIs
[INFO] Set the environment variable COS_LOCATION for testing CRUD operations on billing snapshot configuration APIs
[INFO] Set the environment variable COS_BUCKET_UPDATE for testing update operation on billing snapshot configuration API
[INFO] Set the environment variable COS_LOCATION_UPDATE for testing update operation on billing snapshot configuration API
[INFO] Set the environment variable COS_REPORTS_FOLDER for testing CRUD operations on billing snapshot configuration APIs
[INFO] Set the environment variable SNAPSHOT_DATE_FROM for testing CRUD operations on billing snapshot configuration APIs
[INFO] Set the environment variable SNAPSHOT_DATE_TO for testing CRUD operations on billing snapshot configuration APIs
[INFO] Set the environment variable SNAPSHOT_MONTH for testing CRUD operations on billing snapshot configuration APIs
[WARN] Set the environment variable IBM_HPCS_ADMIN1 with a VALID HPCS Admin Key1 Path
[WARN] Set the environment variable IBM_HPCS_TOKEN1 with a VALID token for HPCS Admin Key1
[WARN] Set the environment variable IBM_HPCS_ADMIN2 with a VALID HPCS Admin Key2 Path
[WARN] Set the environment variable IBM_IAM_REALM_NAME with a VALID realm name for iam trusted profile claim rule
[WARN] Set the environment variable IBM_IAM_IKS_SA with a VALID realm name for iam trusted profile link
[WARN] Set the environment variable IBM_HPCS_TOKEN2 with a VALID token for HPCS Admin Key2
[WARN] Set the environment variable IBM_HPCS_ROOTKEY_CRN with a VALID CRN for a root key created in the HPCS instance
[INFO] Set the environment variable IBM_CLOUD_SHELL_ACCOUNT_ID for ibm-cloud-shell resource or datasource else tests will fail if this is not set correctly
[WARN] Set the environment variable IBM_CLUSTER_VPC_ID for testing ibm_container_vpc_alb_create resources, ibm_container_vpc_alb_create tests will fail if this is not set
[WARN] Set the environment variable IBM_CLUSTER_VPC_SUBNET_ID for testing ibm_container_vpc_alb_create resources, ibm_container_vpc_alb_creates tests will fail if this is not set
[WARN] Set the environment variable IBM_CLUSTER_VPC_RESOURCE_GROUP_ID for testing ibm_container_vpc_alb_create resources, ibm_container_vpc_alb_creates tests will fail if this is not set
[INFO] Set the environment variable IBM_CONTAINER_CLUSTER_NAME for ibm_container_nlb_dns resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable SATELLITE_LOCATION_ID for ibm_cos_bucket satellite location resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable SATELLITE_RESOURCE_INSTANCE_ID for ibm_cos_bucket satellite location resource or datasource else tests will fail if this is not set correctly
[WARN] Set the environment variable IBMCLOUD_SCC_INSTANCE_ID with a VALID SCC INSTANCE ID
[WARN] Set the environment variable IBMCLOUD_SCC_API_ENDPOINT with a VALID SCC API ENDPOINT
[WARN] Set the environment variable IBMCLOUD_SCC_REPORT_ID with a VALID SCC REPORT ID
[WARN] Set the environment variable IBMCLOUD_SCC_PROVIDER_TYPE_ATTRIBUTES with a VALID SCC PROVIDER TYPE ATTRIBUTE
[WARN] Set the environment variable IBMCLOUD_SCC_PROVIDER_TYPE_ID with a VALID SCC PROVIDER TYPE ID
[WARN] Set the environment variable IBMCLOUD_SCC_EVENT_NOTIFICATION_CRN
[WARN] Set the environment variable IBMCLOUD_SCC_OBJECT_STORAGE_CRN with a valid cloud object storage crn
[WARN] Set the environment variable IBMCLOUD_SCC_OBJECT_STORAGE_BUCKET with a valid cloud object storage bucket
[INFO] Set the environment variable IBM_CONTAINER_DEDICATEDHOST_POOL_ID for ibm_container_vpc_cluster resource to test dedicated host functionality
[INFO] Set the environment variable IBM_KMS_INSTANCE_ID for ibm_container_vpc_cluster resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_CRK_ID for ibm_container_vpc_cluster resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_KMS_ACCOUNT_ID for ibm_container_vpc_cluster resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_CLUSTER_ID for ibm_container_vpc_worker_pool resource or datasource else tests will fail if this is not set correctly
[WARN] Set the environment variable IBM_CD_RESOURCE_GROUP_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_APPCONFIG_INSTANCE_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_KEYPROTECT_INSTANCE_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SECRETSMANAGER_INSTANCE_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SLACK_CHANNEL_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SLACK_TEAM_NAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SLACK_WEBHOOK for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_JIRA_PROJECT_KEY for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_JIRA_API_URL for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_JIRA_USERNAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_JIRA_API_TOKEN for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SAUCELABS_ACCESS_KEY for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_SAUCELABS_USERNAME for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_BITBUCKET_REPO_URL for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_GITHUB_CONSOLIDATED_REPO_URL for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_GITLAB_REPO_URL for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_HOSTED_GIT_REPO_URL for testing CD resources, CD tests will fail if this is not set
[WARN] Set the environment variable IBM_CD_EVENTNOTIFICATIONS_INSTANCE_NAME for testing CD resources, CD tests will fail if this is not set
[INFO] Set the environment variable IS_CERTIFICATE_CRN for testing ibm_is_vpn_server resource
[INFO] Set the environment variable IS_CLIENT_CA_CRN for testing ibm_is_vpn_server resource
[INFO] Set the environment variable IBM_AccountID_REPL for setting up authorization policy to enable replication feature resource or datasource else tests will fail if this is not set correctly
[WARN] Set the environment variable COS_API_KEY for testing COS targets, the tests will fail if this is not set
[WARN] Set the environment variable INGESTION_KEY for testing Logdna targets, the tests will fail if this is not set
[WARN] Set the environment variable IES_API_KEY for testing Event streams targets, the tests will fail if this is not set
[WARN] Set the environment variable ENTERPRISE_CRN for testing enterprise backup policy, the tests will fail if this is not set
[WARN] Set the environment variable IBM_CODE_ENGINE_RESOURCE_GROUP_ID with the resource group for Code Engine
[WARN] Set the environment variable IBM_CODE_ENGINE_PROJECT_INSTANCE_ID with the ID of a Code Engine project instance
[WARN] Set the environment variable IBM_CODE_ENGINE_SERVICE_INSTANCE_ID with the ID of a IBM Cloud service instance, e.g. for COS
[WARN] Set the environment variable IBM_CODE_ENGINE_RESOURCE_KEY_ID with the ID of a resource key to access a service instance
[WARN] Set the environment variable IBM_CODE_ENGINE_DOMAIN_MAPPING_NAME with the name of a domain mapping
[WARN] Set the environment variable IBM_CODE_ENGINE_TLS_CERT with the TLS certificate in base64 format
[WARN] Set the environment variable IBM_CODE_ENGINE_TLS_KEY with a TLS key in base64 format
[WARN] Set the environment variable IBM_SATELLITE_SSH_PUB_KEY with a ssh public key or ibm_satellite_* tests may fail
[INFO] Set the environment variable IBMCLOUD_MQCLOUD_CONFIG_ENDPOINT for ibm_mqcloud service else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_INSTANCE_ID for ibm_mqcloud_queue_manager resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_QUEUEMANAGER_ID for ibm_mqcloud_queue_manager resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_KS_CERT_PATH for ibm_mqcloud_keystore_certificate resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_TS_CERT_PATH for ibm_mqcloud_truststore_certificate resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_QUEUEMANAGER_LOCATION for ibm_mqcloud_queue_manager resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_QUEUEMANAGER_VERSION for ibm_mqcloud_queue_manager resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBM_MQCLOUD_QUEUEMANAGER_VERSIONUPDATE for ibm_mqcloud_queue_manager resource or datasource else tests will fail if this is not set correctly
[INFO] Set the environment variable IBMCLOUD_LOGS_SERVICE_INSTANCE_ID for testing cloud logs related operations
[INFO] Set the environment variable IBMCLOUD_LOGS_SERVICE_INSTANCE_REGION for testing cloud logs related operations
[INFO] Set the environment variable IBMCLOUD_LOGS_SERVICE_EVENT_NOTIFICATIONS_INSTANCE_ID for testing cloud logs related operations
[INFO] Set the environment variable IBMCLOUD_LOGS_SERVICE_EVENT_NOTIFICATIONS_INSTANCE_REGION for testing cloud logs related operations
[WARN] Set the environment variable IBM_PAG_COS_INSTANCE_NAME for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_COS_BUCKET_NAME for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_COS_BUCKET_REGION for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_VPC_NAME for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_SERVICE_PLAN for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_VPC_SUBNET_INS_1 for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_VPC_SUBNET_INS_2 for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_VPC_SUBNET_INS_2 for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_PAG_VPC_SUBNET_INS_2 for testing IBM PAG resource, the tests will fail if this is not set
[WARN] Set the environment variable IBM_VMAAS_DS_ID for testing ibm_vmaas_vdc resource else tests will fail if this is not set correctly
[WARN] Set the environment variable IBM_VMAAS_DS_PVDC_ID for testing ibm_vmaas_vdc resource else tests will fail if this is not set correctly
=== RUN   TestAccIBMKMSDataSourceKeyPolicy_basicNew
--- PASS: TestAccIBMKMSDataSourceKeyPolicy_basicNew (42.74s)
=== RUN   TestAccIBMKMSKeyRingDataSource_basic
--- PASS: TestAccIBMKMSKeyRingDataSource_basic (58.75s)
=== RUN   TestAccIBMKMSKeyDataSource_basic
--- PASS: TestAccIBMKMSKeyDataSource_basic (41.40s)
=== RUN   TestAccIBMKMSKeyDataSource_description
--- PASS: TestAccIBMKMSKeyDataSource_description (41.90s)
=== RUN   TestAccIBMKMSKeyDataSource_Key
--- PASS: TestAccIBMKMSKeyDataSource_Key (44.21s)
=== RUN   TestAccIBMKMSKeyDataSourceHPCS_basic
    data_source_ibm_kms_key_test.go:77: 
--- SKIP: TestAccIBMKMSKeyDataSourceHPCS_basic (0.00s)
=== RUN   TestAccIBMKMSDataSource_basic
--- PASS: TestAccIBMKMSDataSource_basic (40.02s)
=== RUN   TestAccIBMKMSHPCSDataSource_basic
    data_source_ibm_kms_keys_test.go:36: 
--- SKIP: TestAccIBMKMSHPCSDataSource_basic (0.00s)
=== RUN   TestAccIBMKMSKeyDataSource_Keys
--- PASS: TestAccIBMKMSKeyDataSource_Keys (47.78s)
=== RUN   TestAccIBMKMSKMIPAdapterDataSource_basic
--- PASS: TestAccIBMKMSKMIPAdapterDataSource_basic (57.65s)
=== RUN   TestAccIBMKMSKMIPAdaptersDataSource_basic
--- PASS: TestAccIBMKMSKMIPAdaptersDataSource_basic (57.91s)
=== RUN   TestAccIBMKMSKMIPClientCertDataSource_basic
--- PASS: TestAccIBMKMSKMIPClientCertDataSource_basic (67.68s)
=== RUN   TestAccIBMKMSKMIPClientCertsDataSource_basic
--- PASS: TestAccIBMKMSKMIPClientCertsDataSource_basic (58.63s)
=== RUN   TestAccIBMKMSKMIPObjectDataSource_basic
--- PASS: TestAccIBMKMSKMIPObjectDataSource_basic (32.46s)
=== RUN   TestAccIBMKMSKMIPObjectsDataSource_basic
--- PASS: TestAccIBMKMSKMIPObjectsDataSource_basic (61.18s)
=== RUN   TestAccIBMKMSInstancePolicy_basic_check
--- PASS: TestAccIBMKMSInstancePolicy_basic_check (47.58s)
=== RUN   TestAccIBMKMSInstancePolicy_rotation_check
--- PASS: TestAccIBMKMSInstancePolicy_rotation_check (35.59s)
=== RUN   TestAccIBMKMSInstancePolicy_dualAuth_check
--- PASS: TestAccIBMKMSInstancePolicy_dualAuth_check (36.14s)
=== RUN   TestAccIBMKMSInstancePolicy_metrics_check
--- PASS: TestAccIBMKMSInstancePolicy_metrics_check (35.27s)
=== RUN   TestAccIBMKMSInstancePolicy_kcia_check
--- PASS: TestAccIBMKMSInstancePolicy_kcia_check (34.28s)
=== RUN   TestAccIBMKMSInstancePolicy_kcia_attributes_check
--- PASS: TestAccIBMKMSInstancePolicy_kcia_attributes_check (35.57s)
=== RUN   TestAccIBMKMSInstancePolicyWithKey
--- PASS: TestAccIBMKMSInstancePolicyWithKey (42.94s)
=== RUN   TestAccIBMKMSInstancePolicy_invalid_interval_check
--- PASS: TestAccIBMKMSInstancePolicy_invalid_interval_check (0.47s)
=== RUN   TestAccIBMKMSResource_Key_Alias_Name
--- PASS: TestAccIBMKMSResource_Key_Alias_Name (44.86s)
=== RUN   TestAccIBMKMSResource_Key_Alias_Duplicate
--- PASS: TestAccIBMKMSResource_Key_Alias_Duplicate (35.25s)
=== RUN   TestAccIBMKMSResource_Key_Alias_Key_Check
--- PASS: TestAccIBMKMSResource_Key_Alias_Key_Check (70.74s)
=== RUN   TestAccIBMKMSResource_Key_Alias_Key_Limit
    resource_ibm_kms_key_alias_test.go:139: Step 1/1, expected an error but got none
--- FAIL: TestAccIBMKMSResource_Key_Alias_Key_Limit (40.05s)
=== RUN   TestAccIBMKMSKeyPolicy_basic_check
--- PASS: TestAccIBMKMSKeyPolicy_basic_check (51.62s)
=== RUN   TestAccIBMKMSKeyPolicy_basic_check_enable
--- PASS: TestAccIBMKMSKeyPolicy_basic_check_enable (77.59s)
=== RUN   TestAccIBMKMSKeyPolicy_rotation_check
--- PASS: TestAccIBMKMSKeyPolicy_rotation_check (60.51s)
=== RUN   TestAccIBMKMSKeyPolicy_dualAuth_check
--- PASS: TestAccIBMKMSKeyPolicy_dualAuth_check (56.66s)
=== RUN   TestAccIBMKMSKeyPolicy_dualAuth_check_with_Alias
--- PASS: TestAccIBMKMSKeyPolicy_dualAuth_check_with_Alias (45.85s)
=== RUN   TestAccIBMKMSResource_Key_Ring_Name
--- PASS: TestAccIBMKMSResource_Key_Ring_Name (36.81s)
=== RUN   TestAccIBMKMSResource_Key_Ring_Key
--- PASS: TestAccIBMKMSResource_Key_Ring_Key (53.71s)
=== RUN   TestAccIBMKMSResource_Key_Ring_Not_Exist
--- PASS: TestAccIBMKMSResource_Key_Ring_Not_Exist (29.70s)
=== RUN   TestAccIBMKMSResource_Key_Ring_ForceDeleteFalse
    resource_ibm_kms_key_rings_test.go:78: Step 2/4, expected an error with pattern, no match on: Error running post-apply plan: exit status 1

        Error: [ERROR] No keys in instance 81db5461-af35-4114-86ec-97cd95a761c9

          with data.ibm_kms_keys.test_keys,
          on terraform_plugin_test.tf line 10, in data "ibm_kms_keys" "test_keys":
          10:           data "ibm_kms_keys" "test_keys" {

        ---
        id: terraform-3493d491
        summary: '[ERROR] No keys in instance 81db5461-af35-4114-86ec-97cd95a761c9'
        severity: error
        resource: (Data) ibm_kms_keys
        operation: read
        component:
          name: github.com/IBM-Cloud/terraform-provider-ibm
          version: 1.65.0
        ---

--- FAIL: TestAccIBMKMSResource_Key_Ring_ForceDeleteFalse (46.72s)
=== RUN   TestAccIBMKMSResource_Key_Ring_ForceDeleteTrue
--- PASS: TestAccIBMKMSResource_Key_Ring_ForceDeleteTrue (62.31s)
=== RUN   TestAccIBMKMSResource_Key_Ring_ForceDeleteTrueContainsActiveKeys
    resource_ibm_kms_key_rings_test.go:156: Step 2/4, expected an error but got none
--- FAIL: TestAccIBMKMSResource_Key_Ring_ForceDeleteTrueContainsActiveKeys (51.77s)
=== RUN   TestAccIBMKMSResource_basic
--- PASS: TestAccIBMKMSResource_basic (140.45s)
=== RUN   TestAccIBMKMSHPCSResource_basic
    resource_ibm_kms_key_test.go:78: 
--- SKIP: TestAccIBMKMSHPCSResource_basic (0.00s)
=== RUN   TestAccIBMKMSResource_ValidExpDate
--- PASS: TestAccIBMKMSResource_ValidExpDate (50.62s)
=== RUN   TestAccIBMKMSResource_InvalidExpDate
--- PASS: TestAccIBMKMSResource_InvalidExpDate (32.75s)
=== RUN   TestAccIBMKMSKeyWithPolicyOverridesResource_basic
--- PASS: TestAccIBMKMSKeyWithPolicyOverridesResource_basic (78.78s)
=== RUN   TestAccIBMKMSKeyWithPolicyOverridesResource_ValidExpDate
--- PASS: TestAccIBMKMSKeyWithPolicyOverridesResource_ValidExpDate (58.07s)
=== RUN   TestAccIBMKMSKeyWithPolicyOverridesResource_InvalidExpDate
--- PASS: TestAccIBMKMSKeyWithPolicyOverridesResource_InvalidExpDate (33.38s)
=== RUN   TestAccIBMKMSKeyWithPolicyOverridesResource_Policies
--- PASS: TestAccIBMKMSKeyWithPolicyOverridesResource_Policies (43.62s)
=== RUN   TestAccIBMKMSKeyWithPolicyOverridesResource_update
--- PASS: TestAccIBMKMSKeyWithPolicyOverridesResource_update (68.41s)
=== RUN   TestAccIBMKMSKMIPAdapterResource_basic
--- PASS: TestAccIBMKMSKMIPAdapterResource_basic (38.95s)
=== RUN   TestAccIBMKMSKMIPAdapterResource_InvalidCRKStandardKeyErr
--- PASS: TestAccIBMKMSKMIPAdapterResource_InvalidCRKStandardKeyErr (39.69s)
=== RUN   TestAccIBMKMSKMIPAdapterResource_DuplicateAdapterNameErr
--- PASS: TestAccIBMKMSKMIPAdapterResource_DuplicateAdapterNameErr (32.45s)
=== RUN   TestAccIBMKMSKMIPAdapterResource_CRKNotFoundErr
--- PASS: TestAccIBMKMSKMIPAdapterResource_CRKNotFoundErr (29.50s)
=== RUN   TestAccIBMKMSKMIPClientCertResource_basic
--- PASS: TestAccIBMKMSKMIPClientCertResource_basic (41.04s)
=== RUN   TestAccIBMKMSKMIPClientCertResource_DuplicateCertError
--- PASS: TestAccIBMKMSKMIPClientCertResource_DuplicateCertError (34.88s)
=== RUN   TestAccIBMKMSKMIPClientCertResource_InvalidCert
--- PASS: TestAccIBMKMSKMIPClientCertResource_InvalidCert (33.04s)
=== RUN   TestAccIBMKMSKMIPClientCertResource_DuplicateNameError
--- PASS: TestAccIBMKMSKMIPClientCertResource_DuplicateNameError (39.44s)
FAIL
FAIL    github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kms     2481.898s
FAIL
make: *** [testacc] Error 1
(base) wsiew@Williams-MacBook-Pro terraform-provider-ibm % 
...
william8siew commented 1 month ago

Simple create+update+destroy run through with new ID

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # ibm_kms_instance_policies.instance_policy will be created
  + resource "ibm_kms_instance_policies" "instance_policy" {
      + endpoint_type = (known after apply)
      + id            = (known after apply)
      + instance_id   = (known after apply)

      + dual_auth_delete {
          + created_by    = (known after apply)
          + creation_date = (known after apply)
          + enabled       = false
          + last_updated  = (known after apply)
          + updated_by    = (known after apply)
        }

      + key_create_import_access {
          + create_root_key     = true
          + create_standard_key = true
          + created_by          = (known after apply)
          + creation_date       = (known after apply)
          + enabled             = true
          + enforce_token       = false
          + import_root_key     = true
          + import_standard_key = true
          + last_updated        = (known after apply)
          + updated_by          = (known after apply)
        }

      + metrics {
          + created_by    = (known after apply)
          + creation_date = (known after apply)
          + enabled       = true
          + last_updated  = (known after apply)
          + updated_by    = (known after apply)
        }

      + rotation {
          + created_by     = (known after apply)
          + creation_date  = (known after apply)
          + enabled        = true
          + interval_month = 3
          + last_updated   = (known after apply)
          + updated_by     = (known after apply)
        }
    }

  # ibm_kms_key.key_part_of_key_ring will be created
  + resource "ibm_kms_key" "key_part_of_key_ring" {
      + crn                     = (known after apply)
      + endpoint_type           = (known after apply)
      + force_delete            = false
      + id                      = (known after apply)
      + instance_crn            = (known after apply)
      + instance_id             = (known after apply)
      + key_id                  = (known after apply)
      + key_name                = "key_part_of_key_ring"
      + key_ring_id             = "key-ring-id"
      + payload                 = (sensitive value)
      + registrations           = (known after apply)
      + resource_controller_url = (known after apply)
      + resource_crn            = (known after apply)
      + resource_group_name     = (known after apply)
      + resource_name           = (known after apply)
      + resource_status         = (known after apply)
      + standard_key            = false
      + type                    = (known after apply)
    }

  # ibm_kms_key_rings.key_ring will be created
  + resource "ibm_kms_key_rings" "key_ring" {
      + endpoint_type = (known after apply)
      + force_delete  = false
      + id            = (known after apply)
      + instance_id   = (known after apply)
      + key_ring_id   = "key-ring-id"
    }

  # ibm_kms_kmip_adapter.adapter1 will be created
  + resource "ibm_kms_kmip_adapter" "adapter1" {
      + created_at    = (known after apply)
      + created_by    = (known after apply)
      + description   = "adding a description"
      + endpoint_type = (known after apply)
      + id            = (known after apply)
      + instance_id   = (known after apply)
      + name          = (known after apply)
      + profile       = "native_1.0"
      + profile_data  = (known after apply)
      + updated_at    = (known after apply)
      + updated_by    = (known after apply)
    }

  # ibm_resource_instance.kp_instance will be created
  + resource "ibm_resource_instance" "kp_instance" {
      + account_id              = (known after apply)
      + allow_cleanup           = (known after apply)
      + created_at              = (known after apply)
      + created_by              = (known after apply)
      + crn                     = (known after apply)
      + dashboard_url           = (known after apply)
      + deleted_at              = (known after apply)
      + deleted_by              = (known after apply)
      + extensions              = (known after apply)
      + guid                    = (known after apply)
      + id                      = (known after apply)
      + last_operation          = (known after apply)
      + location                = "us-south"
      + locked                  = (known after apply)
      + name                    = "wsiew-2024-may"
      + plan                    = "tiered-pricing"
      + plan_history            = (known after apply)
      + resource_aliases_url    = (known after apply)
      + resource_bindings_url   = (known after apply)
      + resource_controller_url = (known after apply)
      + resource_crn            = (known after apply)
      + resource_group_crn      = (known after apply)
      + resource_group_id       = (known after apply)
      + resource_group_name     = (known after apply)
      + resource_id             = (known after apply)
      + resource_keys_url       = (known after apply)
      + resource_name           = (known after apply)
      + resource_plan_id        = (known after apply)
      + resource_status         = (known after apply)
      + restored_at             = (known after apply)
      + restored_by             = (known after apply)
      + scheduled_reclaim_at    = (known after apply)
      + scheduled_reclaim_by    = (known after apply)
      + service                 = "kms"
      + service_endpoints       = (known after apply)
      + state                   = (known after apply)
      + status                  = (known after apply)
      + sub_type                = (known after apply)
      + tags                    = (known after apply)
      + target_crn              = (known after apply)
      + type                    = (known after apply)
      + update_at               = (known after apply)
      + update_by               = (known after apply)
    }

Plan: 5 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

ibm_resource_instance.kp_instance: Creating...
ibm_resource_instance.kp_instance: Still creating... [10s elapsed]
ibm_resource_instance.kp_instance: Creation complete after 15s [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key_rings.key_ring: Creating...
ibm_kms_instance_policies.instance_policy: Creating...
ibm_kms_instance_policies.instance_policy: Creation complete after 1s [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key_rings.key_ring: Creation complete after 1s [id=key-ring-id:keyRing:crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key.key_part_of_key_ring: Creating...
ibm_kms_key.key_part_of_key_ring: Creation complete after 1s [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca]
ibm_kms_kmip_adapter.adapter1: Creating...
ibm_kms_kmip_adapter.adapter1: Creation complete after 1s [id=a5655c29-f468-4cfe-b040-af7c85829df1/1c04ba59-968e-4e10-b2f1-d1bda8ebba5d]

Apply complete! Resources: 5 added, 0 changed, 0 destroyed.
(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform apply
ibm_resource_instance.kp_instance: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key_rings.key_ring: Refreshing state... [id=key-ring-id:keyRing:crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_instance_policies.instance_policy: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key.key_part_of_key_ring: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca]
ibm_kms_kmip_adapter.adapter1: Refreshing state... [id=a5655c29-f468-4cfe-b040-af7c85829df1/1c04ba59-968e-4e10-b2f1-d1bda8ebba5d]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform destroy
ibm_resource_instance.kp_instance: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key_rings.key_ring: Refreshing state... [id=key-ring-id:keyRing:crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_instance_policies.instance_policy: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key.key_part_of_key_ring: Refreshing state... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca]
ibm_kms_kmip_adapter.adapter1: Refreshing state... [id=a5655c29-f468-4cfe-b040-af7c85829df1/1c04ba59-968e-4e10-b2f1-d1bda8ebba5d]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # ibm_kms_instance_policies.instance_policy will be destroyed
  - resource "ibm_kms_instance_policies" "instance_policy" {
      - id          = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - instance_id = "a5655c29-f468-4cfe-b040-af7c85829df1" -> null

      - dual_auth_delete {
          - created_by    = "IBMid-6620028GBG" -> null
          - creation_date = "2024-05-14 20:42:57 +0000 UTC" -> null
          - enabled       = false -> null
          - last_updated  = "2024-05-14 20:42:57 +0000 UTC" -> null
          - updated_by    = "IBMid-6620028GBG" -> null
        }

      - key_create_import_access {
          - create_root_key     = true -> null
          - create_standard_key = true -> null
          - created_by          = "IBMid-6620028GBG" -> null
          - creation_date       = "2024-05-14 20:42:57 +0000 UTC" -> null
          - enabled             = true -> null
          - enforce_token       = false -> null
          - import_root_key     = true -> null
          - import_standard_key = true -> null
          - last_updated        = "2024-05-14 20:42:57 +0000 UTC" -> null
          - updated_by          = "IBMid-6620028GBG" -> null
        }

      - metrics {
          - created_by    = "IBMid-6620028GBG" -> null
          - creation_date = "2024-05-14 20:42:57 +0000 UTC" -> null
          - enabled       = true -> null
          - last_updated  = "2024-05-14 20:42:57 +0000 UTC" -> null
          - updated_by    = "IBMid-6620028GBG" -> null
        }

      - rotation {
          - created_by     = "IBMid-6620028GBG" -> null
          - creation_date  = "2024-05-14 20:42:57 +0000 UTC" -> null
          - enabled        = true -> null
          - interval_month = 3 -> null
          - last_updated   = "2024-05-14 20:42:57 +0000 UTC" -> null
          - updated_by     = "IBMid-6620028GBG" -> null
        }
    }

  # ibm_kms_key.key_part_of_key_ring will be destroyed
  - resource "ibm_kms_key" "key_part_of_key_ring" {
      - crn                     = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca" -> null
      - endpoint_type           = "public" -> null
      - force_delete            = false -> null
      - id                      = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca" -> null
      - instance_crn            = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - instance_id             = "a5655c29-f468-4cfe-b040-af7c85829df1" -> null
      - key_id                  = "c00e6305-4edf-42f5-bb1d-17ebb4cca6ca" -> null
      - key_name                = "key_part_of_key_ring" -> null
      - key_ring_id             = "key-ring-id" -> null
      - registrations           = [] -> null
      - resource_controller_url = "https://cloud.ibm.com/services/kms/crn%3Av1%3Abluemix%3Apublic%3Akms%3Aus-south%3Aa%2Feba0f7b1166e441ab74ac94e564c72ec%3Aa5655c29-f468-4cfe-b040-af7c85829df1%3A%3A" -> null
      - resource_crn            = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca" -> null
      - resource_name           = "key_part_of_key_ring" -> null
      - resource_status         = "1" -> null
      - standard_key            = false -> null
      - type                    = "kms" -> null
    }

  # ibm_kms_key_rings.key_ring will be destroyed
  - resource "ibm_kms_key_rings" "key_ring" {
      - endpoint_type = "public" -> null
      - force_delete  = false -> null
      - id            = "key-ring-id:keyRing:crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - instance_id   = "a5655c29-f468-4cfe-b040-af7c85829df1" -> null
      - key_ring_id   = "key-ring-id" -> null
    }

  # ibm_kms_kmip_adapter.adapter1 will be destroyed
  - resource "ibm_kms_kmip_adapter" "adapter1" {
      - created_at   = "2024-05-14 20:42:59 +0000 UTC" -> null
      - created_by   = "IBMid-6620028GBG" -> null
      - description  = "adding a description" -> null
      - id           = "a5655c29-f468-4cfe-b040-af7c85829df1/1c04ba59-968e-4e10-b2f1-d1bda8ebba5d" -> null
      - instance_id  = "a5655c29-f468-4cfe-b040-af7c85829df1" -> null
      - name         = "kmip_adapter_QadGAl" -> null
      - profile      = "native_1.0" -> null
      - profile_data = {
          - "crk_id" = "c00e6305-4edf-42f5-bb1d-17ebb4cca6ca"
        } -> null
      - updated_at   = "2024-05-14 20:42:59 +0000 UTC" -> null
      - updated_by   = "IBMid-6620028GBG" -> null
    }

  # ibm_resource_instance.kp_instance will be destroyed
  - resource "ibm_resource_instance" "kp_instance" {
      - account_id              = "eba0f7b1166e441ab74ac94e564c72ec" -> null
      - allow_cleanup           = false -> null
      - created_at              = "2024-05-14T20:42:44.496Z" -> null
      - created_by              = "IBMid-6620028GBG" -> null
      - crn                     = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - dashboard_url           = "/keyprotect/crn%3Av1%3Abluemix%3Apublic%3Akms%3Aus-south%3Aa%2Feba0f7b1166e441ab74ac94e564c72ec%3Aa5655c29-f468-4cfe-b040-af7c85829df1%3A%3A" -> null
      - extensions              = {
          - "endpoints.private" = "https://private.us-south.kms.cloud.ibm.com"
          - "endpoints.public"  = "https://us-south.kms.cloud.ibm.com"
        } -> null
      - guid                    = "a5655c29-f468-4cfe-b040-af7c85829df1" -> null
      - id                      = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - last_operation          = {
          - "async"       = "false"
          - "cancelable"  = "false"
          - "description" = "Completed create instance operation"
          - "poll"        = "false"
          - "state"       = "succeeded"
          - "type"        = "create"
        } -> null
      - location                = "us-south" -> null
      - locked                  = false -> null
      - name                    = "wsiew-2024-may" -> null
      - plan                    = "tiered-pricing" -> null
      - plan_history            = [
          - {
              - resource_plan_id = "eedd3585-90c6-4c8f-be3d-062069e99fc3"
              - start_date       = "2024-05-14T20:42:44.496Z"
            },
        ] -> null
      - resource_aliases_url    = "/v2/resource_instances/a5655c29-f468-4cfe-b040-af7c85829df1/resource_aliases" -> null
      - resource_bindings_url   = "/v2/resource_instances/a5655c29-f468-4cfe-b040-af7c85829df1/resource_bindings" -> null
      - resource_controller_url = "https://cloud.ibm.com/services/" -> null
      - resource_crn            = "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::" -> null
      - resource_group_crn      = "crn:v1:bluemix:public:resource-controller::a/eba0f7b1166e441ab74ac94e564c72ec::resource-group:f956c41a82d1436fbbf68f418f831c05" -> null
      - resource_group_id       = "f956c41a82d1436fbbf68f418f831c05" -> null
      - resource_group_name     = "crn:v1:bluemix:public:resource-controller::a/eba0f7b1166e441ab74ac94e564c72ec::resource-group:f956c41a82d1436fbbf68f418f831c05" -> null
      - resource_id             = "ee41347f-b18e-4ca6-bf80-b5467c63f9a6" -> null
      - resource_keys_url       = "/v2/resource_instances/a5655c29-f468-4cfe-b040-af7c85829df1/resource_keys" -> null
      - resource_name           = "wsiew-2024-may" -> null
      - resource_plan_id        = "eedd3585-90c6-4c8f-be3d-062069e99fc3" -> null
      - resource_status         = "active" -> null
      - service                 = "kms" -> null
      - state                   = "active" -> null
      - status                  = "active" -> null
      - sub_type                = "kms" -> null
      - tags                    = [] -> null
      - target_crn              = "crn:v1:bluemix:public:globalcatalog::::deployment:eedd3585-90c6-4c8f-be3d-062069e99fc3%3Aus-south" -> null
      - type                    = "service_instance" -> null
      - update_at               = "2024-05-14T20:42:44.854Z" -> null
    }

Plan: 0 to add, 0 to change, 5 to destroy.

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value: yes 

ibm_kms_kmip_adapter.adapter1: Destroying... [id=a5655c29-f468-4cfe-b040-af7c85829df1/1c04ba59-968e-4e10-b2f1-d1bda8ebba5d]
ibm_kms_instance_policies.instance_policy: Destroying... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_instance_policies.instance_policy: Destruction complete after 0s
ibm_kms_kmip_adapter.adapter1: Destruction complete after 1s
ibm_kms_key.key_part_of_key_ring: Destroying... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1:key:c00e6305-4edf-42f5-bb1d-17ebb4cca6ca]
ibm_kms_key.key_part_of_key_ring: Destruction complete after 1s
ibm_kms_key_rings.key_ring: Destroying... [id=key-ring-id:keyRing:crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_kms_key_rings.key_ring: Destruction complete after 0s
ibm_resource_instance.kp_instance: Destroying... [id=crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:a5655c29-f468-4cfe-b040-af7c85829df1::]
ibm_resource_instance.kp_instance: Still destroying... [id=crn:v1:bluemix:public:kms:us-south:a/eb...a5655c29-f468-4cfe-b040-af7c85829df1::, 10s elapsed]
ibm_resource_instance.kp_instance: Destruction complete after 11s

Destroy complete! Resources: 5 destroyed.
william8siew commented 1 month ago

TODO:

So in the earlier PR, there was mention of the internal IDs for tf not including the hierarchy. This will be need to be changed.

We have adapters which follow instance-id/adapter-id We have certs which follow instance-id/adapter-id/cert-id certs should also be able to use adapter name for cert operations(which is already there) but must set the ID correctly

To test:

william8siew commented 1 month ago

Nevermind, there seems to be an interesting behavior where for Computed fields, they don't count them under ExactlyOne, ~~

Notice the usage of ExactlyOneOf was not working as I was able specify both name and id for data source

 <= data "ibm_kms_kmip_adapter" "myadapter_byname" {
      + adapter_id    = "abc"
      + created_at    = (known after apply)
      + created_by    = (known after apply)
      + description   = (known after apply)
      + endpoint_type = (known after apply)
      + id            = (known after apply)
      + instance_id   = "67d241f5-a9b8-442a-ae48-930143406336"
      + name          = (known after apply)
      + profile       = (known after apply)
      + profile_data  = (known after apply)
      + updated_at    = (known after apply)
      + updated_by    = (known after apply)
    }
data "ibm_kms_kmip_adapter" "myadapter_byname" {
    instance_id = ibm_resource_instance.kp_instance.guid
    name = ibm_kms_kmip_adapter.adapter1.name
    adapter_id = "abc"
}
william8siew commented 1 month ago

terraform import results for upcoming push

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform import ibm_kms_kmip_client_cert.tf_import_cert bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1/986194f1-4872-46e6-84ed-6a2114e210d5

ibm_kms_kmip_client_cert.tf_import_cert: Importing from ID "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1/986194f1-4872-46e6-84ed-6a2114e210d5"...
ibm_kms_kmip_client_cert.tf_import_cert: Import prepared!
  Prepared ibm_kms_kmip_client_cert for import
ibm_kms_kmip_client_cert.tf_import_cert: Refreshing state... [id=bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1/986194f1-4872-46e6-84ed-6a2114e210d5]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

statefile:

    {
      "mode": "managed",
      "type": "ibm_kms_kmip_client_cert",
      "name": "tf_import_cert",
      "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "adapter_id": "45e03e0e-ff20-42b1-a759-52770d8e3dc1",
            "cert_id": "986194f1-4872-46e6-84ed-6a2114e210d5",
            "certificate": "-----BEGIN CERTIFICATE-----\nMIIFRjCCAy4CCQDLhALhY/GxHzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJY\nWDELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQsw\nCQYDVQQLDAJLUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwHhcNMjQw\nNTE2MTYwMDU1WhcNMjQwNTE3MTYwMDU1WjBlMQswCQYDVQQGEwJYWDELMAkGA1UE\nCAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQswCQYDVQQLDAJL\nUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDeRGmfE5xJtV5DtaYRPGaUTVqUufUvF1rTHPRABnjg\nqbOA+yKj69GelD1zrYQVO0evxssU/crloKa6P2vcPr0CiLDCjI3F348DC4FFDgGM\nGX1iKPCG5cjCSSJHetYeFaJ24K+f0MNGLj9XnxKeTVFYk+oNCpvPIk2ynVf0MSoY\nj9R1U2shOxzRGX0whT19Hwacp+KYehnVJnv0OgTgEmAkRmWWwFTV3YuwcNqlrceZ\n1bmJCb8ORvb1h0M7rNYMUrQQDnBtC1n3k9PMobpCX0U7Jpf8QmwA59n9WDuc7Rt9\nH7j5xQ468zrcPtstTdTK2anJXuQ6ulmHVm0dkwSdlUJ1N+EQM93QypiPQT2mpTta\n1gdJWCcyHfRuVk4+tge6QEQwyyBjpttESiR+ZRPLg+b1zil90ctny9+dxKB57fQg\nWvn7alxGgfFgzaUYjgdtUM24SkI5yp6DqbFE0GEp0EpKOxuqE0Wz/t75oCU+DFCn\nGtrg2aT+H6DbFmhgfdjpWlVzynrWSLKWcnpjfrFZov2C9Q1194UflC9OjmwbvoGI\njXqYynRfQZzNn4fW3dlNkY16n6qDXYyc2z3UvgnMqyoaACTXvZztPsS1Axe7c8ze\n3GlTVDcjlhg2Nee6FN9iwFZv4Cs0L5q+A4NGwtVwr5SglXR6Nd6qrN5ZG88nLDNg\n+QIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQDa1WXyLxnCeF1er4M07K1TSNK1DEvD\nZKVY45waawvj7LW6zsW1UxXgR16o8NYo9pUhODQ/Ys1c9tmH6dhQ3X1t+W6U8Khr\nZFS6gs1+Tj03cTIc24NbRZJ8tPfLF/NOewGbdPBwMwPrpyQQyxUnq0QZjoQNThyD\nrxWQrLG27nPfVFBgokOH5eWNB1cVJekqoLJbZkZnxLHhMzmPG0EG+59k92tafXRC\nrUgpFNSLdL8dfWClbGJxCGS1XjgOIua6Aaku8citxkmPoA5ngKh8WJl4ENCN2nop\nAdpPlBVCQo1cYv70SJx/Lapkogs51nMAgM9rhJhG7br/MyJDlSSvzCI/+SG+oPlF\nrM9fCexmA7KjQ1l/F7oAt8JepAqpBJed+MIftlVkThfaNOhBBXcOCEJuTGbKNVPO\n5r5cGKkVcTMdEw1yizZqF+/Rw7x7PD9JE5/32JgV+DHVvS141HD1+euEq/aAvqGl\n1xa9Ls5jHYOJe44/Cc4yPLQWXUNlgZdtIivdzPAeeJcm9OCIG7K1ebwsv3t6eO66\nUl+6AaT+iYHPCO8dvOGyWlitKsJ9c6NKWAsjpWpLp5HVNJoBZU4/k0y/HrR4ask9\ncBq+7cVSwDQAuxhIIKHqgAOR6YLylKq95+4IzibMTsiIclPz7xzTQpg0/Rx906mp\nMrArCJT5vgm/3w==\n-----END CERTIFICATE-----",
            "created_at": "2024-05-16 16:01:03 +0000 UTC",
            "created_by": "IBMid-6620028GBG",
            "endpoint_type": "public",
            "id": "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1/986194f1-4872-46e6-84ed-6a2114e210d5",
            "instance_id": "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0",
            "name": "as"
          },
          "sensitive_attributes": [],
          "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ=="
        }
      ]
    },

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform state rm ibm_kms_kmip_client_cert.tf_import_certRemoved ibm_kms_kmip_client_cert.tf_import_cert
Successfully removed 1 resource instance(s).

for adapters

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform import ibm_kms_kmip_adapter.tf_import_adapter bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1

ibm_kms_kmip_adapter.tf_import_adapter: Importing from ID "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1"...
ibm_kms_kmip_adapter.tf_import_adapter: Import prepared!
  Prepared ibm_kms_kmip_adapter for import
ibm_kms_kmip_adapter.tf_import_adapter: Refreshing state... [id=bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % 

statefile:
    {
      "mode": "managed",
      "type": "ibm_kms_kmip_adapter",
      "name": "tf_import_adapter",
      "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "adapter_id": "45e03e0e-ff20-42b1-a759-52770d8e3dc1",
            "created_at": "2024-05-16 15:44:21 +0000 UTC",
            "created_by": "IBMid-6620028GBG",
            "description": "",
            "endpoint_type": "public",
            "id": "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/45e03e0e-ff20-42b1-a759-52770d8e3dc1",
            "instance_id": "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0",
            "name": "kmip_adapter_IvWHAI",
            "profile": "native_1.0",
            "profile_data": {
              "crk_id": "e9a935ef-4190-4465-a2aa-520a1336d592"
            },
            "updated_at": "2024-05-16 15:44:21 +0000 UTC",
            "updated_by": "IBMid-6620028GBG"
          },
          "sensitive_attributes": [],
          "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ=="
        }
      ]
    },

delete:

(base) wsiew@Williams-MacBook-Pro ibm-key-protect %  terraform state rm ibm_kms_kmip_adapter.tf_import_adapter                                                                       
Removed ibm_kms_kmip_adapter.tf_import_adapter
Successfully removed 1 resource instance(s).

validate against import by name

(base) wsiew@Williams-MacBook-Pro ibm-key-protect % terraform import ibm_kms_kmip_client_cert.tf_import_cert bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/kmip_adapter_IvWHAI/986194f1-4872-46e6-84ed-6a2114e210d5
ibm_kms_kmip_client_cert.tf_import_cert: Importing from ID "bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/kmip_adapter_IvWHAI/986194f1-4872-46e6-84ed-6a2114e210d5"...
ibm_kms_kmip_client_cert.tf_import_cert: Import prepared!
  Prepared ibm_kms_kmip_client_cert for import
ibm_kms_kmip_client_cert.tf_import_cert: Refreshing state... [id=bb15f9c8-44d8-4ca6-a8b6-0bb091c811a0/kmip_adapter_IvWHAI/986194f1-4872-46e6-84ed-6a2114e210d5]
╷
│ Error: [ERROR] The given id kmip_adapter_IvWHAI at index 1 of instance_id/adapter_id/cert_id is not a valid UUID
│ 
│ 
william8siew commented 1 month ago

tested existing resources manually here for data sources and resouces .tf file

resource "ibm_resource_instance" "kms_instance" {
  name     = "instance-name"
  service  = "kms"
  plan     = "tiered-pricing"
  location = "us-south"
}
resource "ibm_kms_key" "key" {
  instance_id = ibm_resource_instance.kms_instance.guid
  key_name       = "key"
  standard_key   = false
}
resource "ibm_kms_kmip_adapter" "myadapter" {
    instance_id = ibm_resource_instance.kms_instance.guid
    profile = "native_1.0"
    profile_data = {
      "crk_id" = ibm_kms_key.key.key_id,
    }
    # description = "adding a description"
    name = "wakaka"
}

data "ibm_kms_kmip_adapter" "myadapter_byname" {
    instance_id = ibm_resource_instance.kms_instance.guid
    name = ibm_kms_kmip_adapter.myadapter.name
}

data "ibm_kms_kmip_adapter" "myadapter_byid" {
    instance_id = ibm_resource_instance.kms_instance.guid
    adapter_id = ibm_kms_kmip_adapter.myadapter.adapter_id
}

resource "ibm_kms_kmip_client_cert" "mycert" {
  instance_id = ibm_resource_instance.kms_instance.guid
  adapter_id = ibm_kms_kmip_adapter.myadapter.adapter_id
  certificate = "-----BEGIN CERTIFICATE-----\nMIIFRjCCAy4CCQDJeOJTTzej7DANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJY\nWDELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQsw\nCQYDVQQLDAJLUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwHhcNMjQw\nNTE2MjEyMTA0WhcNMjQwNTE3MjEyMTA0WjBlMQswCQYDVQQGEwJYWDELMAkGA1UE\nCAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQswCQYDVQQLDAJL\nUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDJjbVxUYBhQRoknc4Ov9b98GFStRuBgw3sL/r/iNpE\nCMmqf+a92zgvwQVx2yGU8TXMkDJf8K6CT5JiUQYzpa11/o4j4gwmVx2zGT7M8Yh6\nOivh4RVcoH+HVRMKFTyZ7K6tliLnGjYDqXf8/RnIUZu6NopijFFynDCGuNVP7fzF\ndAWGrIphMYsmswuzPrLm1G83BvzyYEey6g4Hq7iDnXVRdrm+jAInkzelUPoYDOAw\nK8Vkfi8lDoXudp67JYAqRfdJsQ6jjOzS9YkXKveFF+YjFJ6UAs58GN/rZsJsaO37\nrInc66Nq5qevEbCmxXGBuzB/xzd3PoN2kFM/HGYy1Z/ZxC980cXI+4WP6je5UpiW\nddNvXAGpNLPtxc/RdglEOofdlGUeOVjlpWoyhHAjQgtt1raZDEtsJ76q1CVC3Tw3\ncAg0nH718neCLvd9as5yMkWoWuaURZHe2vX+HvPcdMpK+Hy/LOT56M642Uxzpz5Z\noUedTH9GBTdf6G9rpSjgtefMZba8TnodUfmRsa+SO7As1P5CU6KEsljl6FWT0aX9\nicKjicvJI2n1E0TEqJjxG922qmaI8sgzc6bcZjDXXlxVpiBWxZ+ojjbjcm4+ETlH\ncbqtEwpLuj2g3F5I9DA+49SKbtPue09LQwKe0pe8o05b5Apu6TJ3aewg4bd4QEq9\noQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQAjBwomZqdlSkcv2SEi5ggxNbV/UbEf\n/B6xWkWHijlEPI0/+OSl17fO1Qh41fPoK2PPiS0jy0XYs3FrsC2ccgoCu+uUoxt0\nHK+7cGDx6VMgx2+Li3m/Gks18floVn4pWj4wZZodtImyrPh8dp/M+iyY0XbhuhlF\ng1dv4u52UrA21tHY59KIJPZsOHCTMuakawXz3dKe2k9Ry7Wv/euN/KgN9mvnvdga\nFwAbQZEXj+RAdN6uT4RXoDkEzxL9xZKZNBOtHlM8rKkv+UgoNMfpZ4RT1/3nZy7m\nU5bnB2hrS7uAA0d7hxkDvQSpXmybbipFkUyZAtSSiyEiPi8HV0O6QFFEIuSpioE3\n9mxa9CVbwcQBpaAQHD94g3IJE+HjAMr3Zxe/G21z5j1n+RY8Kfr0aGOQZECGALyV\nxiNxDVop0Wp+0l/5tWJsiDy9KvyWjfT5aixStpOj97SYfyZ14avRflkjkcfwZpQp\nMPZaGxwpCSjbg4JRJPAE1F9E9Ui6uLahIlPMcrnViuBDcX3HNogIx7HCdBqaW+7a\nbNJuh8enpWdZboUc3ONQCSs8XE/5gxxHmf1KAYlhv5LRwR/PEfE3Emnu3WfBOZCn\noQryQhfiCXj5MFPAfBU8GbS+Jlz8kK2PWAzYLA0HwZsdTyO6QQ9vOH176adT/DRL\n2r8evBdH8svVWg==\n-----END CERTIFICATE-----"
  name = "ayay"
}

data "ibm_kms_kmip_client_cert" "mycert_byname" {
  instance_id = ibm_resource_instance.kms_instance.guid
  adapter_name = ibm_kms_kmip_adapter.myadapter.name
  name = ibm_kms_kmip_client_cert.mycert.name
}

data "ibm_kms_kmip_client_cert" "mycert_byid" {
  instance_id = ibm_resource_instance.kms_instance.guid
  adapter_id = ibm_kms_kmip_adapter.myadapter.adapter_id
  cert_id = ibm_kms_kmip_client_cert.mycert.cert_id
}

state file after apply

``` { "version": 4, "terraform_version": "1.4.0", "serial": 92, "lineage": "3a68d81f-5306-6fe0-d517-b9924243eb95", "outputs": {}, "resources": [ { "mode": "data", "type": "ibm_kms_kmip_adapter", "name": "myadapter_byid", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "created_at": "2024-05-16 21:27:22 +0000 UTC", "created_by": "IBMid-6620028GBG", "description": "", "endpoint_type": null, "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "wakaka", "profile": "native_1.0", "profile_data": { "crk_id": "05a1f6d9-b984-423d-abde-444592511d76" }, "updated_at": "2024-05-16 21:27:22 +0000 UTC", "updated_by": "IBMid-6620028GBG" }, "sensitive_attributes": [] } ] }, { "mode": "data", "type": "ibm_kms_kmip_adapter", "name": "myadapter_byname", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "created_at": "2024-05-16 21:27:22 +0000 UTC", "created_by": "IBMid-6620028GBG", "description": "", "endpoint_type": null, "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "wakaka", "profile": "native_1.0", "profile_data": { "crk_id": "05a1f6d9-b984-423d-abde-444592511d76" }, "updated_at": "2024-05-16 21:27:22 +0000 UTC", "updated_by": "IBMid-6620028GBG" }, "sensitive_attributes": [] } ] }, { "mode": "data", "type": "ibm_kms_kmip_client_cert", "name": "mycert_byid", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "adapter_name": "wakaka", "cert_id": "90006101-88b8-43c0-925e-acc01efaf622", "certificate": "-----BEGIN CERTIFICATE-----\nMIIFRjCCAy4CCQDJeOJTTzej7DANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJY\nWDELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQsw\nCQYDVQQLDAJLUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwHhcNMjQw\nNTE2MjEyMTA0WhcNMjQwNTE3MjEyMTA0WjBlMQswCQYDVQQGEwJYWDELMAkGA1UE\nCAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQswCQYDVQQLDAJL\nUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDJjbVxUYBhQRoknc4Ov9b98GFStRuBgw3sL/r/iNpE\nCMmqf+a92zgvwQVx2yGU8TXMkDJf8K6CT5JiUQYzpa11/o4j4gwmVx2zGT7M8Yh6\nOivh4RVcoH+HVRMKFTyZ7K6tliLnGjYDqXf8/RnIUZu6NopijFFynDCGuNVP7fzF\ndAWGrIphMYsmswuzPrLm1G83BvzyYEey6g4Hq7iDnXVRdrm+jAInkzelUPoYDOAw\nK8Vkfi8lDoXudp67JYAqRfdJsQ6jjOzS9YkXKveFF+YjFJ6UAs58GN/rZsJsaO37\nrInc66Nq5qevEbCmxXGBuzB/xzd3PoN2kFM/HGYy1Z/ZxC980cXI+4WP6je5UpiW\nddNvXAGpNLPtxc/RdglEOofdlGUeOVjlpWoyhHAjQgtt1raZDEtsJ76q1CVC3Tw3\ncAg0nH718neCLvd9as5yMkWoWuaURZHe2vX+HvPcdMpK+Hy/LOT56M642Uxzpz5Z\noUedTH9GBTdf6G9rpSjgtefMZba8TnodUfmRsa+SO7As1P5CU6KEsljl6FWT0aX9\nicKjicvJI2n1E0TEqJjxG922qmaI8sgzc6bcZjDXXlxVpiBWxZ+ojjbjcm4+ETlH\ncbqtEwpLuj2g3F5I9DA+49SKbtPue09LQwKe0pe8o05b5Apu6TJ3aewg4bd4QEq9\noQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQAjBwomZqdlSkcv2SEi5ggxNbV/UbEf\n/B6xWkWHijlEPI0/+OSl17fO1Qh41fPoK2PPiS0jy0XYs3FrsC2ccgoCu+uUoxt0\nHK+7cGDx6VMgx2+Li3m/Gks18floVn4pWj4wZZodtImyrPh8dp/M+iyY0XbhuhlF\ng1dv4u52UrA21tHY59KIJPZsOHCTMuakawXz3dKe2k9Ry7Wv/euN/KgN9mvnvdga\nFwAbQZEXj+RAdN6uT4RXoDkEzxL9xZKZNBOtHlM8rKkv+UgoNMfpZ4RT1/3nZy7m\nU5bnB2hrS7uAA0d7hxkDvQSpXmybbipFkUyZAtSSiyEiPi8HV0O6QFFEIuSpioE3\n9mxa9CVbwcQBpaAQHD94g3IJE+HjAMr3Zxe/G21z5j1n+RY8Kfr0aGOQZECGALyV\nxiNxDVop0Wp+0l/5tWJsiDy9KvyWjfT5aixStpOj97SYfyZ14avRflkjkcfwZpQp\nMPZaGxwpCSjbg4JRJPAE1F9E9Ui6uLahIlPMcrnViuBDcX3HNogIx7HCdBqaW+7a\nbNJuh8enpWdZboUc3ONQCSs8XE/5gxxHmf1KAYlhv5LRwR/PEfE3Emnu3WfBOZCn\noQryQhfiCXj5MFPAfBU8GbS+Jlz8kK2PWAzYLA0HwZsdTyO6QQ9vOH176adT/DRL\n2r8evBdH8svVWg==\n-----END CERTIFICATE-----", "created_at": "2024-05-16 21:27:23 +0000 UTC", "created_by": "IBMid-6620028GBG", "endpoint_type": null, "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883/90006101-88b8-43c0-925e-acc01efaf622", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "ayay" }, "sensitive_attributes": [] } ] }, { "mode": "data", "type": "ibm_kms_kmip_client_cert", "name": "mycert_byname", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "adapter_name": "wakaka", "cert_id": "90006101-88b8-43c0-925e-acc01efaf622", "certificate": "-----BEGIN CERTIFICATE-----\nMIIFRjCCAy4CCQDJeOJTTzej7DANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJY\nWDELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQsw\nCQYDVQQLDAJLUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwHhcNMjQw\nNTE2MjEyMTA0WhcNMjQwNTE3MjEyMTA0WjBlMQswCQYDVQQGEwJYWDELMAkGA1UE\nCAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQswCQYDVQQLDAJL\nUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDJjbVxUYBhQRoknc4Ov9b98GFStRuBgw3sL/r/iNpE\nCMmqf+a92zgvwQVx2yGU8TXMkDJf8K6CT5JiUQYzpa11/o4j4gwmVx2zGT7M8Yh6\nOivh4RVcoH+HVRMKFTyZ7K6tliLnGjYDqXf8/RnIUZu6NopijFFynDCGuNVP7fzF\ndAWGrIphMYsmswuzPrLm1G83BvzyYEey6g4Hq7iDnXVRdrm+jAInkzelUPoYDOAw\nK8Vkfi8lDoXudp67JYAqRfdJsQ6jjOzS9YkXKveFF+YjFJ6UAs58GN/rZsJsaO37\nrInc66Nq5qevEbCmxXGBuzB/xzd3PoN2kFM/HGYy1Z/ZxC980cXI+4WP6je5UpiW\nddNvXAGpNLPtxc/RdglEOofdlGUeOVjlpWoyhHAjQgtt1raZDEtsJ76q1CVC3Tw3\ncAg0nH718neCLvd9as5yMkWoWuaURZHe2vX+HvPcdMpK+Hy/LOT56M642Uxzpz5Z\noUedTH9GBTdf6G9rpSjgtefMZba8TnodUfmRsa+SO7As1P5CU6KEsljl6FWT0aX9\nicKjicvJI2n1E0TEqJjxG922qmaI8sgzc6bcZjDXXlxVpiBWxZ+ojjbjcm4+ETlH\ncbqtEwpLuj2g3F5I9DA+49SKbtPue09LQwKe0pe8o05b5Apu6TJ3aewg4bd4QEq9\noQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQAjBwomZqdlSkcv2SEi5ggxNbV/UbEf\n/B6xWkWHijlEPI0/+OSl17fO1Qh41fPoK2PPiS0jy0XYs3FrsC2ccgoCu+uUoxt0\nHK+7cGDx6VMgx2+Li3m/Gks18floVn4pWj4wZZodtImyrPh8dp/M+iyY0XbhuhlF\ng1dv4u52UrA21tHY59KIJPZsOHCTMuakawXz3dKe2k9Ry7Wv/euN/KgN9mvnvdga\nFwAbQZEXj+RAdN6uT4RXoDkEzxL9xZKZNBOtHlM8rKkv+UgoNMfpZ4RT1/3nZy7m\nU5bnB2hrS7uAA0d7hxkDvQSpXmybbipFkUyZAtSSiyEiPi8HV0O6QFFEIuSpioE3\n9mxa9CVbwcQBpaAQHD94g3IJE+HjAMr3Zxe/G21z5j1n+RY8Kfr0aGOQZECGALyV\nxiNxDVop0Wp+0l/5tWJsiDy9KvyWjfT5aixStpOj97SYfyZ14avRflkjkcfwZpQp\nMPZaGxwpCSjbg4JRJPAE1F9E9Ui6uLahIlPMcrnViuBDcX3HNogIx7HCdBqaW+7a\nbNJuh8enpWdZboUc3ONQCSs8XE/5gxxHmf1KAYlhv5LRwR/PEfE3Emnu3WfBOZCn\noQryQhfiCXj5MFPAfBU8GbS+Jlz8kK2PWAzYLA0HwZsdTyO6QQ9vOH176adT/DRL\n2r8evBdH8svVWg==\n-----END CERTIFICATE-----", "created_at": "2024-05-16 21:27:23 +0000 UTC", "created_by": "IBMid-6620028GBG", "endpoint_type": null, "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883/90006101-88b8-43c0-925e-acc01efaf622", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "ayay" }, "sensitive_attributes": [] } ] }, { "mode": "managed", "type": "ibm_kms_key", "name": "key", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "crn": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2:key:05a1f6d9-b984-423d-abde-444592511d76", "description": "", "encrypted_nonce": "", "endpoint_type": "public", "expiration_date": "", "force_delete": false, "id": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2:key:05a1f6d9-b984-423d-abde-444592511d76", "instance_crn": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2::", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "iv_value": "", "key_id": "05a1f6d9-b984-423d-abde-444592511d76", "key_name": "key", "key_ring_id": "default", "payload": "", "registrations": [], "resource_controller_url": "https://cloud.ibm.com/services/kms/crn%3Av1%3Abluemix%3Apublic%3Akms%3Aus-south%3Aa%2Feba0f7b1166e441ab74ac94e564c72ec%3A8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2%3A%3A", "resource_crn": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2:key:05a1f6d9-b984-423d-abde-444592511d76", "resource_group_name": null, "resource_name": "key", "resource_status": "1", "standard_key": false, "timeouts": null, "type": "kms" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsInVwZGF0ZSI6NjAwMDAwMDAwMDAwfX0=", "dependencies": [ "ibm_resource_instance.kms_instance" ] } ] }, { "mode": "managed", "type": "ibm_kms_kmip_adapter", "name": "myadapter", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "created_at": "2024-05-16 21:27:22 +0000 UTC", "created_by": "IBMid-6620028GBG", "description": "", "endpoint_type": "public", "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "wakaka", "profile": "native_1.0", "profile_data": { "crk_id": "05a1f6d9-b984-423d-abde-444592511d76" }, "updated_at": "2024-05-16 21:27:22 +0000 UTC", "updated_by": "IBMid-6620028GBG" }, "sensitive_attributes": [], "private": "bnVsbA==", "dependencies": [ "ibm_kms_key.key", "ibm_resource_instance.kms_instance" ] } ] }, { "mode": "managed", "type": "ibm_kms_kmip_client_cert", "name": "mycert", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "adapter_id": "cb8e74c4-a611-4311-859a-3005700ce883", "cert_id": "90006101-88b8-43c0-925e-acc01efaf622", "certificate": "-----BEGIN CERTIFICATE-----\nMIIFRjCCAy4CCQDJeOJTTzej7DANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJY\nWDELMAkGA1UECAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQsw\nCQYDVQQLDAJLUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwHhcNMjQw\nNTE2MjEyMTA0WhcNMjQwNTE3MjEyMTA0WjBlMQswCQYDVQQGEwJYWDELMAkGA1UE\nCAwCVFgxDzANBgNVBAcMBkF1c3RpbjEMMAoGA1UECgwDSUJNMQswCQYDVQQLDAJL\nUDEdMBsGA1UEAwwUQ29tbW9uTmFtZU9ySG9zdG5hbWUwggIiMA0GCSqGSIb3DQEB\nAQUAA4ICDwAwggIKAoICAQDJjbVxUYBhQRoknc4Ov9b98GFStRuBgw3sL/r/iNpE\nCMmqf+a92zgvwQVx2yGU8TXMkDJf8K6CT5JiUQYzpa11/o4j4gwmVx2zGT7M8Yh6\nOivh4RVcoH+HVRMKFTyZ7K6tliLnGjYDqXf8/RnIUZu6NopijFFynDCGuNVP7fzF\ndAWGrIphMYsmswuzPrLm1G83BvzyYEey6g4Hq7iDnXVRdrm+jAInkzelUPoYDOAw\nK8Vkfi8lDoXudp67JYAqRfdJsQ6jjOzS9YkXKveFF+YjFJ6UAs58GN/rZsJsaO37\nrInc66Nq5qevEbCmxXGBuzB/xzd3PoN2kFM/HGYy1Z/ZxC980cXI+4WP6je5UpiW\nddNvXAGpNLPtxc/RdglEOofdlGUeOVjlpWoyhHAjQgtt1raZDEtsJ76q1CVC3Tw3\ncAg0nH718neCLvd9as5yMkWoWuaURZHe2vX+HvPcdMpK+Hy/LOT56M642Uxzpz5Z\noUedTH9GBTdf6G9rpSjgtefMZba8TnodUfmRsa+SO7As1P5CU6KEsljl6FWT0aX9\nicKjicvJI2n1E0TEqJjxG922qmaI8sgzc6bcZjDXXlxVpiBWxZ+ojjbjcm4+ETlH\ncbqtEwpLuj2g3F5I9DA+49SKbtPue09LQwKe0pe8o05b5Apu6TJ3aewg4bd4QEq9\noQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQAjBwomZqdlSkcv2SEi5ggxNbV/UbEf\n/B6xWkWHijlEPI0/+OSl17fO1Qh41fPoK2PPiS0jy0XYs3FrsC2ccgoCu+uUoxt0\nHK+7cGDx6VMgx2+Li3m/Gks18floVn4pWj4wZZodtImyrPh8dp/M+iyY0XbhuhlF\ng1dv4u52UrA21tHY59KIJPZsOHCTMuakawXz3dKe2k9Ry7Wv/euN/KgN9mvnvdga\nFwAbQZEXj+RAdN6uT4RXoDkEzxL9xZKZNBOtHlM8rKkv+UgoNMfpZ4RT1/3nZy7m\nU5bnB2hrS7uAA0d7hxkDvQSpXmybbipFkUyZAtSSiyEiPi8HV0O6QFFEIuSpioE3\n9mxa9CVbwcQBpaAQHD94g3IJE+HjAMr3Zxe/G21z5j1n+RY8Kfr0aGOQZECGALyV\nxiNxDVop0Wp+0l/5tWJsiDy9KvyWjfT5aixStpOj97SYfyZ14avRflkjkcfwZpQp\nMPZaGxwpCSjbg4JRJPAE1F9E9Ui6uLahIlPMcrnViuBDcX3HNogIx7HCdBqaW+7a\nbNJuh8enpWdZboUc3ONQCSs8XE/5gxxHmf1KAYlhv5LRwR/PEfE3Emnu3WfBOZCn\noQryQhfiCXj5MFPAfBU8GbS+Jlz8kK2PWAzYLA0HwZsdTyO6QQ9vOH176adT/DRL\n2r8evBdH8svVWg==\n-----END CERTIFICATE-----", "created_at": "2024-05-16 21:27:23 +0000 UTC", "created_by": "IBMid-6620028GBG", "endpoint_type": "public", "id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/cb8e74c4-a611-4311-859a-3005700ce883/90006101-88b8-43c0-925e-acc01efaf622", "instance_id": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "name": "ayay" }, "sensitive_attributes": [], "private": "bnVsbA==", "dependencies": [ "ibm_kms_key.key", "ibm_kms_kmip_adapter.myadapter", "ibm_resource_instance.kms_instance" ] } ] }, { "mode": "managed", "type": "ibm_resource_instance", "name": "kms_instance", "provider": "provider[\"registry.terraform.io/ibm-cloud/ibm\"]", "instances": [ { "schema_version": 0, "attributes": { "account_id": "eba0f7b1166e441ab74ac94e564c72ec", "allow_cleanup": false, "created_at": "2024-05-16T21:27:09.929Z", "created_by": "IBMid-6620028GBG", "crn": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2::", "dashboard_url": "/keyprotect/crn%3Av1%3Abluemix%3Apublic%3Akms%3Aus-south%3Aa%2Feba0f7b1166e441ab74ac94e564c72ec%3A8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2%3A%3A", "deleted_at": null, "deleted_by": "", "extensions": { "endpoints.private": "https://private.us-south.kms.cloud.ibm.com", "endpoints.public": "https://us-south.kms.cloud.ibm.com" }, "guid": "8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2", "id": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2::", "last_operation": { "async": "false", "cancelable": "false", "description": "Completed create instance operation", "poll": "false", "state": "succeeded", "type": "create" }, "location": "us-south", "locked": false, "name": "instance-name", "parameters": null, "parameters_json": null, "plan": "tiered-pricing", "plan_history": [ { "resource_plan_id": "eedd3585-90c6-4c8f-be3d-062069e99fc3", "start_date": "2024-05-16T21:27:09.929Z" } ], "resource_aliases_url": "/v2/resource_instances/8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/resource_aliases", "resource_bindings_url": "/v2/resource_instances/8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/resource_bindings", "resource_controller_url": "https://cloud.ibm.com/services/", "resource_crn": "crn:v1:bluemix:public:kms:us-south:a/eba0f7b1166e441ab74ac94e564c72ec:8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2::", "resource_group_crn": "crn:v1:bluemix:public:resource-controller::a/eba0f7b1166e441ab74ac94e564c72ec::resource-group:f956c41a82d1436fbbf68f418f831c05", "resource_group_id": "f956c41a82d1436fbbf68f418f831c05", "resource_group_name": "crn:v1:bluemix:public:resource-controller::a/eba0f7b1166e441ab74ac94e564c72ec::resource-group:f956c41a82d1436fbbf68f418f831c05", "resource_id": "ee41347f-b18e-4ca6-bf80-b5467c63f9a6", "resource_keys_url": "/v2/resource_instances/8ebb1db1-e6c1-4a00-adbe-5fb0ed3732f2/resource_keys", "resource_name": "instance-name", "resource_plan_id": "eedd3585-90c6-4c8f-be3d-062069e99fc3", "resource_status": "active", "restored_at": null, "restored_by": "", "scheduled_reclaim_at": null, "scheduled_reclaim_by": "", "service": "kms", "service_endpoints": null, "state": "active", "status": "active", "sub_type": "kms", "tags": [], "target_crn": "crn:v1:bluemix:public:globalcatalog::::deployment:eedd3585-90c6-4c8f-be3d-062069e99fc3%3Aus-south", "timeouts": null, "type": "service_instance", "update_at": "2024-05-16T21:27:10.266Z", "update_by": "" }, "sensitive_attributes": [], "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19" } ] } ], "check_results": null } ```
william8siew commented 1 month ago

Changelog as a followup PR: