Skip to content

Commit b84f23a

Browse files
feat: added new outputs dns_instance_id and dns_custom_resolver_id (#817)
1 parent fb00214 commit b84f23a

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,10 @@ To attach access management tags to resources in this module, you need the follo
198198
|------|-------------|
199199
| <a name="output_cidr_blocks"></a> [cidr\_blocks](#output\_cidr\_blocks) | List of CIDR blocks present in VPC stack |
200200
| <a name="output_custom_resolver_hub"></a> [custom\_resolver\_hub](#output\_custom\_resolver\_hub) | The custom resolver created for the hub vpc. Only set if enable\_hub is set and skip\_custom\_resolver\_hub\_creation is false. |
201+
| <a name="output_dns_custom_resolver_id"></a> [dns\_custom\_resolver\_id](#output\_dns\_custom\_resolver\_id) | The ID of the DNS Custom Resolver. |
201202
| <a name="output_dns_endpoint_gateways_by_crn"></a> [dns\_endpoint\_gateways\_by\_crn](#output\_dns\_endpoint\_gateways\_by\_crn) | The list of VPEs that are made available for DNS resolution in the created VPC. Only set if enable\_hub is false and enable\_hub\_vpc\_id are true. |
202203
| <a name="output_dns_endpoint_gateways_by_id"></a> [dns\_endpoint\_gateways\_by\_id](#output\_dns\_endpoint\_gateways\_by\_id) | The list of VPEs that are made available for DNS resolution in the created VPC. Only set if enable\_hub is false and enable\_hub\_vpc\_id are true. |
204+
| <a name="output_dns_instance_id"></a> [dns\_instance\_id](#output\_dns\_instance\_id) | The ID of the DNS instance. |
203205
| <a name="output_network_acls"></a> [network\_acls](#output\_network\_acls) | List of shortnames and IDs of network ACLs |
204206
| <a name="output_public_gateways"></a> [public\_gateways](#output\_public\_gateways) | Map of public gateways by zone |
205207
| <a name="output_subnet_detail_list"></a> [subnet\_detail\_list](#output\_subnet\_detail\_list) | A list of subnets containing names, CIDR blocks, and zones. |

examples/hub-spoke-delegated-resolver/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ output "dns_endpoint_gateways_by_spoke_vpc_id" {
5151
value = module.spoke_vpc.dns_endpoint_gateways_by_id
5252
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
5353
}
54+
55+
output "dns_instance_id" {
56+
description = "The ID of the DNS instance."
57+
value = module.hub_vpc.dns_instance_id
58+
}
59+
60+
output "dns_custom_resolver_id" {
61+
description = "The ID of the DNS Custom Resolver."
62+
value = module.hub_vpc.dns_custom_resolver_id
63+
}

examples/hub-spoke-manual-resolver/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ output "dns_endpoint_gateways_by_spoke_vpc_id" {
5151
value = module.spoke_vpc.dns_endpoint_gateways_by_id
5252
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
5353
}
54+
55+
output "dns_instance_id" {
56+
description = "The ID of the DNS instance."
57+
value = module.hub_vpc.dns_instance_id
58+
}
59+
60+
output "dns_custom_resolver_id" {
61+
description = "The ID of the DNS Custom Resolver."
62+
value = module.hub_vpc.dns_custom_resolver_id
63+
}

outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,13 @@ output "dns_endpoint_gateways_by_crn" {
166166
description = "The list of VPEs that are made available for DNS resolution in the created VPC. Only set if enable_hub is false and enable_hub_vpc_id are true."
167167
value = length(ibm_is_vpc_dns_resolution_binding.vpc_dns_resolution_binding_crn) == 1 ? ibm_is_vpc_dns_resolution_binding.vpc_dns_resolution_binding_crn[0] : null
168168
}
169+
170+
output "dns_instance_id" {
171+
description = "The ID of the DNS instance."
172+
value = (var.enable_hub && !var.skip_custom_resolver_hub_creation) ? (var.use_existing_dns_instance ? var.existing_dns_instance_id : ibm_resource_instance.dns_instance_hub[0].guid) : null
173+
}
174+
175+
output "dns_custom_resolver_id" {
176+
description = "The ID of the DNS Custom Resolver."
177+
value = (var.enable_hub && !var.skip_custom_resolver_hub_creation) ? one(ibm_dns_custom_resolver.custom_resolver_hub[*].instance_id) : null
178+
}

0 commit comments

Comments
 (0)