Skip to content

Commit dc8ce65

Browse files
authored
feat: added support to enable the secrets manager IAM engine using new boolean input secret_manager_iam_engine_enabled (default value is false) (#70)
1 parent f870232 commit dc8ce65

File tree

7 files changed

+35
-12
lines changed

7 files changed

+35
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ on:
77
- created
88
jobs:
99
call-terraform-ci-pipeline:
10-
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected].3
10+
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected].4
1111
secrets: inherit

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ on:
88

99
jobs:
1010
call-terraform-release-pipeline:
11-
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected].3
11+
uses: terraform-ibm-modules/common-pipeline-assets/.github/workflows/[email protected].4
1212
secrets: inherit

ibm_catalog.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
"title": "Creates an IBM Secrets Manager instance ",
128128
"description": "Creates and configures an IBM Secrets Manager instance."
129129
},
130+
{
131+
"title": "Optionally configure an IBM Secrets Manager IAM credentials engine to an IBM Secrets Manager instance.",
132+
"description": "Optionally configure an IBM Secrets Manager IAM credentials engine to an IBM Secrets Manager instance."
133+
},
130134
{
131135
"title": "Creates an IBM Security and Compliance Center instance",
132136
"description": "Creates and configures an IBM Security Compliance Center instance."
@@ -242,6 +246,13 @@
242246
}
243247
]
244248
},
249+
{
250+
"key": "secret_manager_iam_engine_enabled",
251+
"type": "boolean",
252+
"default_value": false,
253+
"description": "Set this to true to to configure a Secrets Manager IAM credentials engine. If set to false, no IAM engine will be configured for your instance.",
254+
"required": false
255+
},
245256
{
246257
"key": "scc_service_plan",
247258
"type": "string",

reference-architectures/core-security-services-architecture.svg

Lines changed: 1 addition & 1 deletion
Loading

stack_definition.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,14 @@
7171
"hidden": false,
7272
"default": "security-compliance-center-standard-plan",
7373
"custom_config": {}
74-
}
74+
},
75+
{
76+
"name": "secret_manager_iam_engine_enabled",
77+
"required": false,
78+
"type": "boolean",
79+
"hidden": false,
80+
"default": false
81+
}
7582
],
7683
"members": [
7784
{
@@ -303,7 +310,11 @@
303310
{
304311
"name": "service_plan",
305312
"value": "ref:../../inputs/sm_service_plan"
306-
}
313+
},
314+
{
315+
"name": "iam_engine_enabled",
316+
"value": "ref:../../inputs/secret_manager_iam_engine_enabled"
317+
}
307318
],
308319
"name": "4b - Secrets Manager",
309320
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.c93ef740-6249-47d0-b91a-c8e0fbd0ed99-global"

tests/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/terraform-ibm-modules/stack-ibm-core-security-services
22

33
go 1.21
44

5-
toolchain go1.22.4
5+
toolchain go1.22.5
66

77
require (
88
github.com/stretchr/testify v1.9.0

tests/pr_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ func TestProjectsFullTest(t *testing.T) {
3838
})
3939

4040
options.StackInputs = map[string]interface{}{
41-
"prefix": options.Prefix,
42-
"existing_resource_group_name": resourceGroup,
43-
"sm_service_plan": "trial",
44-
"ibmcloud_api_key": options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], // always required by the stack
45-
"enable_platform_logs_metrics": false,
46-
"en_email_list": []string{"[email protected]"},
41+
"prefix": options.Prefix,
42+
"existing_resource_group_name": resourceGroup,
43+
"sm_service_plan": "trial",
44+
"secret_manager_iam_engine_enabled": true,
45+
"ibmcloud_api_key": options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], // always required by the stack
46+
"enable_platform_logs_metrics": false,
47+
"en_email_list": []string{"[email protected]"},
4748
}
4849

4950
err := options.RunProjectsTest()

0 commit comments

Comments
 (0)