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
feat: remove reserved_ips support for DA solution (#675)<br> - removed input variable for DA solution for reserved_ips<br> - adjusted DA documentation and adopter usage
* fix: enhanced description and docs
* fix: removed reserved_ips from DA code as not needed
---------
Co-authored-by: shemau <[email protected]>
Copy file name to clipboardExpand all lines: modules/reserved-ips/README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,23 @@
1
-
# Reserved IP's Module
1
+
# Reserved IPs Module
2
2
3
-
The module creates reserved IPs (https://cloud.ibm.com/docs/vpc?topic=vpc-managing-ip-addresses) on existing subnets. Reserved IPs can be assigned to your resources, for example VPE endpoint gateways.
3
+
The module creates a set of reserved IPs (https://cloud.ibm.com/docs/vpc?topic=vpc-managing-ip-addresses) on VPC existing subnets. Reserved IPs can be assigned to your resources, for example Virtual Private Endpoint gateways.
4
4
5
5
The module supports the following actions:
6
6
- Create reserved IP addresses
7
7
8
+
It supports two different ways to specify the Reserved IPs to create:
9
+
- by filling the input parameter `var.endpoint_ip_list` with a list of elements with the following attributes:
10
+
-`ip_name`: unique name to use for the key of the map representing the reserved IPs structure in output
11
+
-`subnet_id`: ID of the VPC subnet to create the reserved IP
12
+
-`name`: name of the Reserved IP resource name
13
+
- by filling the input parameters `var.subnet_zone_list`, `var.reserved_ip_cloud_services` and `var.cloud_service_by_crn` with the respective attributes: the module logic combines the two lists `var.reserved_ip_cloud_services` and `var.cloud_service_by_crn` into a single list of services by extracting the expected services details and then combines this list with the `var.subnet_zone_list` list to allocate a Reserved IP for each subnet and for each service, by generating a unique `ip_name` key for each element of the map
14
+
15
+
In both the cases the output of the module is:
16
+
-`endpoint_ip_list` with the map of service name & subnet ID to create and bind to the Reserved IPs as map values of the related map key
17
+
-`reserved_ip_map` with the map of the Reserved IPs resources created for each of the service name & subnet ID elements of the previous list, mapped by the unique map key.
18
+
19
+
The module supports also you to associate existing Reserved IPs resources from your VPC through `var.reserved_ips` with specific gateways: in order to associate an existing Reserved IP to a specific gateway add an element to this list with two attributes, the unique map key used or generated for the `endpoint_ip_list` and the related Reserved IP instance to associate it with.
20
+
8
21
### Usage
9
22
10
23
```hcl
@@ -98,7 +111,7 @@ No modules.
98
111
| Name | Description | Type | Default | Required |
| <aname="input_cloud_service_by_crn"></a> [cloud\_service\_by\_crn](#input\_cloud\_service\_by\_crn)| List of cloud service CRNs. 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). | <pre>list(<br/> object({<br/> name = string # service name<br/> crn = string # service crn<br/> })<br/> )</pre> |`[]`| no |
101
-
| <aname="input_endpoint_ip_list"></a> [endpoint\_ip\_list](#input\_endpoint\_ip\_list)| List of IPs to create. Each object contains an ip name and subnet id | <pre>list(<br/> object({<br/> ip_name = string # reserved ip name<br/> subnet_id = string # subnet id<br/> gateway_name = string # gateway name<br/> name = string # ip name<br/> })<br/> )</pre> |`[]`| no |
114
+
| <aname="input_endpoint_ip_list"></a> [endpoint\_ip\_list](#input\_endpoint\_ip\_list)| List of IPs to create. Each object contains an ip name and subnet id | <pre>list(<br/> object({<br/> ip_name = string # reserved ip name<br/> subnet_id = string # subnet id<br/> name = string # ip name<br/> })<br/> )</pre> |`[]`| no |
102
115
| <aname="input_prefix"></a> [prefix](#input\_prefix)| The prefix that you would like to append to your resources. Value is only used if no value is passed for the `vpe_name` option in the `reserved_ip_cloud_services` input variable. |`string`|`"vpe"`| no |
103
116
| <aname="input_region"></a> [region](#input\_region)| The region to be used in the reserved ip naming convention. |`string`|`"us-south"`| no |
104
117
| <aname="input_reserved_ip_cloud_services"></a> [reserved\_ip\_cloud\_services](#input\_reserved\_ip\_cloud\_services)| List of cloud services to create reserved ips for. The keys are the service names, the values (all optional) give some level of control on the created VPEs. | <pre>set(object({<br/> service_name = string<br/> vpe_name = optional(string),<br/> }))</pre> |`[]`| no |
# Configuring complex inputs for Virtual Private Endpoint Gateways
2
2
3
-
Several optional input variables in the IBM Cloud [VPE Gateway deployable architecture](https://cloud.ibm.com/catalog#deployable_architecture) use complex object types. You specify these inputs when you configure deployable architecture.
3
+
IBM Cloud® Virtual Private Endpoints (VPE) for VPC enables you to connect to supported IBM Cloud services from your Virtual Privte Cloud (VPC) network by using the IP addresses of your choosing, allocated from a subnet within your VPC. For more details about Virtual Private Endpoint Gateways please refer to this [documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-about-vpe)
4
4
5
-
You can specify a set of IBM Cloud services to create VPE endpoint gateways for. At least one of `cloud_services`or `cloud_service_by_crn` must be specified.
5
+
IBM Cloud services either offer a service specific target or an instance specific target for the VPE gateway. In order to target a service specific endpoint, the service should be included in the `cloud_services`block. In order to target an instance specific endpoint the service CRN should be included in the `cloud_service_by_crn` block.
6
6
7
-
-[Cloud Services by name](#cloud-services) (`cloud_services`)
8
-
-[Cloud Services by CRN](#cloud-service-by-crn) (`cloud_service_by_crn`)
9
-
-[Reserved IPs](#reserved-ips) (`reserved_ips`)
7
+
For more details about the IBM Cloud services, their VPE configuration information and about creating gateways to Non-IBM Cloud services please refer to [this documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-supported-services)
10
8
11
-
## Cloud Services by name <aname="cloud-services"></a>
9
+
As alternative, the CLI command `ibmcloud is endpoint-gateway-targets` returns a list of IBM Cloud services supported in a specific region, including the services' names and their CRNs
12
10
13
-
You can specify a set of IBM Cloud services by service name to create VPE Endpoint Gateways for. Use `cloud-services` for services that offer general service endpoints.
11
+
-[cloud_services](#cloud-services) : this input parameter allows to create a VPE gateway to a IBM Cloud service by specifying its service name
12
+
-[cloud_service_by_crn](#cloud-service-by-crn) : this input parameter allows to create a VPE gateway to a IBM Cloud service its service CRN (Cloud Resource Name)
13
+
14
+
## VPE gateway to Cloud Services by service name <aname="cloud-services"></a>
15
+
16
+
By setting up this input parameter you can create VPE gateways in your VPC instance by specifying the name of the IBM Cloud services.
17
+
18
+
**Important note: ** you can use this structure only for IBM Cloud services offering global service endpoints.
14
19
15
20
- Variable name: `cloud_services`.
16
-
- Type: A list of objects that represent IBM Cloud services
17
-
- Default value: An empty list (`[]`)
21
+
- Type: A list of objects that represent IBM Cloud services with attributes `service_name`, `vpe_name` and `allow_dns_resolution_binding`
22
+
- Default value: the default value is an empty list (`[]`)
18
23
19
-
### Options for cloud_service
24
+
### cloud_service attributes
20
25
21
-
-`service_name` (required): The IBM Cloud service name.
22
-
-`vpe_name` (optional): Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
23
-
-`allow_dns_resolution_binding` (optional): Indicates whether to allow this endpoint gateway to participate in DNS resolution bindings with a VPC that has dns.enable_hub set to true.
26
+
-`service_name` (required): The IBM Cloud service name as per [this documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-supported-services) or the name value returned by the CLI command `ibmcloud is endpoint-gateway-targets`
27
+
-`vpe_name` (optional): The desired name to assigne to the VPE gateway. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
28
+
-`allow_dns_resolution_binding` (optional): Indicates whether to allow this endpoint gateway to participate in DNS resolution bindings. For more details please refer to this [documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-dns-sharing-configure-hub&interface=ui). If not set default value is `true`.
24
29
25
-
### Example service credential
30
+
### Example for cloud_services input parameter
26
31
27
32
```hcl
28
33
[
29
34
{
30
-
"service_name": "kms",
31
-
"vpe_name": "kms-gateway",
35
+
"service_name": "global-search-tagging",
36
+
"vpe_name": "global-search-gateway",
32
37
"allow_dns_resolution_binding": false
33
38
},
34
39
{
@@ -37,56 +42,33 @@ You can specify a set of IBM Cloud services by service name to create VPE Endpoi
37
42
]
38
43
```
39
44
40
-
## Cloud Service by CRN <aname="cloud-service-by-crn"></a>
45
+
## VPE gateway to Cloud Services by service CRN <aname="cloud-service-by-crn"></a>
41
46
42
-
You can specify a set of IBM Cloud services by CRN to create VPE Endpoint Gateways for. Use `cloud-service-by-crn` for services that generate instance specific VPE gateway targets.
47
+
By setting up this input parameter you can create VPE gateways in your VPC instance by specifying the IBM Cloud services CRNs.
43
48
44
49
- Variable name: `cloud_service_by_crn`.
45
-
- Type: A list of objects that represent IBM Cloud services
46
-
- Default value: An empty list (`[]`)
50
+
- Type: A list of objects that represent IBM Cloud services with attributes `crn`, `vpe_name`, `service_name` and `allow_dns_resolution_binding`
51
+
- Default value: the default value is an empty list (`[]`)
47
52
48
53
### Options for cloud_service_by_crn
49
54
50
-
-`crn` (required): IBM Cloud service CRN.
51
-
-`vpe_name` (optional): Full control on the VPE name. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
52
-
-`service_name` (optional):
53
-
-`allow_dns_resolution_binding` (optional): Indicates whether to allow this endpoint gateway to participate in DNS resolution bindings with a VPC that has dns.enable_hub set to true.
55
+
-`crn` (mandatory): IBM Cloud service CRN as per [this documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-supported-services))or the CRN value returned by the CLI command `ibmcloud is endpoint-gateway-targets`
56
+
-`vpe_name` (optional): The desired name to assigne to the VPE gateway. If not specified, the VPE name will be computed based on prefix, vpc name and service name.
57
+
-`service_name` (optional): The name of the service used to compute the name of the VPE gateway. If not provided the name is extracted from the CRN.
58
+
-`allow_dns_resolution_binding` (optional): Indicates whether to allow this endpoint gateway to participate in DNS resolution bindings. For more details please refer to this [documentation page](https://cloud.ibm.com/docs/vpc?topic=vpc-vpe-dns-sharing-configure-hub&interface=ui). If not set default value is `true`.
Map of existing reserved IP names and values. If you wish to create your reserved ips independently and not create new ones you can first run the `reserved-ips` submodule and then copy the output `reserved_ip_map` here."
74
-
75
-
- Variable name: `reserved_ips`
76
-
- Type: A map of existing reserved IP names and ids
77
-
- Default value: An empty map (`{}`)
78
-
79
-
### Example reserved IPs
80
-
81
-
The following example shows values for both disk and memory for the `reserved_ips` input.
description="Map of existing reserved IP names and values. If you wish to create your reserved ips independently and not create new ones you can first run the `reserved-ips` submodule and then copy the output `reserved_ip_map` here. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-vpe-gateway/tree/main/solutions/fully-configurable/DA-types.md#reserved_ips)."
0 commit comments