Skip to content

Commit 87724ea

Browse files
author
Md Anam Raihan
committed
fix: resolve comments
1 parent 6e5f319 commit 87724ea

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

ibm_catalog.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@
232232
{
233233
"key": "existing_secrets_endpoint_type",
234234
"type": "string",
235-
"default_value": "__NULL__",
236-
"description": "The endpoint type to use if existing_secrets_manager_crn is specified.",
235+
"default_value": "private",
236+
"description": "The endpoint type to use if `existing_secrets_manager_crn` is specified.",
237237
"required": false
238238
},
239239
{
@@ -264,21 +264,21 @@
264264
"key": "secret_manager_public_engine_enabled",
265265
"type": "boolean",
266266
"default_value": false,
267-
"description": "Set this to true to configure a Secrets Manager public certificate engine for an existing Secrets Manager instance. If set to false, no public certificate engine will be configured for your instance.",
267+
"description": "Whether to configure a Secrets Manager public certificate engine for an existing Secrets Manager instance. If `false`, no public certificate engine is configured for your instance.",
268268
"required": false
269269
},
270270
{
271271
"key": "cis_id",
272272
"type": "string",
273273
"default_value": "__NULL__",
274-
"description": "Cloud Internet Service ID.",
274+
"description": "Cloud Internet Service ID. Required if secret_manager_public_engine_enabled is set to true",
275275
"required": false
276276
},
277277
{
278278
"key": "ca_name",
279279
"type": "string",
280280
"default_value": "cert-auth",
281-
"description": "The name of the certificate authority for Secrets Manager.",
281+
"description": "The name of the certificate authority for Secrets Manager. Required if secret_manager_public_engine_enabled is set to true",
282282
"required": false
283283
},
284284
{
@@ -292,8 +292,9 @@
292292
"key": "acme_letsencrypt_private_key",
293293
"type": "string",
294294
"default_value": "__NULL__",
295-
"description": "The private key generated by the ACME account creation tool.",
296-
"required": false
295+
"description": "The private key generated by the ACME account creation tool. For more information, see [documentation](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-prepare-order-certificates)",
296+
"required": false,
297+
"sensitive": true
297298
},
298299
{
299300
"key": "scc_service_plan",

stack_definition.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"required": false,
9494
"type": "string",
9595
"hidden": false,
96-
"default": "__NULL__",
96+
"default": "private",
9797
"custom_config": {}
9898
},
9999
{

tests/pr_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const yamlLocation = "../common-dev-assets/common-go-assets/common-permanent-res
2828

2929
var permanentResources map[string]interface{}
3030

31+
var acme_letsencrypt_private_key *string
32+
3133
// Current supported regions
3234
var validRegions = []string{
3335
"us-south",
@@ -39,6 +41,13 @@ func TestMain(m *testing.M) {
3941
// Read the YAML file contents
4042
var err error
4143
permanentResources, err = common.LoadMapFromYaml(yamlLocation)
44+
45+
acme_letsencrypt_private_key = GetSecretsManagerKey( // pragma: allowlist secret
46+
permanentResources["acme_letsencrypt_private_key_sm_id"].(string),
47+
permanentResources["acme_letsencrypt_private_key_sm_region"].(string),
48+
permanentResources["acme_letsencrypt_private_key_secret_id"].(string),
49+
)
50+
4251
if err != nil {
4352
log.Fatal(err)
4453
}
@@ -49,12 +58,6 @@ func TestMain(m *testing.M) {
4958
func TestProjectsFullTest(t *testing.T) {
5059
t.Parallel()
5160

52-
acme_letsencrypt_private_key := GetSecretsManagerKey( // pragma: allowlist secret
53-
permanentResources["acme_letsencrypt_private_key_sm_id"].(string),
54-
permanentResources["acme_letsencrypt_private_key_sm_region"].(string),
55-
permanentResources["acme_letsencrypt_private_key_secret_id"].(string),
56-
)
57-
5861
options := testprojects.TestProjectOptionsDefault(&testprojects.TestProjectsOptions{
5962
Testing: t,
6063
Prefix: "cs", // setting prefix here gets a random string appended to it
@@ -111,12 +114,6 @@ func GetSecretsManagerKey(sm_id string, sm_region string, sm_key_id string) *str
111114
func TestProjectsExistingResourcesTest(t *testing.T) {
112115
t.Parallel()
113116

114-
acme_letsencrypt_private_key := GetSecretsManagerKey( // pragma: allowlist secret
115-
permanentResources["acme_letsencrypt_private_key_sm_id"].(string),
116-
permanentResources["acme_letsencrypt_private_key_sm_region"].(string),
117-
permanentResources["acme_letsencrypt_private_key_secret_id"].(string),
118-
)
119-
120117
// ------------------------------------------------------------------------------------
121118
// Provision RG, EN and SM
122119
// ------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)