terraform-provider-ibm
terraform-provider-ibm copied to clipboard
ibm_pi_workspace - add crn return attribute to work with ibm_tg_connection
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Add crn return attribute to ibm_pi_workspace. The crn is required to work with a transit gateway.
New or Affected Resource(s)
- ibm_pi_workspace
Potential Terraform Configuration
https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/pi_workspace
Specifies the attributes containing just the id:
The crn of the workspace is needed for a transit gateway connection:
resource "ibm_tg_connection" "spokes_power" {
// this could be indexed by spoke number but currently 0 based
for_each = { for spoke_number, power in module.spokes_power : spoke_number => power.power }
network_type = "power_virtual_server"
gateway = local.tg_gateway.id
name = each.value.name
network_id = each.value.crn
}
@powellquiring I would suggest using https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance to access that in the meantime. We are looking into this.
Good point:
/*
resource "ibm_pi_workspace" "location" {
pi_name = local.name
pi_datacenter = local.datacenter
pi_resource_group_id = local.resource_group_id
# pi_plan = "power-virtual-server-group"
pi_plan = "public"
}
*/
resource "ibm_resource_instance" "location" {
name = local.name
resource_group_id = local.resource_group_id
location = local.datacenter
service = "power-iaas"
plan = "power-virtual-server-group"
}
ibm_pi_workspace.crn
is available to use now.