Skip to content

Commit 8d3eda2

Browse files
authored
feat: remove Account Config DA from customize DA flow, update default network ACLs and added default value for prefix using random string generator (#84)
1 parent ca6cfd7 commit 8d3eda2

File tree

4 files changed

+32
-19
lines changed

4 files changed

+32
-19
lines changed

ibm_catalog.json

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"containers",
1313
"target_roks",
1414
"clusters",
15+
"converged_infra",
1516
"platform_engineering"
1617
],
1718
"keywords": [
@@ -87,19 +88,12 @@
8788
"service_name": "Resource group only",
8889
"notes": "Viewer access is required in the resource group you want to provision in."
8990
},
90-
{
91-
"role_crns": [
92-
"crn:v1:bluemix:public:iam::::role:Administrator"
93-
],
94-
"service_name": "All Account Management services",
95-
"notes": "[Optional] Required to create new resource groups when enabling the Account Configuration integration."
96-
},
9791
{
9892
"role_crns": [
9993
"crn:v1:bluemix:public:iam::::role:Administrator"
10094
],
10195
"service_name": "All Identity and Access enabled services",
102-
"notes": "[Optional] Required to create new resource groups with account settings when enabling the Account Configuration integration."
96+
"notes": "[Optional] Required to to create trusted profile for App Configuration aggregator which is used for compliance scanning."
10397
},
10498
{
10599
"role_crns": [
@@ -245,7 +239,17 @@
245239
{
246240
"key": "prefix",
247241
"required": true,
248-
"description": "The prefix to add to all resources that this solution creates. To not use any prefix value, you can enter the string `__NULL__`."
242+
"default_value": "dev",
243+
"random_string": {
244+
"length": 4
245+
},
246+
"value_constraints": [
247+
{
248+
"type": "regex",
249+
"description": "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--'). It should not exceed 16 characters.",
250+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
251+
}
252+
]
249253
},
250254
{
251255
"key": "existing_resource_group_name",
@@ -259,7 +263,7 @@
259263
}
260264
},
261265
"default_value": "Default",
262-
"description": "The name of an existing resource group to provision the resources."
266+
"description": "The name of an existing resource group to provision the resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
263267
},
264268
{
265269
"key": "region",
@@ -574,7 +578,7 @@
574578
{
575579
"key": "network_acls",
576580
"type": "list(object)",
577-
"default_value": "[\n {\n name = \"vpc-acl\"\n add_ibm_cloud_internal_rules = true\n add_vpc_connectivity_rules = true\n prepend_ibm_rules = true\n rules = [\n {\n name = \"allow-all-443-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n port_min = 443\n port_max = 443\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-80-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n port_min = 80\n port_max = 80\n source_port_min = 80\n source_port_max = 80\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-ingress-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n source_port_min = 30000\n source_port_max = 32767\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-443-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n source_port_min = 443\n source_port_max = 443\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-80-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n source_port_min = 80\n source_port_max = 80\n port_min = 80\n port_max = 80\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-ingress-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n port_min = 30000\n port_max = 32767\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n }\n ]\n }\n]",
581+
"default_value": "[\n { name = \"vpc-acl\"\n add_ibm_cloud_internal_rules = true\n add_vpc_connectivity_rules = true\n prepend_ibm_rules = true\n rules = [\n {\n name = \"allow-all-443-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n source_port_min = 443\n source_port_max = 443\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-80-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n source_port_min = 80\n source_port_max = 80\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-ingress-inbound\"\n action = \"allow\"\n direction = \"inbound\"\n tcp = {\n source_port_min = 30000\n source_port_max = 32767\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-443-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n port_max = 443\n port_min = 443\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-80-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n port_min = 80\n port_max = 80\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n },\n {\n name = \"allow-all-ingress-outbound\"\n action = \"allow\"\n direction = \"outbound\"\n tcp = {\n port_min = 30000\n port_max = 32767\n }\n destination = \"0.0.0.0/0\"\n source = \"0.0.0.0/0\"\n }\n ]\n }\n]",
578582
"description": "The list of ACLs to create. Provide at least one rule for each ACL. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone-vpc/blob/main/solutions/fully-configurable/DA-types.md#network-acls-).",
579583
"required": false,
580584
"virtual": true,
@@ -671,7 +675,7 @@
671675
"reference_version": true
672676
}
673677
],
674-
"version": "v3.63.1"
678+
"version": "v3.66.0"
675679
}
676680
],
677681
"dependency_version_2": true,
@@ -748,7 +752,18 @@
748752
"configuration": [
749753
{
750754
"key": "prefix",
751-
"required": true
755+
"required": true,
756+
"default_value": "dev",
757+
"random_string": {
758+
"length": 4
759+
},
760+
"value_constraints": [
761+
{
762+
"type": "regex",
763+
"description": "Prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It must not end with a hyphen('-'), and cannot contain consecutive hyphens ('--'). It should not exceed 16 characters.",
764+
"value": "^$|^__NULL__$|^[a-z](?!.*--)(?:[a-z0-9-]{0,14}[a-z0-9])?$"
765+
}
766+
]
752767
},
753768
{
754769
"key": "existing_resource_group_name",
@@ -762,7 +777,7 @@
762777
}
763778
},
764779
"default_value": "Default",
765-
"description": "The name of an existing resource group to provision the resources."
780+
"description": "The name of an existing resource group to provision the resources. [Learn more](https://cloud.ibm.com/docs/account?topic=account-rgs&interface=ui#create_rgs) about how to create a resource group."
766781
},
767782
{
768783
"key": "default_worker_pool_machine_type",

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ locals {
88
variable "prefix" {
99
type = string
1010
nullable = true
11-
description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: prod-0205-ocpai. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
11+
description = "The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To skip using a prefix, set this value to `null` or an empty string. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
1212

1313
validation {
1414
# - null and empty string is allowed

solutions/quickstart/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ variable "provider_visibility" {
2626
variable "prefix" {
2727
type = string
2828
nullable = true
29-
description = "The prefix to be added to all resources created by this solution. To skip using a prefix, set this value to null or an empty string. The prefix must begin with a lowercase letter and may contain only lowercase letters, digits, and hyphens '-'. It should not exceed 16 characters, must not end with a hyphen('-'), and can not contain consecutive hyphens ('--'). Example: prod-0205-ocpai. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
29+
description = "The prefix to add to all resources that this solution creates (e.g `prod`, `test`, `dev`). To skip using a prefix, set this value to `null` or an empty string. [Learn more](https://terraform-ibm-modules.github.io/documentation/#/prefix.md)."
3030

3131
validation {
3232
# - null and empty string is allowed

tests/pr_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ func TestAddonDefaultConfiguration(t *testing.T) {
160160
options.Prefix,
161161
"deploy-arch-ibm-ocp-ai",
162162
"fully-configurable",
163-
map[string]interface{}{
164-
"prefix": options.Prefix,
165-
},
163+
map[string]interface{}{},
166164
)
167165

168166
options.AddonConfig.Dependencies = []cloudinfo.AddonConfig{

0 commit comments

Comments
 (0)