Skip to content

Commit 0ce1b7c

Browse files
feat: add clean_default_security_group and clean_default_security_group rules to presets (#544)
* fix: outputs, support clean up, reorg folder names * fix: local variables for is configuration
1 parent b0b11e4 commit 0ce1b7c

40 files changed

+665
-645
lines changed

.secrets.baseline

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2023-06-23T09:30:26Z",
6+
"generated_at": "2023-06-24T11:44:19Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -100,7 +100,7 @@
100100
"hashed_secret": "3a16a2d2850bbe557924aebe9f1f1294199bfbab",
101101
"is_secret": false,
102102
"is_verified": false,
103-
"line_number": 703,
103+
"line_number": 713,
104104
"type": "Secret Keyword",
105105
"verified_result": null
106106
}
@@ -110,40 +110,30 @@
110110
"hashed_secret": "ed6836bba164e8936b4aaf6b78f37a8583032364",
111111
"is_secret": false,
112112
"is_verified": false,
113-
"line_number": 1163,
113+
"line_number": 812,
114114
"type": "Secret Keyword",
115115
"verified_result": null
116116
}
117117
],
118-
"solutions/terraform-registry/powervs_infrastructure/input.tfvars": [
118+
"submodules/configure_network_services/README.md": [
119119
{
120-
"hashed_secret": "75f43a404abe2b680b39a473123e886571a937e2",
120+
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
121121
"is_secret": false,
122122
"is_verified": false,
123-
"line_number": 30,
123+
"line_number": 10,
124124
"type": "Secret Keyword",
125125
"verified_result": null
126126
},
127127
{
128-
"hashed_secret": "4d82fc4e8ef3a90cebdf3a1fc0e4abab79a41391",
129-
"is_secret": false,
130-
"is_verified": false,
131-
"line_number": 43,
132-
"type": "Secret Keyword",
133-
"verified_result": null
134-
}
135-
],
136-
"submodules/initial_validation/README.md": [
137-
{
138-
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
128+
"hashed_secret": "a67ef662b9a11a96b15936764d77e118c9f155dd",
139129
"is_secret": false,
140130
"is_verified": false,
141-
"line_number": 10,
131+
"line_number": 18,
142132
"type": "Secret Keyword",
143133
"verified_result": null
144134
}
145135
],
146-
"submodules/power_cloudconnection_attach/README.md": [
136+
"submodules/powervs_cloudconnection_attach/README.md": [
147137
{
148138
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
149139
"is_secret": false,
@@ -153,7 +143,7 @@
153143
"verified_result": null
154144
}
155145
],
156-
"submodules/power_cloudconnection_create/README.md": [
146+
"submodules/powervs_cloudconnection_create/README.md": [
157147
{
158148
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
159149
"is_secret": false,
@@ -163,25 +153,17 @@
163153
"verified_result": null
164154
}
165155
],
166-
"submodules/power_management_services_setup/README.md": [
156+
"submodules/powervs_workspace/README.md": [
167157
{
168158
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
169159
"is_secret": false,
170160
"is_verified": false,
171161
"line_number": 10,
172162
"type": "Secret Keyword",
173163
"verified_result": null
174-
},
175-
{
176-
"hashed_secret": "a67ef662b9a11a96b15936764d77e118c9f155dd",
177-
"is_secret": false,
178-
"is_verified": false,
179-
"line_number": 18,
180-
"type": "Secret Keyword",
181-
"verified_result": null
182164
}
183165
],
184-
"submodules/power_workspace/README.md": [
166+
"submodules/terraform_initial_validation/README.md": [
185167
{
186168
"hashed_secret": "1a70e90515ef1357abd3531dead4b53b6eba959f",
187169
"is_secret": false,

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ You need the following permissions to run this module.
113113

114114
| Name | Source | Version |
115115
|------|--------|---------|
116-
| <a name="module_cloud_connection_attach"></a> [cloud\_connection\_attach](#module\_cloud\_connection\_attach) | ./submodules/power_cloudconnection_attach | n/a |
117-
| <a name="module_cloud_connection_create"></a> [cloud\_connection\_create](#module\_cloud\_connection\_create) | ./submodules/power_cloudconnection_create | n/a |
118-
| <a name="module_initial_validation"></a> [initial\_validation](#module\_initial\_validation) | ./submodules/initial_validation | n/a |
119-
| <a name="module_power_management_service_dns"></a> [power\_management\_service\_dns](#module\_power\_management\_service\_dns) | ./submodules/power_management_services_setup | n/a |
120-
| <a name="module_power_management_service_nfs"></a> [power\_management\_service\_nfs](#module\_power\_management\_service\_nfs) | ./submodules/power_management_services_setup | n/a |
121-
| <a name="module_power_management_service_ntp"></a> [power\_management\_service\_ntp](#module\_power\_management\_service\_ntp) | ./submodules/power_management_services_setup | n/a |
122-
| <a name="module_power_management_service_squid"></a> [power\_management\_service\_squid](#module\_power\_management\_service\_squid) | ./submodules/power_management_services_setup | n/a |
123-
| <a name="module_power_workspace"></a> [power\_workspace](#module\_power\_workspace) | ./submodules/power_workspace | n/a |
116+
| <a name="module_configure_dns"></a> [configure\_dns](#module\_configure\_dns) | ./submodules/configure_network_services | n/a |
117+
| <a name="module_configure_nfs"></a> [configure\_nfs](#module\_configure\_nfs) | ./submodules/configure_network_services | n/a |
118+
| <a name="module_configure_ntp"></a> [configure\_ntp](#module\_configure\_ntp) | ./submodules/configure_network_services | n/a |
119+
| <a name="module_configure_squid"></a> [configure\_squid](#module\_configure\_squid) | ./submodules/configure_network_services | n/a |
120+
| <a name="module_initial_validation"></a> [initial\_validation](#module\_initial\_validation) | ./submodules/terraform_initial_validation | n/a |
121+
| <a name="module_powervs_cloud_connection_attach"></a> [powervs\_cloud\_connection\_attach](#module\_powervs\_cloud\_connection\_attach) | ./submodules/powervs_cloudconnection_attach | n/a |
122+
| <a name="module_powervs_cloud_connection_create"></a> [powervs\_cloud\_connection\_create](#module\_powervs\_cloud\_connection\_create) | ./submodules/powervs_cloudconnection_create | n/a |
123+
| <a name="module_powervs_workspace"></a> [powervs\_workspace](#module\_powervs\_workspace) | ./submodules/powervs_workspace | n/a |
124124

125125
## Resources
126126

ibm_catalog.json

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -232,33 +232,38 @@
232232
{
233233
"key": "configure_dns_forwarder"
234234
},
235+
{
236+
"key": "configure_ntp_forwarder"
237+
},
235238
{
236239
"key": "configure_nfs_server"
237240
},
238241
{
239-
"key": "configure_ntp_forwarder"
242+
"key": "dns_forwarder_config"
240243
},
241244
{
242245
"key": "powervs_management_network"
243246
},
244247
{
245248
"key": "powervs_backup_network"
246249
},
247-
{
248-
"key": "powervs_image_names"
249-
},
250250
{
251251
"key": "cloud_connection"
252252
},
253253
{
254-
"key": "dns_forwarder_config"
254+
"key": "powervs_image_names"
255255
},
256256
{
257257
"key": "tags"
258258
},
259259
{
260260
"key": "ibmcloud_api_key",
261-
"type": "multiline_secure_value"
261+
"type": "multiline_secure_value",
262+
"custom_config": {
263+
"grouping": "deployment",
264+
"original_grouping": "deployment",
265+
"type": "multiline_secure_value"
266+
}
262267
}
263268
],
264269
"outputs": [
@@ -563,7 +568,12 @@
563568
},
564569
{
565570
"key": "ibmcloud_api_key",
566-
"type": "multiline_secure_value"
571+
"type": "multiline_secure_value",
572+
"custom_config": {
573+
"grouping": "deployment",
574+
"original_grouping": "deployment",
575+
"type": "multiline_secure_value"
576+
}
567577
}
568578
],
569579
"outputs": [
@@ -946,29 +956,20 @@
946956
],
947957
"custom_config": {}
948958
},
949-
{
950-
"key": "powervs_resource_group_name",
951-
"default_value": "Default",
952-
"custom_config": {
953-
"config_constraints": {
954-
"identifier": "rg_name"
955-
},
956-
"grouping": "deployment",
957-
"original_grouping": "deployment",
958-
"type": "resource_group"
959-
}
960-
},
961959
{
962960
"key": "custom_profile"
963961
},
964962
{
965963
"key": "configure_dns_forwarder"
966964
},
965+
{
966+
"key": "configure_ntp_forwarder"
967+
},
967968
{
968969
"key": "configure_nfs_server"
969970
},
970971
{
971-
"key": "configure_ntp_forwarder"
972+
"key": "dns_forwarder_config"
972973
},
973974
{
974975
"key": "powervs_management_network"
@@ -977,20 +978,34 @@
977978
"key": "powervs_backup_network"
978979
},
979980
{
980-
"key": "powervs_image_names"
981+
"key": "cloud_connection"
981982
},
982983
{
983-
"key": "cloud_connection"
984+
"key": "powervs_image_names"
984985
},
985986
{
986-
"key": "dns_forwarder_config"
987+
"key": "powervs_resource_group_name",
988+
"default_value": "Default",
989+
"custom_config": {
990+
"config_constraints": {
991+
"identifier": "rg_name"
992+
},
993+
"grouping": "deployment",
994+
"original_grouping": "deployment",
995+
"type": "resource_group"
996+
}
987997
},
988998
{
989999
"key": "tags"
9901000
},
9911001
{
9921002
"key": "ibmcloud_api_key",
993-
"type": "multiline_secure_value"
1003+
"type": "multiline_secure_value",
1004+
"custom_config": {
1005+
"grouping": "deployment",
1006+
"original_grouping": "deployment",
1007+
"type": "multiline_secure_value"
1008+
}
9941009
}
9951010
],
9961011
"outputs": [

main.tf

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
#####################################################
44

55
module "initial_validation" {
6-
source = "./submodules/initial_validation"
6+
source = "./submodules/terraform_initial_validation"
77
cloud_connection_validate = {
88
reuse_cloud_connections = var.reuse_cloud_connections
99
transit_gateway_name = var.transit_gateway_name
1010
}
1111
}
1212

13-
module "power_workspace" {
14-
source = "./submodules/power_workspace"
13+
module "powervs_workspace" {
14+
source = "./submodules/powervs_workspace"
1515

1616
powervs_zone = var.powervs_zone
1717
powervs_resource_group_name = var.powervs_resource_group_name
@@ -24,9 +24,9 @@ module "power_workspace" {
2424
powervs_backup_network = var.powervs_backup_network
2525
}
2626

27-
module "cloud_connection_create" {
28-
source = "./submodules/power_cloudconnection_create"
29-
depends_on = [module.power_workspace]
27+
module "powervs_cloud_connection_create" {
28+
source = "./submodules/powervs_cloudconnection_create"
29+
depends_on = [module.powervs_workspace]
3030
count = var.reuse_cloud_connections ? 0 : 1
3131
powervs_zone = var.powervs_zone
3232
powervs_resource_group_name = var.powervs_resource_group_name
@@ -40,20 +40,20 @@ module "cloud_connection_create" {
4040

4141
}
4242

43-
module "cloud_connection_attach" {
44-
source = "./submodules/power_cloudconnection_attach"
45-
depends_on = [module.power_workspace, module.cloud_connection_create]
43+
module "powervs_cloud_connection_attach" {
44+
source = "./submodules/powervs_cloudconnection_attach"
45+
depends_on = [module.powervs_workspace, module.powervs_cloud_connection_create]
4646
powervs_zone = var.powervs_zone
4747
powervs_resource_group_name = var.powervs_resource_group_name
4848
powervs_workspace_name = var.powervs_workspace_name
4949
cloud_connection_count = var.cloud_connection_count
5050
powervs_subnet_names = [var.powervs_management_network.name, var.powervs_backup_network.name]
5151
}
5252

53-
module "power_management_service_squid" {
53+
module "configure_squid" {
5454

55-
source = "./submodules/power_management_services_setup"
56-
depends_on = [module.cloud_connection_attach]
55+
source = "./submodules/configure_network_services"
56+
depends_on = [module.powervs_cloud_connection_attach]
5757
count = var.squid_config["squid_enable"] ? 1 : 0
5858

5959
access_host_or_ip = var.access_host_or_ip
@@ -64,16 +64,16 @@ module "power_management_service_squid" {
6464
}
6565

6666
resource "time_sleep" "wait_for_squid_setup_to_complete" {
67-
depends_on = [module.power_management_service_squid]
67+
depends_on = [module.configure_squid]
6868
count = var.squid_config["squid_enable"] ? 1 : 0
6969

7070
create_duration = "60s"
7171
}
7272

73-
module "power_management_service_dns" {
73+
module "configure_dns" {
7474

75-
source = "./submodules/power_management_services_setup"
76-
depends_on = [module.cloud_connection_attach, module.power_management_service_squid, time_sleep.wait_for_squid_setup_to_complete]
75+
source = "./submodules/configure_network_services"
76+
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, time_sleep.wait_for_squid_setup_to_complete]
7777
count = var.dns_forwarder_config["dns_enable"] ? 1 : 0
7878

7979
access_host_or_ip = var.access_host_or_ip
@@ -83,10 +83,10 @@ module "power_management_service_dns" {
8383
perform_proxy_client_setup = var.perform_proxy_client_setup
8484
}
8585

86-
module "power_management_service_ntp" {
86+
module "configure_ntp" {
8787

88-
source = "./submodules/power_management_services_setup"
89-
depends_on = [module.cloud_connection_attach, module.power_management_service_squid, module.power_management_service_dns, time_sleep.wait_for_squid_setup_to_complete]
88+
source = "./submodules/configure_network_services"
89+
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, time_sleep.wait_for_squid_setup_to_complete]
9090
count = var.ntp_forwarder_config["ntp_enable"] ? 1 : 0
9191

9292
access_host_or_ip = var.access_host_or_ip
@@ -96,10 +96,10 @@ module "power_management_service_ntp" {
9696
perform_proxy_client_setup = var.perform_proxy_client_setup
9797
}
9898

99-
module "power_management_service_nfs" {
99+
module "configure_nfs" {
100100

101-
source = "./submodules/power_management_services_setup"
102-
depends_on = [module.cloud_connection_attach, module.power_management_service_squid, module.power_management_service_dns, module.power_management_service_ntp, time_sleep.wait_for_squid_setup_to_complete]
101+
source = "./submodules/configure_network_services"
102+
depends_on = [module.powervs_cloud_connection_attach, module.configure_squid, module.configure_dns, module.configure_ntp, time_sleep.wait_for_squid_setup_to_complete]
103103
count = var.nfs_config["nfs_enable"] ? 1 : 0
104104

105105
access_host_or_ip = var.access_host_or_ip

0 commit comments

Comments
 (0)