Skip to content

Commit 0fcf890

Browse files
authored
fix: removed default null from subscriptionID (#93)
1 parent a0b14fc commit 0fcf890

File tree

4 files changed

+84
-8
lines changed

4 files changed

+84
-8
lines changed

cra-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CRA_TARGETS:
1010
TF_VAR_source_repo: "https://github.com/tim-openliberty-appflow-test/sample-getting-started"
1111
TF_VAR_repos_git_token_secret_crn: "crn:v1:bluemix:public:secrets-manager:us-south:a/abac0df06b644a9cabc6e44f55b3880e:79c6d411-c18f-4670-b009-b0044a238667:secret:825a3797-1bc8-f47a-611a-c9bd2b0ef846" # pragma: allowlist secret
1212
TF_VAR_subscription_id_secret_crn: "crn:v1:bluemix:public:secrets-manager:us-south:a/abac0df06b644a9cabc6e44f55b3880e:79c6d411-c18f-4670-b009-b0044a238667:secret:71363d27-db8d-dd07-c72b-59ecb3884a8f" # pragma: allowlist secret
13+
TF_VAR_subscription_id: "null" # pragma: allowlist secret
1314
TF_VAR_existing_resource_group_name: "geretain-test-e4j"
1415
TF_VAR_prefix: "e4j-cra"
1516
TF_VAR_provider_visibility: "public"

ibm_catalog.json

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"fully-configurable"
8585
],
8686
"catalog_id": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3",
87-
"version": "v2.6.1",
87+
"version": "v2.6.3",
8888
"optional": true,
8989
"on_by_default": true,
9090
"default_flavor": "fully-configurable",
@@ -95,12 +95,18 @@
9595
"version_input": "prefix"
9696
},
9797
{
98-
"dependency_output": "secrets_manager_crn",
99-
"version_input": "existing_secrets_manager_crn"
98+
"dependency_input": "service_plan",
99+
"version_input": "secrets_manager_service_plan",
100+
"reference_version": true
101+
},
102+
{
103+
"dependency_input": "region",
104+
"version_input": "secrets_manager_region",
105+
"reference_version": true
100106
},
101107
{
102-
"value": "us-south",
103-
"dependency_input": "region"
108+
"dependency_output": "secrets_manager_crn",
109+
"version_input": "existing_secrets_manager_crn"
104110
}
105111
]
106112
},
@@ -289,6 +295,7 @@
289295
},
290296
{
291297
"key": "subscription_id",
298+
"description": "ID of the subscription to use to create the Enterprise Application Service instance. If you don't want to pass it explicitly you should set it to null.",
292299
"required": true
293300
},
294301
{
@@ -303,6 +310,73 @@
303310
}
304311
}
305312
},
313+
{
314+
"key": "secrets_manager_region",
315+
"required": true,
316+
"virtual": true,
317+
"default_value": "us-south",
318+
"description": "The region to provision a new Secrets Manager instance in.",
319+
"options": [
320+
{
321+
"displayname": "Osaka (jp-osa)",
322+
"value": "jp-osa"
323+
},
324+
{
325+
"displayname": "Sydney (au-syd)",
326+
"value": "au-syd"
327+
},
328+
{
329+
"displayname": "Tokyo (jp-tok)",
330+
"value": "jp-tok"
331+
},
332+
{
333+
"displayname": "Frankfurt (eu-de)",
334+
"value": "eu-de"
335+
},
336+
{
337+
"displayname": "London (eu-gb)",
338+
"value": "eu-gb"
339+
},
340+
{
341+
"displayname": "Madrid (eu-es)",
342+
"value": "eu-es"
343+
},
344+
{
345+
"displayname": "Dallas (us-south)",
346+
"value": "us-south"
347+
},
348+
{
349+
"displayname": "Toronto (ca-tor)",
350+
"value": "ca-tor"
351+
},
352+
{
353+
"displayname": "Washington DC (us-east)",
354+
"value": "us-east"
355+
},
356+
{
357+
"displayname": "Sao Paulo (br-sao)",
358+
"value": "br-sao"
359+
}
360+
]
361+
},
362+
{
363+
"key": "secrets_manager_service_plan",
364+
"required": true,
365+
"virtual": true,
366+
"type": "string",
367+
"options": [
368+
{
369+
"displayname": "Standard",
370+
"value": "standard"
371+
},
372+
{
373+
"displayname": "Trial",
374+
"value": "trial"
375+
}
376+
],
377+
"default_value": "__NOT_SET__",
378+
"description": "The pricing plan to use when provisioning a Secrets Manager instance. Possible values: `standard`, `trial`. You can create only one Trial instance of Secrets Manager per account. Before you can create a new Trial instance, you must delete the existing Trial instance and its reclamation. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-create-instance&interface=ui#upgrade-instance-standard)."
379+
},
306380
{
307381
"key": "enable_platform_metrics",
308382
"type": "string",

solutions/fully-configurable/variables.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ variable "repos_git_token" {
127127

128128
variable "subscription_id" {
129129
type = string
130-
description = "ID of the subscription to use to create the Enterprise Application Service instance."
131-
default = null
130+
description = "ID of the subscription to use to create the Enterprise Application Service instance. Set to null to use the value from subscription_id_secret_crn."
132131
sensitive = true
133132
}
134133

135134
variable "subscription_id_secret_crn" {
136135
type = string
137-
description = "The CRN of the existing secret storing on Secrets Manager the subscriptionID to use to create the Enterprise Application Service instance."
136+
description = "The CRN of the existing secret storing on Secrets Manager the subscriptionID to use to create the Enterprise Application Service instance. Default to null."
138137
default = null
139138
validation {
140139
condition = var.subscription_id_secret_crn == null ? var.subscription_id != null : true

tests/pr_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ func TestRunStandardSolutionSchematics(t *testing.T) {
225225
{Name: "config_repo", Value: appConfigRepo, DataType: "string"},
226226
{Name: "repos_git_token_secret_crn", Value: ghTokenSecretCRN, DataType: "string"},
227227
{Name: "subscription_id_secret_crn", Value: subscriptionIdSecretCRN, DataType: "string"},
228+
{Name: "subscription_id", Value: nil, DataType: "string"},
228229
{Name: "plan", Value: testPlan, DataType: "string"},
229230
{Name: "region", Value: region, DataType: "string"},
230231
{Name: "prefix", Value: options.Prefix, DataType: "string"},
@@ -266,6 +267,7 @@ func TestRunStandardSolutionUpgradeSchematics(t *testing.T) {
266267
{Name: "config_repo", Value: appConfigRepo, DataType: "string"},
267268
{Name: "repos_git_token_secret_crn", Value: ghTokenSecretCRN, DataType: "string"},
268269
{Name: "subscription_id_secret_crn", Value: subscriptionIdSecretCRN, DataType: "string"},
270+
{Name: "subscription_id", Value: "null", DataType: "string"},
269271
{Name: "plan", Value: testPlan, DataType: "string"},
270272
{Name: "region", Value: region, DataType: "string"},
271273
{Name: "prefix", Value: options.Prefix, DataType: "string"},

0 commit comments

Comments
 (0)