You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[ibm_resource_instance.sm_instance](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/resource_instance)| data source |
90
91
91
92
### Inputs
92
93
@@ -98,12 +99,13 @@ You need the following permissions to run this module.
98
99
| <aname="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 |
99
100
| <aname="input_existing_en_instance_crn"></a> [existing\_en\_instance\_crn](#input\_existing\_en\_instance\_crn)| The CRN of the Event Notifications service to enable lifecycle notifications for your Secrets Manager instance. |`string`|`null`| no |
100
101
| <aname="input_existing_kms_instance_guid"></a> [existing\_kms\_instance\_guid](#input\_existing\_kms\_instance\_guid)| The GUID of the Hyper Protect Crypto Services or Key Protect instance in which the key specified in `kms_key_crn` is coming from. Required only if `kms_encryption_enabled` is set to true, and `skip_kms_iam_authorization_policy` is set to false. |`string`|`null`| no |
102
+
| <aname="input_existing_sm_instance_crn"></a> [existing\_sm\_instance\_crn](#input\_existing\_sm\_instance\_crn)| An existing Secrets Manager instance CRN. If not provided an new instance will be provisioned. |`string`|`null`| no |
101
103
| <aname="input_kms_encryption_enabled"></a> [kms\_encryption\_enabled](#input\_kms\_encryption\_enabled)| Set this to true to control the encryption keys used to encrypt the data that you store in Secrets Manager. If set to false, the data that you store is encrypted at rest by using envelope encryption. For more details, see https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-mng-data&interface=ui#about-encryption.|`bool`|`false`| no |
102
104
| <aname="input_kms_key_crn"></a> [kms\_key\_crn](#input\_kms\_key\_crn)| The root key CRN of a Key Management Service like Key Protect or Hyper Protect Crypto Services (HPCS) that you want to use for encryption. Only used if `kms_encryption_enabled` is set to true. |`string`|`null`| no |
103
-
| <aname="input_region"></a> [region](#input\_region)| The region to provision the Secrets Manager instance to. |`string`|n/a|yes|
104
-
| <aname="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id)| The ID of the resource group to provision the Secrets Manager instance to. |`string`| n/a | yes |
105
+
| <aname="input_region"></a> [region](#input\_region)| The region where the resource will be provisioned.Its not required if passing a value for `existing_sm_instance_crn`. |`string`|`null`|no|
106
+
| <aname="input_resource_group_id"></a> [resource\_group\_id](#input\_resource\_group\_id)| The ID of the resource group |`string`| n/a | yes |
| <aname="input_secrets_manager_name"></a> [secrets\_manager\_name](#input\_secrets\_manager\_name)| The name to give the Secrets Manager instance.|`string`| n/a | yes |
108
+
| <aname="input_secrets_manager_name"></a> [secrets\_manager\_name](#input\_secrets\_manager\_name)| The name of the Secrets Manager instance to create|`string`| n/a | yes |
107
109
| <aname="input_skip_en_iam_authorization_policy"></a> [skip\_en\_iam\_authorization\_policy](#input\_skip\_en\_iam\_authorization\_policy)| Set to true to skip the creation of an IAM authorization policy that permits all Secrets Manager instances (scoped to the resource group) an 'Event Source Manager' role to the given Event Notifications instance passed in the `existing_en_instance_crn` input variable. In addition, no policy is created if `enable_event_notification` is set to false. |`bool`|`false`| no |
108
110
| <aname="input_skip_kms_iam_authorization_policy"></a> [skip\_kms\_iam\_authorization\_policy](#input\_skip\_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_guid` variable. In addition, no policy is created if `kms_encryption_enabled` is set to false. |`bool`|`false`| no |
109
111
| <aname="input_sm_service_plan"></a> [sm\_service\_plan](#input\_sm\_service\_plan)| The Secrets Manager plan to provision. |`string`|`"standard"`| no |
Copy file name to clipboardExpand all lines: main.tf
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,25 @@ locals {
15
15
validate_event_notification=var.enable_event_notification&& var.existing_en_instance_crn==null?tobool("When setting var.enable_event_notification to true, a value must be passed for var.existing_en_instance_crn") :true
16
16
# tflint-ignore: terraform_unused_declarations
17
17
validate_endpoint=var.enable_event_notification&& var.endpoint_type=="public"&& var.allowed_network=="private-only"?tobool("It is not allowed to have conflicting var.endpoint_type and var.allowed_network values.") :true
18
+
# tflint-ignore: terraform_unused_declarations
19
+
validate_region=var.existing_sm_instance_crn==null&& var.region==null?tobool("When existing_sm_instance_crn is null, a value must be passed for var.region") :true
0 commit comments