Skip to content

Commit ed0381d

Browse files
authored
fix: Fixed output when create_api_domain_name is false (#44)
1 parent 3cd47fe commit ed0381d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module "api_gateway" {
9393

9494
| Name | Version |
9595
|------|---------|
96-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.26 |
96+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
9797
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.3.0 |
9898

9999
## Providers

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ output "apigatewayv2_domain_name_configuration" {
6767

6868
output "apigatewayv2_domain_name_target_domain_name" {
6969
description = "The target domain name"
70-
value = var.create_api_domain_name ? lookup(tomap(element(element(concat(aws_apigatewayv2_domain_name.this.*.domain_name_configuration, [""]), 0), 0)), "target_domain_name", "") : ""
70+
value = try(aws_apigatewayv2_domain_name.this[0].domain_name_configuration[0].target_domain_name, "")
7171
}
7272

7373
output "apigatewayv2_domain_name_hosted_zone_id" {
7474
description = "The Amazon Route 53 Hosted Zone ID of the endpoint"
75-
value = var.create_api_domain_name ? lookup(tomap(element(element(concat(aws_apigatewayv2_domain_name.this.*.domain_name_configuration, [""]), 0), 0)), "hosted_zone_id", "") : ""
75+
value = try(aws_apigatewayv2_domain_name.this[0].domain_name_configuration[0].hosted_zone_id, "")
7676
}
7777

7878
# api mapping

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.12.26"
2+
required_version = ">= 0.13.1"
33

44
required_providers {
55
aws = ">= 3.3.0"

0 commit comments

Comments
 (0)