This root module automates and provisions a IBM Power Virtual Server Workspace with following components:
- Creates an IBM® Power Virtual Server (PowerVS) workspace.
- Creates an SSH key.
- Optionally imports list of stock catalog images.
- Optionally imports up to three custom images from Cloud Object Storage.
- Optionally create one or two or three private subnets.
- Optionally create one public subnet.
- Optionally attach the PowerVS workspace to transit gateway.
provider "ibm" {
region = var.pi_region
zone = var.pi_zone
ibmcloud_api_key = var.ibmcloud_api_key != null ? var.ibmcloud_api_key : null
}
module "power-workspace" {
source = "terraform-ibm-modules/powervs-workspace/ibm"
version = "latest" # Replace "latest" with a release version to lock into a specific release
pi_zone = var.pi_zone
pi_resource_group_name = var.pi_resource_group_name
pi_workspace_name = var.pi_workspace_name
pi_ssh_public_key = var.pi_ssh_public_key
pi_image_names = var.pi_image_names
pi_transit_gateway_connection = var.pi_transit_gateway_connection #(optional, default check vars)
pi_private_subnet_1 = var.pi_private_subnet_1 #(optional, default null)
pi_private_subnet_2 = var.pi_private_subnet_2 #(optional, default null)
pi_private_subnet_3 = var.pi_private_subnet_3 #(optional, default null)
pi_public_subnet_enable = var.pi_public_subnet_enable #(optional, default false)
pi_tags = var.pi_tags #(optional, default [])
pi_custom_image1 = var.pi_custom_image1 #(optional, default null)
pi_custom_image2 = var.pi_custom_image2 #(optional, default null)
pi_custom_image3 = var.pi_custom_image3 #(optional, default null)
pi_custom_image_cos_configuration = var.pi_custom_image_cos_configuration #(optional, default null)
pi_custom_image_cos_service_credentials = var.pi_custom_image_cos_service_credentials #(optional, default null)
}
You need the following permissions to run this module.
- Account Management
- Resource Group service
Viewer
platform access
- IAM Services
- Workspace for Power Virtual Server service
- Power Virtual Server service
Editor
platform access
- VPC Infrastructure Services service
Editor
platform access
- Transit Gateway service
Editor
platform access
- Direct Link service
Editor
platform access
- Resource Group service
Name | Version |
---|---|
terraform | >= 1.9.0 |
ibm | >=1.65.0 |
time | >= 0.9.1 |
No modules.
Name | Type |
---|---|
ibm_pi_image.import_images | resource |
ibm_pi_image.pi_custom_image1 | resource |
ibm_pi_image.pi_custom_image2 | resource |
ibm_pi_image.pi_custom_image3 | resource |
ibm_pi_key.ssh_key | resource |
ibm_pi_network.private_subnet_1 | resource |
ibm_pi_network.private_subnet_2 | resource |
ibm_pi_network.private_subnet_3 | resource |
ibm_pi_network.public_subnet | resource |
ibm_resource_instance.pi_workspace | resource |
ibm_tg_connection.tg_powervs_workspace_attach | resource |
time_sleep.wait_30_sec | resource |
ibm_pi_catalog_images.catalog_images_ds | data source |
ibm_resource_group.resource_group_ds | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
pi_custom_image1 | Optional custom image to import from Cloud Object Storage into PowerVS workspace. image_name: string, must be unique image name how the image will be named inside PowerVS workspace file_name: string, full file name of the image inside COS bucket storage_tier: string, storage tier which the image will be stored in after import. Supported values are: "tier0", "tier1", "tier3", "tier5k". sap_type: optional string, "Hana", "Netweaver", don't use it for non-SAP image. |
object({ |
null |
no |
pi_custom_image2 | Optional custom image to import from Cloud Object Storage into PowerVS workspace. image_name: string, must be unique image name how the image will be named inside PowerVS workspace file_name: string, full file name of the image inside COS bucket storage_tier: string, storage tier which the image will be stored in after import. Supported values are: "tier0", "tier1", "tier3", "tier5k". sap_type: optional string, "Hana", "Netweaver", don't use it for non-SAP image. |
object({ |
null |
no |
pi_custom_image3 | Optional custom image to import from Cloud Object Storage into PowerVS workspace. image_name: string, must be unique image name how the image will be named inside PowerVS workspace file_name: string, full file name of the image inside COS bucket storage_tier: string, storage tier which the image will be stored in after import. Supported values are: "tier0", "tier1", "tier3", "tier5k". sap_type: optional string, "Hana", "Netweaver", don't use it for non-SAP image. |
object({ |
null |
no |
pi_custom_image_cos_configuration | Cloud Object Storage bucket containing the custom PowerVS images. Images will be imported into the PowerVS Workspace. bucket_name: string, name of the COS bucket bucket_access: string, possible values: "public", "private" (private requires pi_custom_image_cos_service_credentials) bucket_region: string, COS bucket region |
object({ |
null |
no |
pi_custom_image_cos_service_credentials | Service credentials for the Cloud Object Storage bucket containing the custom PowerVS images. The bucket must have HMAC credentials enabled. Click here for a json example of a service credential. | string |
null |
no |
pi_image_names | List of images to be imported into cloud account from catalog images. Supported values can be found here | list(string) |
n/a | yes |
pi_private_subnet_1 | IBM Cloud PowerVS first private subnet name and cidr which will be created. Set value to null to not create this subnet. | object({ |
null |
no |
pi_private_subnet_2 | IBM Cloud PowerVS second private subnet name and cidr which will be created. Set value to null to not create this subnet. | object({ |
null |
no |
pi_private_subnet_3 | IBM Cloud PowerVS third private subnet name and cidr which will be created. Set value to null to not create this subnet. | object({ |
null |
no |
pi_public_subnet_enable | IBM Cloud PowerVS Public Network. Set to true to enable this. | bool |
false |
no |
pi_resource_group_name | Existing Resource Group Name. | string |
n/a | yes |
pi_ssh_public_key | Name and value of the Public SSH key to create in PowerVS workspace. | object({ |
n/a | yes |
pi_tags | List of Tag names for IBM Cloud PowerVS workspace. Can be set to null. | list(string) |
null |
no |
pi_transit_gateway_connection | Set enable to true and provide ID of the existing transit gateway to attach the CCs( Non PER DC) to TGW or to attach PowerVS workspace to TGW (PER DC). If enable is false, CCs will not be attached to TGW , or PowerVS workspace will not be attached to TGW, but CCs in (Non PER DC) will be created. | object({ |
{ |
no |
pi_workspace_name | Name of IBM Cloud PowerVS workspace which will be created. | string |
n/a | yes |
pi_zone | IBM Cloud PowerVS zone. | string |
n/a | yes |
Name | Description |
---|---|
pi_images | Object containing imported PowerVS image names and image ids. |
pi_private_subnet_1 | Created PowerVS private subnet 1 details. |
pi_private_subnet_2 | Created PowerVS private subnet 2 details. |
pi_private_subnet_3 | Created PowerVS private subnet 3 details. |
pi_public_subnet | Created PowerVS public subnet. |
pi_resource_group_name | IBM Cloud resource group name tagged to PowerVS Workspace. |
pi_ssh_public_key | SSH public key name and value in created PowerVS infrastructure. |
pi_workspace_guid | PowerVS infrastructure workspace guid. The GUID of the resource instance. |
pi_workspace_id | PowerVS infrastructure workspace id. The unique identifier of the new resource instance. |
pi_workspace_name | PowerVS infrastructure workspace name. |
pi_zone | Zone where PowerVS infrastructure is created. |
You can report issues and request features for this module in GitHub issues in the module repo. See Report an issue or request a feature.
To set up your local development environment see Local development setup in the project documentation.