Skip to content

Commit 4fd525d

Browse files
authored
feat: release import workspace variation to catalog solution
1 parent fbc0664 commit 4fd525d

30 files changed

+388
-1180
lines changed

ibm_catalog.json

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -947,42 +947,27 @@
947947
}
948948
},
949949
{
950-
"label": "PowerVS Import Workspace",
950+
"label": "Import PowerVS Workspace",
951951
"name": "powervs-import-workspace",
952952
"install_type": "fullstack",
953953
"index": 3,
954954
"working_directory": "solutions/import-workspace",
955-
"compliance": {
956-
"authority": "scc-v3",
957-
"profiles": [
958-
{
959-
"profile_name": "IBM Cloud for Financial Services",
960-
"profile_version": "1.3.0"
961-
}
962-
]
963-
},
955+
"compliance": {},
964956
"configuration": [
965957
{
966958
"key": "access_host",
967959
"required": true,
960+
"default_value": "{\"vsi_name\":\"\",\"floating_ip\":\"\"}",
968961
"custom_config": {
969962
"grouping": "deployment",
970963
"original_grouping": "deployment",
971964
"type": "json_editor"
972965
}
973966
},
974967
{
975-
"key": "proxy_host",
976-
"required": true,
977-
"custom_config": {
978-
"grouping": "deployment",
979-
"original_grouping": "deployment",
980-
"type": "json_editor"
981-
}
982-
},
983-
{
984-
"key": "workload_host",
968+
"key": "proxy_server_ip_port",
985969
"required": true,
970+
"default_value": "{\"ip\":\"\",\"port\":\"\"}",
986971
"custom_config": {
987972
"grouping": "deployment",
988973
"original_grouping": "deployment",
@@ -991,6 +976,7 @@
991976
},
992977
{
993978
"key": "transit_gateway_name",
979+
"default_value": "",
994980
"required": true
995981
},
996982
{
@@ -1083,19 +1069,23 @@
10831069
"custom_config": {}
10841070
},
10851071
{
1086-
"key": "powervs_workspace_name",
1072+
"key": "powervs_workspace_guid",
1073+
"default_value": "",
10871074
"required": true
10881075
},
10891076
{
10901077
"key": "powervs_sshkey_name",
1078+
"default_value": "",
10911079
"required": true
10921080
},
10931081
{
10941082
"key": "powervs_management_network_name",
1083+
"default_value": "",
10951084
"required": true
10961085
},
10971086
{
10981087
"key": "powervs_backup_network_name",
1088+
"default_value": "",
10991089
"required": true
11001090
},
11011091
{
@@ -1109,6 +1099,20 @@
11091099
"type": "multiline_secure_value"
11101100
}
11111101
},
1102+
{
1103+
"key": "dns_server_ip"
1104+
},
1105+
{
1106+
"key": "ntp_server_ip"
1107+
},
1108+
{
1109+
"key": "nfs_server_ip_path",
1110+
"custom_config": {
1111+
"grouping": "deployment",
1112+
"original_grouping": "deployment",
1113+
"type": "json_editor"
1114+
}
1115+
},
11121116
{
11131117
"key": "tags"
11141118
}
@@ -1117,12 +1121,6 @@
11171121
{
11181122
"key": "prefix"
11191123
},
1120-
{
1121-
"key": "vpc_names"
1122-
},
1123-
{
1124-
"key": "vsi_names"
1125-
},
11261124
{
11271125
"key": "ssh_public_key"
11281126
},
@@ -1132,9 +1130,6 @@
11321130
{
11331131
"key": "transit_gateway_id"
11341132
},
1135-
{
1136-
"key": "vsi_list"
1137-
},
11381133
{
11391134
"key": "access_host_or_ip"
11401135
},
@@ -1153,9 +1148,6 @@
11531148
{
11541149
"key": "powervs_zone"
11551150
},
1156-
{
1157-
"key": "powervs_resource_group_name"
1158-
},
11591151
{
11601152
"key": "powervs_workspace_name"
11611153
},
@@ -1246,7 +1238,19 @@
12461238
],
12471239
"service_name": "power-iaas"
12481240
}
1249-
]
1241+
],
1242+
"architecture": {
1243+
"diagrams": [
1244+
{
1245+
"diagram": {
1246+
"caption": "Power Virtual Server with VPC landing zone 'import-workspace' variation",
1247+
"url": "https://raw.githubusercontent.com/terraform-ibm-modules/terraform-ibm-powervs-infrastructure/main/reference-architectures/import-workspace/deploy-arch-ibm-pvs-inf-import-workspace.svg",
1248+
"type": "image/svg+xml"
1249+
},
1250+
"description": "This solution helps to install the deployable architecture 'Power Virtual Server for SAP HANA' on top of a pre-existing Power Virtual Server(PowerVS) landscape. 'Power Virtual Server for SAP HANA' automation requires a schematics workspace id for installation. The 'import-workspace' solution creates a schematics workspace by taking pre-existing VPC and PowerVS infrastructure resource details as inputs. The ID of this schematics workspace will be the pre-requisite workspace id required by 'Power Virtual Server for SAP HANA' to create and configure the PowerVS instances for SAP on top of the existing infrastructure.\n \nRequired and optional management components are configured."
1251+
}
1252+
]
1253+
}
12501254
},
12511255
{
12521256
"label": "PowerVS Workspace",

modules/import-powervs-vpc/acl/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ resource "ibm_is_network_acl_rule" "network_acl_rules" {
5050
}
5151

5252
resource "ibm_is_network_acl_rule" "deny_all_outbound" {
53+
count = var.skip_deny_rules == true ? 0 : 1
5354
depends_on = [resource.ibm_is_network_acl_rule.network_acl_rules]
5455

5556
network_acl = var.ibm_is_network_acl_id
@@ -60,6 +61,7 @@ resource "ibm_is_network_acl_rule" "deny_all_outbound" {
6061
direction = "outbound"
6162
}
6263
resource "ibm_is_network_acl_rule" "deny_all_inbound" {
64+
count = var.skip_deny_rules == true ? 0 : 1
6365
depends_on = [resource.ibm_is_network_acl_rule.network_acl_rules]
6466

6567
network_acl = var.ibm_is_network_acl_id

modules/import-powervs-vpc/acl/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ variable "ibm_is_network_acl_id" {
2929
description = "An existing VPC's existing network ACL id to which rules will be added."
3030
type = string
3131
}
32+
33+
variable "skip_deny_rules" {
34+
description = "This boolean value decides if the default deny rules should be created for the respective ACl."
35+
type = bool
36+
}
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
data "ibm_resource_instance" "powervs_workspace_ds" {
2-
name = var.pi_workspace_name
1+
data "ibm_pi_workspace" "powervs_workspace_ds" {
2+
pi_cloud_instance_id = var.pi_workspace_guid
33
}
44

55
data "ibm_pi_images" "powervs_workspace_images_ds" {
6-
pi_cloud_instance_id = data.ibm_resource_instance.powervs_workspace_ds.guid
7-
}
8-
9-
locals {
10-
pi_cloud_instance_id = data.ibm_resource_instance.powervs_workspace_ds.guid
6+
pi_cloud_instance_id = var.pi_workspace_guid
117
}
128

139
data "ibm_pi_network" "powervs_management_network_ds" {
1410
pi_network_name = var.pi_management_network_name
15-
pi_cloud_instance_id = local.pi_cloud_instance_id
11+
pi_cloud_instance_id = var.pi_workspace_guid
1612
}
1713

1814
data "ibm_pi_network" "powervs_backup_network_ds" {
1915
pi_network_name = var.pi_backup_network_name
20-
pi_cloud_instance_id = local.pi_cloud_instance_id
16+
pi_cloud_instance_id = var.pi_workspace_guid
2117
}

modules/import-powervs-vpc/powervs/outputs.tf

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
output "powervs_workspace_guid" {
2-
description = "The GUID of PowerVS workspace"
3-
value = data.ibm_resource_instance.powervs_workspace_ds.guid
1+
output "powervs_workspace_name" {
2+
description = "The name of the PowerVS workspace."
3+
value = data.ibm_pi_workspace.powervs_workspace_ds.pi_workspace_name
4+
}
5+
6+
output "powervs_workspace_id" {
7+
description = "PowerVS infrastructure workspace ID."
8+
value = data.ibm_pi_workspace.powervs_workspace_ds.id
49
}
510

611
output "powervs_workspace_crn" {
712
description = "PowerVS infrastructure workspace CRN."
8-
value = data.ibm_resource_instance.powervs_workspace_ds.crn
13+
value = data.ibm_pi_workspace.powervs_workspace_ds.pi_workspace_details.crn
914
}
1015

11-
output "powervs_resource_group_name" {
12-
description = "IBM Cloud resource group in which PowerVS infrastructure exists."
13-
value = data.ibm_resource_instance.powervs_workspace_ds.resource_group_name
14-
}
1516

1617
output "powervs_images" {
1718
description = "Object containing imported PowerVS image names and image ids."

modules/import-powervs-vpc/powervs/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
variable "pi_workspace_name" {
2-
description = "An existing PowerVS infrastructure workspace name."
1+
variable "pi_workspace_guid" {
2+
description = "An existing PowerVS infrastructure workspace GUID."
33
type = string
44
}
55

0 commit comments

Comments
 (0)