From 8c53528f66ca5a8ff52fb08482bc14fcf904d7c0 Mon Sep 17 00:00:00 2001 From: shemau Date: Mon, 13 Nov 2023 16:04:06 +0000 Subject: [PATCH] fix: make cloud_services optional (#442) Co-authored-by: Steve Peggs --- README.md | 2 +- variables.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 725ced0..6219fce 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [cloud\_service\_by\_crn](#input\_cloud\_service\_by\_crn) | List of cloud service CRNs. The keys are the CRN. The values (all optional) give some level of control on the created VPEs. Each CRN will have a unique endpoint gateways created. For a list of supported services, see the docs [here](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-supported-services). |
set(
object({
crn = string
vpe_name = optional(string) # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
service_name = optional(string) # Name of the service used to compute the name of the VPE. If not specified, the service name will be obtained from the crn.
allow_dns_resolution_binding = optional(bool, true)
})
)
| `[]` | no | -| [cloud\_services](#input\_cloud\_services) | List of cloud services to create an endpoint gateway. The keys are the service names, the values (all optional) give some level of control on the created VPEs. |
set(object({
service_name = string
vpe_name = optional(string), # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
allow_dns_resolution_binding = optional(bool, false)
}))
| n/a | yes | +| [cloud\_services](#input\_cloud\_services) | List of cloud services to create an endpoint gateway. The keys are the service names, the values (all optional) give some level of control on the created VPEs. |
set(object({
service_name = string
vpe_name = optional(string), # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
allow_dns_resolution_binding = optional(bool, false)
}))
| `[]` | no | | [prefix](#input\_prefix) | The prefix that you would like to append to your resources | `string` | `"vpe"` | no | | [region](#input\_region) | The region where VPC and services are deployed | `string` | `"us-south"` | no | | [resource\_group\_id](#input\_resource\_group\_id) | ID of the resource group where endpoint gateways will be provisioned | `string` | `null` | no | diff --git a/variables.tf b/variables.tf index 28b26dd..222b624 100644 --- a/variables.tf +++ b/variables.tf @@ -65,6 +65,7 @@ variable "cloud_services" { vpe_name = optional(string), # Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name. allow_dns_resolution_binding = optional(bool, false) })) + default = [] validation { error_message = "Currently the service you're trying to add is not supported. Any other VPE services must be added using `cloud_service_by_crn`." condition = length(var.cloud_services) == 0 ? true : length([