Skip to content

Commit 249bad3

Browse files
authored
feat: service_endpoints input variable has been renamed to endpoint_type (#133)
Co-authored-by: [email protected] <[email protected]>
1 parent fbd2ef0 commit 249bad3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ No modules.
175175

176176
| Name | Description | Type | Default | Required |
177177
|------|-------------|------|---------|:--------:|
178+
| <a name="input_endpoint_type"></a> [endpoint\_type](#input\_endpoint\_type) | The endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private` | `string` | `"public"` | no |
178179
| <a name="input_imported_cert_certificate"></a> [imported\_cert\_certificate](#input\_imported\_cert\_certificate) | The TLS certificate to import. | `string` | `null` | no |
179180
| <a name="input_imported_cert_intermediate"></a> [imported\_cert\_intermediate](#input\_imported\_cert\_intermediate) | (optional) The intermediate certificate for the TLS certificate to import. | `string` | `null` | no |
180181
| <a name="input_imported_cert_private_key"></a> [imported\_cert\_private\_key](#input\_imported\_cert\_private\_key) | (optional) The private key for the TLS certificate to import. | `string` | `null` | no |
@@ -193,7 +194,6 @@ No modules.
193194
| <a name="input_service_credentials_source_service_crn"></a> [service\_credentials\_source\_service\_crn](#input\_service\_credentials\_source\_service\_crn) | The CRN of the source service instance to create the service credential. | `string` | `null` | no |
194195
| <a name="input_service_credentials_source_service_role"></a> [service\_credentials\_source\_service\_role](#input\_service\_credentials\_source\_service\_role) | The role to give the service credential in the source service. | `string` | `null` | no |
195196
| <a name="input_service_credentials_ttl"></a> [service\_credentials\_ttl](#input\_service\_credentials\_ttl) | The time-to-live (TTL) to assign to generated service credentials (in seconds). | `number` | `"7776000"` | no |
196-
| <a name="input_service_endpoints"></a> [service\_endpoints](#input\_service\_endpoints) | The service endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private` | `string` | `"public"` | no |
197197

198198
### Outputs
199199

main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ resource "ibm_sm_arbitrary_secret" "arbitrary_secret" {
4343
description = var.secret_description
4444
labels = var.secret_labels
4545
payload = var.secret_payload_password
46-
endpoint_type = var.service_endpoints
46+
endpoint_type = var.endpoint_type
4747
}
4848

4949
resource "ibm_sm_username_password_secret" "username_password_secret" {
@@ -56,7 +56,7 @@ resource "ibm_sm_username_password_secret" "username_password_secret" {
5656
labels = var.secret_labels
5757
username = var.secret_username
5858
password = var.secret_payload_password
59-
endpoint_type = var.service_endpoints
59+
endpoint_type = var.endpoint_type
6060

6161
## This for_each block is NOT a loop to attach to multiple rotation blocks.
6262
## This block is only used to conditionally add rotation block depending on var.sm_iam_secret_auto_rotation
@@ -89,7 +89,7 @@ resource "ibm_sm_imported_certificate" "imported_cert" {
8989
certificate = local.imported_cert_certificate
9090
private_key = local.imported_cert_private_key
9191
intermediate = local.imported_cert_intermediate
92-
endpoint_type = var.service_endpoints
92+
endpoint_type = var.endpoint_type
9393
}
9494

9595
resource "ibm_sm_service_credentials_secret" "service_credentials_secret" {
@@ -101,7 +101,7 @@ resource "ibm_sm_service_credentials_secret" "service_credentials_secret" {
101101
description = var.secret_description
102102
labels = var.secret_labels
103103
ttl = var.service_credentials_ttl
104-
endpoint_type = var.service_endpoints
104+
endpoint_type = var.endpoint_type
105105

106106
source_service {
107107
instance {

variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ variable "service_credentials_source_service_role" {
112112
default = null
113113
}
114114

115-
variable "service_endpoints" {
115+
variable "endpoint_type" {
116116
type = string
117-
description = "The service endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private`"
117+
description = "The endpoint type to communicate with the provided secrets manager instance. Possible values are `public` or `private`"
118118
default = "public"
119119
validation {
120-
condition = contains(["public", "private"], var.service_endpoints)
121-
error_message = "The specified service_endpoints is not a valid selection!"
120+
condition = contains(["public", "private"], var.endpoint_type)
121+
error_message = "The specified endpoint_type is not a valid selection!"
122122
}
123123
}
124124

0 commit comments

Comments
 (0)