Skip to content

Commit 058c06d

Browse files
authored
feat: The following DA variables have been renamed:<br>- skip_event_notifications_iam_authorization_policy -> skip_secrets_manager_event_notifications_iam_auth_policy<br>- skip_sm_kms_iam_authorization_policy -> skip_secrets_manager_kms_iam_auth_policy<br>- skip_sm_ce_iam_authorization_policy -> skip_secrets_manager_iam_auth_policy (#336)
1 parent 932cb83 commit 058c06d

File tree

9 files changed

+80
-73
lines changed

9 files changed

+80
-73
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ You need the following permissions to run this module.
9898

9999
| Name | Description | Type | Default | Required |
100100
|------|-------------|------|---------|:--------:|
101-
| <a name="input_allowed_network"></a> [allowed\_network](#input\_allowed\_network) | The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`. | `string` | `"public-and-private"` | no |
101+
| <a name="input_allowed_network"></a> [allowed\_network](#input\_allowed\_network) | The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`. For more details, see https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-endpoints#service-endpoints | `string` | `"public-and-private"` | no |
102102
| <a name="input_cbr_rules"></a> [cbr\_rules](#input\_cbr\_rules) | (Optional, list) List of CBR rules to create | <pre>list(object({<br/> description = string<br/> account_id = string<br/> rule_contexts = list(object({<br/> attributes = optional(list(object({<br/> name = string<br/> value = string<br/> }))) }))<br/> enforcement_mode = string<br/> operations = optional(list(object({<br/> api_types = list(object({<br/> api_type_id = string<br/> }))<br/> })))<br/> }))</pre> | `[]` | no |
103103
| <a name="input_enable_event_notification"></a> [enable\_event\_notification](#input\_enable\_event\_notification) | Set this to true to enable lifecycle notifications for your Secrets Manager instance by connecting an Event Notifications service. When setting this to true, a value must be passed for `existing_en_instance_crn` and `existing_sm_instance_crn` must be null. | `bool` | `false` | no |
104104
| <a name="input_endpoint_type"></a> [endpoint\_type](#input\_endpoint\_type) | The type of endpoint (public or private) to connect to the Secrets Manager API. The Terraform provider uses this endpoint type to interact with the Secrets Manager API and configure Event Notifications. | `string` | `"public"` | no |

ibm_catalog.json

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
}
193193
},
194194
{
195-
"key": "skip_sm_ce_iam_authorization_policy"
195+
"key": "skip_secrets_manager_iam_auth_policy"
196196
},
197197
{
198198
"key": "allowed_network",
@@ -217,32 +217,31 @@
217217
"key": "existing_secrets_manager_kms_key_crn"
218218
},
219219
{
220-
"key": "skip_sm_kms_iam_authorization_policy"
220+
"key": "skip_secrets_manager_kms_iam_auth_policy"
221221
},
222222
{
223223
"key": "ibmcloud_kms_api_key"
224224
},
225-
{
226-
"key": "kms_endpoint_type",
227-
"options": [
228-
{
229-
"displayname": "Public",
230-
"value": "public"
231-
},
232-
{
233-
"displayname": "Private",
234-
"value": "private"
235-
}
236-
]
237-
},
238225
{
239226
"key": "kms_key_ring_name"
240227
},
241228
{
242229
"key": "kms_key_name"
243230
},
244231
{
245-
"key": "event_notifications_email_list"
232+
"key": "kms_endpoint_type",
233+
"hidden": true
234+
},
235+
{
236+
"key": "event_notifications_email_list",
237+
"type": "array",
238+
"custom_config": {
239+
"grouping": "deployment",
240+
"original_grouping": "deployment",
241+
"config_constraints": {
242+
"type": "string"
243+
}
244+
}
246245
},
247246
{
248247
"key": "event_notifications_from_email"
@@ -254,7 +253,7 @@
254253
"key": "existing_event_notifications_instance_crn"
255254
},
256255
{
257-
"key": "skip_event_notifications_iam_authorization_policy"
256+
"key": "skip_secrets_manager_event_notifications_iam_auth_policy"
258257
},
259258
{
260259
"key": "secrets_manager_cbr_rules"
@@ -425,7 +424,7 @@
425424
}
426425
},
427426
{
428-
"key": "skip_sm_ce_iam_authorization_policy"
427+
"key": "skip_secrets_manager_iam_auth_policy"
429428
},
430429
{
431430
"key": "existing_resource_group_name",
@@ -443,7 +442,7 @@
443442
"key": "existing_secrets_manager_kms_key_crn"
444443
},
445444
{
446-
"key": "skip_sm_kms_iam_authorization_policy"
445+
"key": "skip_secrets_manager_kms_iam_auth_policy"
447446
},
448447
{
449448
"key": "ibmcloud_kms_api_key"
@@ -455,7 +454,15 @@
455454
"key": "kms_key_name"
456455
},
457456
{
458-
"key": "event_notifications_email_list"
457+
"key": "event_notifications_email_list",
458+
"type": "array",
459+
"custom_config": {
460+
"grouping": "deployment",
461+
"original_grouping": "deployment",
462+
"config_constraints": {
463+
"type": "string"
464+
}
465+
}
459466
},
460467
{
461468
"key": "event_notifications_from_email"
@@ -467,7 +474,7 @@
467474
"key": "existing_event_notifications_instance_crn"
468475
},
469476
{
470-
"key": "skip_event_notifications_iam_authorization_policy"
477+
"key": "skip_secrets_manager_event_notifications_iam_auth_policy"
471478
},
472479
{
473480
"key": "secrets_manager_cbr_rules"

solutions/fully-configurable/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ This solution supports the following:
4949

5050
| Name | Description | Type | Default | Required |
5151
|------|-------------|------|---------|:--------:|
52-
| <a name="input_allowed_network"></a> [allowed\_network](#input\_allowed\_network) | The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`. | `string` | `"private-only"` | no |
52+
| <a name="input_allowed_network"></a> [allowed\_network](#input\_allowed\_network) | The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-endpoints#service-endpoints). | `string` | `"private-only"` | no |
5353
| <a name="input_event_notifications_email_list"></a> [event\_notifications\_email\_list](#input\_event\_notifications\_email\_list) | The list of email address to target out when Secrets Manager triggers an event | `list(string)` | `[]` | no |
5454
| <a name="input_event_notifications_from_email"></a> [event\_notifications\_from\_email](#input\_event\_notifications\_from\_email) | The email address used to send any Secrets Manager event coming via Event Notifications | `string` | `"compliancealert@ibm.com"` | no |
5555
| <a name="input_event_notifications_reply_to_email"></a> [event\_notifications\_reply\_to\_email](#input\_event\_notifications\_reply\_to\_email) | The email address specified in the 'reply\_to' section for any Secret Manager event coming via Event Notifications | `string` | `"no-reply@ibm.com"` | no |
@@ -73,9 +73,9 @@ This solution supports the following:
7373
| <a name="input_secrets_manager_instance_name"></a> [secrets\_manager\_instance\_name](#input\_secrets\_manager\_instance\_name) | The name to give the Secrets Manager instance provisioned by this solution. If a prefix input variable is specified, it is added to the value in the `<prefix>-value` format. Applies only if `existing_secrets_manager_crn` is not provided. | `string` | `"secrets-manager"` | no |
7474
| <a name="input_secrets_manager_resource_tags"></a> [secrets\_manager\_resource\_tags](#input\_secrets\_manager\_resource\_tags) | The list of resource tags you want to associate with your Secrets Manager instance. Applies only if `existing_secrets_manager_crn` is not provided. | `list(any)` | `[]` | no |
7575
| <a name="input_service_plan"></a> [service\_plan](#input\_service\_plan) | 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). | `string` | n/a | yes |
76-
| <a name="input_skip_event_notifications_iam_authorization_policy"></a> [skip\_event\_notifications\_iam\_authorization\_policy](#input\_skip\_event\_notifications\_iam\_authorization\_policy) | If set to true, this skips the creation of a service to service authorization from Secrets Manager to Event Notifications. If false, the service to service authorization is created. | `bool` | `false` | no |
77-
| <a name="input_skip_sm_ce_iam_authorization_policy"></a> [skip\_sm\_ce\_iam\_authorization\_policy](#input\_skip\_sm\_ce\_iam\_authorization\_policy) | Whether to skip the creation of the IAM authorization policies required to enable the IAM credentials engine. If set to false, policies will be created that grants the Secrets Manager instance 'Operator' access to the IAM identity service, and 'Groups Service Member Manage' access to the IAM groups service. | `bool` | `false` | no |
78-
| <a name="input_skip_sm_kms_iam_authorization_policy"></a> [skip\_sm\_kms\_iam\_authorization\_policy](#input\_skip\_sm\_kms\_iam\_authorization\_policy) | Set to true to skip the creation of an IAM authorization policy that permits all Secrets Manager instances in the resource group to read the encryption key from the KMS instance. If set to false, pass in a value for the KMS instance in the `existing_kms_instance_crn` variable. If a value is specified for `ibmcloud_kms_api_key`, the policy is created in the KMS account. | `bool` | `false` | no |
76+
| <a name="input_skip_secrets_manager_event_notifications_iam_auth_policy"></a> [skip\_secrets\_manager\_event\_notifications\_iam\_auth\_policy](#input\_skip\_secrets\_manager\_event\_notifications\_iam\_auth\_policy) | If set to true, this skips the creation of a service to service authorization from Secrets Manager to Event Notifications. If false, the service to service authorization is created. | `bool` | `false` | no |
77+
| <a name="input_skip_secrets_manager_iam_auth_policy"></a> [skip\_secrets\_manager\_iam\_auth\_policy](#input\_skip\_secrets\_manager\_iam\_auth\_policy) | Whether to skip the creation of the IAM authorization policies required to enable the IAM credentials engine (if you are using an existing Secrets Manager isntance, attempting to re-create can cause conflicts if the policies already exist). If set to false, policies will be created that grants the Secrets Manager instance 'Operator' access to the IAM identity service, and 'Groups Service Member Manage' access to the IAM groups service. | `bool` | `false` | no |
78+
| <a name="input_skip_secrets_manager_kms_iam_auth_policy"></a> [skip\_secrets\_manager\_kms\_iam\_auth\_policy](#input\_skip\_secrets\_manager\_kms\_iam\_auth\_policy) | Set to true to skip the creation of an IAM authorization policy that permits all Secrets Manager instances in the resource group to read the encryption key from the KMS instance. If set to false, pass in a value for the KMS instance in the `existing_kms_instance_crn` variable. If a value is specified for `ibmcloud_kms_api_key`, the policy is created in the KMS account. | `bool` | `false` | no |
7979

8080
### Outputs
8181

solutions/fully-configurable/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ locals {
2424
parsed_service_name = var.existing_kms_instance_crn != null ? module.kms_instance_crn_parser[0].service_name : (var.existing_secrets_manager_kms_key_crn != null ? module.kms_key_crn_parser[0].service_name : null)
2525
is_hpcs_key = local.parsed_service_name == "hs-crypto" ? true : false
2626

27-
create_cross_account_auth_policy = var.existing_secrets_manager_crn == null && !var.skip_sm_kms_iam_authorization_policy && var.ibmcloud_kms_api_key != null
27+
create_cross_account_auth_policy = var.existing_secrets_manager_crn == null && !var.skip_secrets_manager_kms_iam_auth_policy && var.ibmcloud_kms_api_key != null
2828
create_cross_account_hpcs_auth_policy = local.create_cross_account_auth_policy == true && local.is_hpcs_key ? 1 : 0
2929

3030
kms_service_name = var.existing_secrets_manager_kms_key_crn != null ? module.kms_key_crn_parser[0].service_name : (var.existing_kms_instance_crn != null ? module.kms_instance_crn_parser[0].service_name : null)
@@ -174,16 +174,16 @@ module "secrets_manager" {
174174
secrets_manager_name = "${local.prefix}${var.secrets_manager_instance_name}"
175175
sm_service_plan = var.service_plan
176176
sm_tags = var.secrets_manager_resource_tags
177-
skip_iam_authorization_policy = var.skip_sm_ce_iam_authorization_policy
177+
skip_iam_authorization_policy = var.skip_secrets_manager_iam_auth_policy
178178
# kms dependency
179179
is_hpcs_key = local.is_hpcs_key
180180
kms_encryption_enabled = var.kms_encryption_enabled
181181
kms_key_crn = local.kms_key_crn
182-
skip_kms_iam_authorization_policy = var.skip_sm_kms_iam_authorization_policy || local.create_cross_account_auth_policy
182+
skip_kms_iam_authorization_policy = var.skip_secrets_manager_kms_iam_auth_policy || local.create_cross_account_auth_policy
183183
# event notifications dependency
184184
enable_event_notification = local.enable_event_notifications
185185
existing_en_instance_crn = var.existing_event_notifications_instance_crn
186-
skip_en_iam_authorization_policy = var.skip_event_notifications_iam_authorization_policy
186+
skip_en_iam_authorization_policy = var.skip_secrets_manager_event_notifications_iam_auth_policy
187187
cbr_rules = var.secrets_manager_cbr_rules
188188
endpoint_type = var.secrets_manager_endpoint_type
189189
allowed_network = var.allowed_network

solutions/fully-configurable/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ variable "service_plan" {
7676
}
7777
}
7878

79-
variable "skip_sm_ce_iam_authorization_policy" {
79+
variable "skip_secrets_manager_iam_auth_policy" {
8080
type = bool
81-
description = "Whether to skip the creation of the IAM authorization policies required to enable the IAM credentials engine. If set to false, policies will be created that grants the Secrets Manager instance 'Operator' access to the IAM identity service, and 'Groups Service Member Manage' access to the IAM groups service."
81+
description = "Whether to skip the creation of the IAM authorization policies required to enable the IAM credentials engine (if you are using an existing Secrets Manager isntance, attempting to re-create can cause conflicts if the policies already exist). If set to false, policies will be created that grants the Secrets Manager instance 'Operator' access to the IAM identity service, and 'Groups Service Member Manage' access to the IAM groups service."
8282
default = false
8383
}
8484

@@ -100,7 +100,7 @@ variable "secrets_manager_endpoint_type" {
100100

101101
variable "allowed_network" {
102102
type = string
103-
description = "The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`."
103+
description = "The types of service endpoints to set on the Secrets Manager instance. Possible values are `private-only` or `public-and-private`. [Learn more](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-endpoints#service-endpoints)."
104104
default = "private-only"
105105
validation {
106106
condition = contains(["private-only", "public-and-private"], var.allowed_network)
@@ -149,7 +149,7 @@ variable "secret_groups" {
149149
# Key Protect
150150
########################################################################################################################
151151

152-
variable "skip_sm_kms_iam_authorization_policy" {
152+
variable "skip_secrets_manager_kms_iam_auth_policy" {
153153
type = bool
154154
description = "Set to true to skip the creation of an IAM authorization policy that permits all Secrets Manager instances in the resource group to read the encryption key from the KMS instance. If set to false, pass in a value for the KMS instance in the `existing_kms_instance_crn` variable. If a value is specified for `ibmcloud_kms_api_key`, the policy is created in the KMS account."
155155
default = false
@@ -249,7 +249,7 @@ variable "existing_event_notifications_instance_crn" {
249249
default = null
250250
}
251251

252-
variable "skip_event_notifications_iam_authorization_policy" {
252+
variable "skip_secrets_manager_event_notifications_iam_auth_policy" {
253253
type = bool
254254
description = "If set to true, this skips the creation of a service to service authorization from Secrets Manager to Event Notifications. If false, the service to service authorization is created."
255255
default = false

0 commit comments

Comments
 (0)