Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed output when create_api_domain_name is false #44

Merged
merged 5 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module "api_gateway" {

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

## Providers
Expand Down
4 changes: 2 additions & 2 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ output "apigatewayv2_domain_name_configuration" {

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

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

# api mapping
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.12.26"
required_version = ">= 0.13.1"

required_providers {
aws = ">= 3.3.0"
Expand Down