ibm-cloud-docs / ibm-cloud-provider-for-terraform

Documentation repository for ibm-cloud-provider-for-terraform
3 stars 17 forks source link

terraform - Provisioning an IBM Cloud virtual server for VPC #18

Closed powellquiring closed 3 years ago

powellquiring commented 3 years ago

https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-sample_vpc_config

image

this is an odd way to initialize a provider and does not specify a region. Setting TF_LOG=debug is not recommended for normal use.

The example source code should not include the steps above. Instead add the following to the top fo the vpc.tf file:

variable ibmcloud_api_key {}

provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
  region           = "us-south" # this could come from a variable as well, it will need to match the ZONE variable used
}

Then instruct the user to:


export TF_VAR_ibmcloud_api_key="VoeEd1231231234134123413"
geethasathyamurthy commented 3 years ago

@powellquiring Here is the updated content, https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-sample_vpc_config

Request to confirm, is this fine to close the issue?

Thanks, Geetha