You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: patterns/vsi-extension/README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,23 @@ This logic creates a VSI to an existing landing zone VPC.
5
5
This code creates and configures the following infrastructure:
6
6
- Adds an SSH key to IBM Cloud or uses an existing one.
7
7
- Adds a VSI in each subnet of the landing zone VPC.
8
+
9
+
There are two ways through which a user can pass the VPC details for deploying the VSI, both the approaches are mutually exclusive.
10
+
11
+
## Using `vpc_id`
12
+
13
+
The VPC ID of the landing zone VPC can be assigned to the variable vpc_id in order to create a VSI within that specific VPC.
14
+
15
+
## Using `prerequisite_workspace_id` and `existing_vpc_name`
16
+
17
+
The user can specify the workspace ID associated with the deployment of the landing zone VPC when creating a new VSI.
18
+
19
+
Follow these steps to get the schematics workspace ID.
20
+
21
+
1. Click the Navigation menu icon, and then click Schematics > Workspaces.
22
+
1. Select the Workspace that is associated with landing zone VPC.
23
+
1. Click the Settings.
24
+
1. In the Details section, you can find the Workspace ID.
25
+
26
+
Pass the Workspace ID to the `prerequisite_workspace_id` variable and pass the name of the VPC to the `existing_vpc_name` to choosse the name of the VPC to which the user wants to deploy the VSI.
27
+
Please provide the Workspace ID for the prerequisite workspace and the name of the existing VPC to the `prerequisite_workspace_id` and `existing_vpc_name` variables respectively, to identify the VPC where you want to deploy the VSI.
validate_vpc_vars=var.prerequisite_workspace_id==null&& var.vpc_id==null?tobool("var.prerequisite_workspace_id and var.vpc_id cannot be both set to null.") :true
8
+
# tflint-ignore: terraform_unused_declarations
9
+
validate_vpc_names=var.prerequisite_workspace_id!=null&& var.existing_vpc_name==null?tobool("A value must be passed for var.existing_vpc_name to choose a VPC from the list of VPCs from the schematics workspace.") :true
Copy file name to clipboardExpand all lines: patterns/vsi-extension/variables.tf
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,6 @@ variable "ibmcloud_api_key" {
4
4
sensitive=true
5
5
}
6
6
7
-
variable"resource_group" {
8
-
type=string
9
-
description="The resource group name of the landing zone VPC."
10
-
}
11
-
12
7
variable"region" {
13
8
description="The region of the landing zone VPC."
14
9
type=string
@@ -23,6 +18,7 @@ variable "prefix" {
23
18
variable"vpc_id" {
24
19
description="The ID of the VPC where the VSI will be created."
25
20
type=string
21
+
default=null
26
22
}
27
23
28
24
variable"existing_ssh_key_name" {
@@ -186,3 +182,15 @@ variable "load_balancers" {
186
182
)
187
183
default=[]
188
184
}
185
+
186
+
variable"prerequisite_workspace_id" {
187
+
type=string
188
+
description="IBM Cloud Schematics workspace ID of the prerequisite IBM VPC landing zone. If you do not have an existing deployment yet, create a new architecture using the same catalog tile."
189
+
default=null
190
+
}
191
+
192
+
variable"existing_vpc_name" {
193
+
type=string
194
+
description="Name of the VPC to be used for deploying the VSI from the list of VPCs retrived from the IBM Cloud Schematics workspace."
0 commit comments