Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: per enable dal10 DC #594

Merged
merged 23 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
99bcf6a
feat: support dal10 PER
surajsbharadwaj Aug 26, 2023
fc53e5b
Merge branch 'main' into per
surajsbharadwaj Aug 26, 2023
fcb94a9
fix: default images
surajsbharadwaj Aug 26, 2023
d646556
fix: readme
surajsbharadwaj Aug 26, 2023
aa9b16b
feat: per enable support DC
surajsbharadwaj Aug 26, 2023
b4f8fc0
feat: per enable support DC
surajsbharadwaj Aug 26, 2023
009b878
feat: per enable support DC
surajsbharadwaj Aug 26, 2023
25c4420
fix: remove depends_on
surajsbharadwaj Aug 26, 2023
12bfacf
Merge branch 'main' into per
surajsbharadwaj Aug 28, 2023
c32e67f
fix: rename us-south to dallas
surajsbharadwaj Aug 29, 2023
ecdb8f5
Merge branch 'per' of https://github.com/terraform-ibm-modules/terraf…
surajsbharadwaj Aug 29, 2023
f94e7b8
feat: upgrade ibmi version to 75
surajsbharadwaj Aug 29, 2023
6ccf7d4
feat: upgrade ibmi version to 75
surajsbharadwaj Aug 29, 2023
cfff9cc
feat: remove cleaning acl rule
surajsbharadwaj Aug 30, 2023
fbcfafa
feat: upgrade to rhel8-6 and sles15-4
surajsbharadwaj Aug 31, 2023
0b768aa
fix: provider
surajsbharadwaj Aug 31, 2023
e71f186
fix: os registration scripts
surajsbharadwaj Aug 31, 2023
52458ad
fix: os registration scripts echo
surajsbharadwaj Aug 31, 2023
486746c
fix: os registration scripts description
surajsbharadwaj Aug 31, 2023
e86ea95
feat: upgrade pvs instance version
surajsbharadwaj Aug 31, 2023
7fb00ed
docs: production true
surajsbharadwaj Aug 31, 2023
3acecc4
Merge branch 'main' into per
surajsbharadwaj Sep 5, 2023
8aae2b2
docs: per description
surajsbharadwaj Sep 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-07-20T11:43:53Z",
"generated_at": "2023-08-26T06:27:08Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -100,7 +100,7 @@
"hashed_secret": "3a16a2d2850bbe557924aebe9f1f1294199bfbab",
"is_secret": false,
"is_verified": false,
"line_number": 709,
"line_number": 717,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
2 changes: 1 addition & 1 deletion common-dev-assets
38 changes: 25 additions & 13 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -528,9 +532,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -801,9 +809,13 @@
"value": "sao01"
},
{
"displayname": "US-south (us-south)",
"displayname": "Dallas (dallas)",
"value": "us-south"
},
{
"displayname": "Dallas (dal10)",
"value": "dal10"
},
{
"displayname": "Dallas (dal12)",
"value": "dal12"
Expand Down Expand Up @@ -842,19 +854,19 @@
"value": "aix_l"
},
{
"displayname": "IBM i - XS (0.25cpu,8GB,disk-100GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - XS (0.25cpu,8GB,disk-100GB,IBMi-75-01-2984-2)",
"value": "ibm_i_xs"
},
{
"displayname": "IBM i - S (1cpu,32GB,disk-500GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - S (1cpu,32GB,disk-500GB,IBMi-75-01-2984-2)",
"value": "ibm_i_s"
},
{
"displayname": "IBM i - M (2cpu,64GB,disk-1000GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - M (2cpu,64GB,disk-1000GB,IBMi-75-01-2984-2)",
"value": "ibm_i_m"
},
{
"displayname": "IBM i - L (4cpu,132GB,disk-2000GB,IBMi-73-13-2924-1)",
"displayname": "IBM i - L (4cpu,132GB,disk-2000GB,IBMi-75-01-2984-2)",
"value": "ibm_i_l"
},
{
Expand Down Expand Up @@ -924,17 +936,17 @@
"value": "7200-05-03"
},
{
"displayname": "IBM i - IBMi-73-13-2924-1",
"value": "IBMi-73-13-2924-1"
},
{
"displayname": "IBM i - IBMi-74-07-2924-1",
"value": "IBMi-74-07-2924-1"
"displayname": "IBM i - IBMi-75-01-2984-2",
"value": "IBMi-75-01-2984-2"
},
{
"displayname": "IBM i - IBMi-75-01-2924-2",
"value": "IBMi-75-01-2924-2"
},
{
"displayname": "IBM i - IBMi-74-07-2984-1",
"value": "IBMi-74-07-2984-1"
},
{
"displayname": "IBM i - IBMi_COR-74-07-2",
"value": "IBMi_COR-74-07-2"
Expand Down
23 changes: 17 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# IBM Cloud PowerVS Configuration
#####################################################

locals {
per_enabled_dc_list = ["dal10"]
per_enabled = contains(local.per_enabled_dc_list, var.powervs_zone)
}

module "initial_validation" {
source = "./submodules/terraform_initial_validation"
cloud_connection_validate = {
Expand Down Expand Up @@ -32,6 +37,7 @@ module "powervs_cloud_connection_create" {
powervs_resource_group_name = var.powervs_resource_group_name
powervs_workspace_name = var.powervs_workspace_name
transit_gateway_name = var.transit_gateway_name
per_enabled = local.per_enabled
cloud_connection_name_prefix = var.cloud_connection_name_prefix
cloud_connection_count = var.cloud_connection_count
cloud_connection_speed = var.cloud_connection_speed
Expand All @@ -42,6 +48,7 @@ module "powervs_cloud_connection_create" {

module "powervs_cloud_connection_attach" {
source = "./submodules/powervs_cloudconnection_attach"
count = local.per_enabled ? 0 : 1
depends_on = [module.powervs_workspace, module.powervs_cloud_connection_create]
powervs_zone = var.powervs_zone
powervs_resource_group_name = var.powervs_resource_group_name
Expand All @@ -50,11 +57,15 @@ module "powervs_cloud_connection_attach" {
powervs_subnet_names = [var.powervs_management_network.name, var.powervs_backup_network.name]
}


#####################################################
# VPC VSI Management Services OS configuration
#####################################################

module "configure_squid" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach]
count = var.squid_config["squid_enable"] ? 1 : 0
source = "./submodules/configure_network_services"
count = var.squid_config["squid_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
target_server_ip = var.squid_config["server_host_or_ip"]
Expand All @@ -73,7 +84,7 @@ resource "time_sleep" "wait_for_squid_setup_to_complete" {
module "configure_dns" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, time_sleep.wait_for_squid_setup_to_complete]
count = var.dns_forwarder_config["dns_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand All @@ -86,7 +97,7 @@ module "configure_dns" {
module "configure_ntp" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, module.configure_dns, time_sleep.wait_for_squid_setup_to_complete]
count = var.ntp_forwarder_config["ntp_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand All @@ -99,7 +110,7 @@ module "configure_ntp" {
module "configure_nfs" {

source = "./submodules/configure_network_services"
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, module.configure_ntp, time_sleep.wait_for_squid_setup_to_complete]
depends_on = [module.configure_squid, module.configure_dns, module.configure_ntp, time_sleep.wait_for_squid_setup_to_complete]
count = var.nfs_config["nfs_enable"] ? 1 : 0

access_host_or_ip = var.access_host_or_ip
Expand Down
60 changes: 40 additions & 20 deletions module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,16 @@
"source": [
"module.powervs_cloud_connection_attach.data.ibm_resource_instance.powervs_workspace_ds.name",
"module.powervs_cloud_connection_create.data.ibm_resource_instance.powervs_workspace_ds.name",
"module.powervs_cloud_connection_create.ibm_tg_connection.ibm_powervs_workspace_attach_per.name",
"module.powervs_workspace.ibm_resource_instance.powervs_workspace.name"
],
"pos": {
"filename": "variables.tf",
"line": 15
}
},
"min_length": 1,
"max_length": 63,
"matches": "^([a-zA-Z]|[a-zA-Z][-_a-zA-Z0-9]*[a-zA-Z0-9])$"
},
"powervs_zone": {
"name": "powervs_zone",
Expand Down Expand Up @@ -549,7 +553,7 @@
},
"pos": {
"filename": "main.tf",
"line": 66
"line": 77
}
}
},
Expand Down Expand Up @@ -634,7 +638,7 @@
"data_resources": {},
"pos": {
"filename": "main.tf",
"line": 73
"line": 84
}
},
"configure_nfs": {
Expand Down Expand Up @@ -716,7 +720,7 @@
"data_resources": {},
"pos": {
"filename": "main.tf",
"line": 99
"line": 110
}
},
"configure_ntp": {
Expand Down Expand Up @@ -798,7 +802,7 @@
"data_resources": {},
"pos": {
"filename": "main.tf",
"line": 86
"line": 97
}
},
"configure_squid": {
Expand Down Expand Up @@ -880,7 +884,7 @@
"data_resources": {},
"pos": {
"filename": "main.tf",
"line": 53
"line": 65
}
},
"initial_validation": {
Expand All @@ -893,7 +897,7 @@
"data_resources": {},
"pos": {
"filename": "main.tf",
"line": 5
"line": 10
}
},
"powervs_cloud_connection_attach": {
Expand Down Expand Up @@ -1031,7 +1035,7 @@
},
"pos": {
"filename": "main.tf",
"line": 43
"line": 49
}
},
"powervs_cloud_connection_create": {
Expand Down Expand Up @@ -1065,7 +1069,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 29
"line": 26
}
},
"ibm_pi_cloud_connection.cloud_connection_backup": {
Expand All @@ -1083,7 +1087,23 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 39
"line": 37
}
},
"ibm_tg_connection.ibm_powervs_workspace_attach_per": {
"mode": "managed",
"type": "ibm_tg_connection",
"name": "ibm_powervs_workspace_attach_per",
"attributes": {
"count": "per_enabled",
"name": "powervs_workspace_name"
},
"provider": {
"name": "ibm"
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 123
}
},
"ibm_tg_connection.ibm_tg_connection_1": {
Expand All @@ -1098,7 +1118,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 96
"line": 99
}
},
"ibm_tg_connection.ibm_tg_connection_2": {
Expand All @@ -1113,7 +1133,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 105
"line": 109
}
},
"time_sleep.dl_1_resource_propagation": {
Expand All @@ -1128,7 +1148,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 74
"line": 75
}
},
"time_sleep.dl_2_resource_propagation": {
Expand All @@ -1143,7 +1163,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 83
"line": 85
}
}
},
Expand All @@ -1160,7 +1180,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 62
"line": 61
}
},
"data.ibm_dl_gateway.gateway_ds_2": {
Expand Down Expand Up @@ -1190,7 +1210,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 9
"line": 11
}
},
"data.ibm_resource_instance.powervs_workspace_ds": {
Expand All @@ -1206,7 +1226,7 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 13
"line": 15
}
},
"data.ibm_tg_gateway.tg_gateway_ds": {
Expand All @@ -1221,13 +1241,13 @@
},
"pos": {
"filename": "submodules/powervs_cloudconnection_create/main.tf",
"line": 54
"line": 53
}
}
},
"pos": {
"filename": "main.tf",
"line": 27
"line": 32
}
},
"powervs_workspace": {
Expand Down Expand Up @@ -1390,7 +1410,7 @@
},
"pos": {
"filename": "main.tf",
"line": 13
"line": 18
}
}
}
Expand Down
Loading