Skip to content

Commit

Permalink
feat: added new outputs dns_instance_id and dns_custom_resolver_id (
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewLemmond authored Jul 12, 2024
1 parent fb00214 commit b84f23a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,10 @@ To attach access management tags to resources in this module, you need the follo
|------|-------------|
| <a name="output_cidr_blocks"></a> [cidr\_blocks](#output\_cidr\_blocks) | List of CIDR blocks present in VPC stack |
| <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. |
| <a name="output_dns_custom_resolver_id"></a> [dns\_custom\_resolver\_id](#output\_dns\_custom\_resolver\_id) | The ID of the DNS Custom Resolver. |
| <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. |
| <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. |
| <a name="output_dns_instance_id"></a> [dns\_instance\_id](#output\_dns\_instance\_id) | The ID of the DNS instance. |
| <a name="output_network_acls"></a> [network\_acls](#output\_network\_acls) | List of shortnames and IDs of network ACLs |
| <a name="output_public_gateways"></a> [public\_gateways](#output\_public\_gateways) | Map of public gateways by zone |
| <a name="output_subnet_detail_list"></a> [subnet\_detail\_list](#output\_subnet\_detail\_list) | A list of subnets containing names, CIDR blocks, and zones. |
Expand Down
10 changes: 10 additions & 0 deletions examples/hub-spoke-delegated-resolver/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ output "dns_endpoint_gateways_by_spoke_vpc_id" {
value = module.spoke_vpc.dns_endpoint_gateways_by_id
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
}

output "dns_instance_id" {
description = "The ID of the DNS instance."
value = module.hub_vpc.dns_instance_id
}

output "dns_custom_resolver_id" {
description = "The ID of the DNS Custom Resolver."
value = module.hub_vpc.dns_custom_resolver_id
}
10 changes: 10 additions & 0 deletions examples/hub-spoke-manual-resolver/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ output "dns_endpoint_gateways_by_spoke_vpc_id" {
value = module.spoke_vpc.dns_endpoint_gateways_by_id
description = "The list of VPEs that are made available for DNS resolution in the created VPC."
}

output "dns_instance_id" {
description = "The ID of the DNS instance."
value = module.hub_vpc.dns_instance_id
}

output "dns_custom_resolver_id" {
description = "The ID of the DNS Custom Resolver."
value = module.hub_vpc.dns_custom_resolver_id
}
10 changes: 10 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,13 @@ output "dns_endpoint_gateways_by_crn" {
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."
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
}

output "dns_instance_id" {
description = "The ID of the DNS instance."
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
}

output "dns_custom_resolver_id" {
description = "The ID of the DNS Custom Resolver."
value = (var.enable_hub && !var.skip_custom_resolver_hub_creation) ? one(ibm_dns_custom_resolver.custom_resolver_hub[*].instance_id) : null
}

0 comments on commit b84f23a

Please sign in to comment.