Skip to content

Commit

Permalink
update aws_lb_listener_rule, aws_api_gateway_api_key syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
qbiqing committed Aug 4, 2020
1 parent 50f7515 commit e506021
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
15 changes: 9 additions & 6 deletions modules/core/elb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ resource "aws_lb_listener_rule" "nomad_server" {
}

condition {
field = "host-header"
values = [var.nomad_api_domain]
host-header {
values = [var.nomad_api_domain]
}
}
}

Expand Down Expand Up @@ -209,8 +210,9 @@ resource "aws_lb_listener_rule" "consul_server" {
}

condition {
field = "host-header"
values = [var.consul_api_domain]
host-header {
values = [var.consul_api_domain]
}
}
}

Expand Down Expand Up @@ -307,8 +309,9 @@ resource "aws_lb_listener_rule" "vault" {
}

condition {
field = "host-header"
values = [var.vault_api_domain]
host-header {
values = [var.vault_api_domain]
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions modules/ecr/route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ resource "aws_lb_listener_rule" "redirect" {
}

condition {
field = "host-header"
values = [aws_route53_record.redirect[0].fqdn]
host-header {
values = [aws_route53_record.redirect[0].fqdn]
}
}
}
5 changes: 3 additions & 2 deletions modules/elasticsearch_post/redirect.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ resource "aws_lb_listener_rule" "redirect" {
}

condition {
field = "host-header"
values = [aws_route53_record.redirect[0].fqdn]
host-header {
values = [aws_route53_record.redirect[0].fqdn]
}
}
}
10 changes: 7 additions & 3 deletions modules/lambda-api-gateway/api-gateway.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
resource "aws_api_gateway_api_key" "ApiKey" {
name = var.api_key_name
}

resource "aws_api_gateway_usage_plan" "ApiKey" {
name = var.api_key_name

stage_key {
rest_api_id = aws_api_gateway_rest_api.api-gateway.id
stage_name = aws_api_gateway_deployment.api-gateway-deployment.stage_name
api_stages {
api_id = aws_api_gateway_rest_api.api-gateway.id
stage = aws_api_gateway_deployment.api-gateway-deployment.stage_name
}
}

Expand Down
5 changes: 3 additions & 2 deletions modules/traefik/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ resource "aws_lb_listener_rule" "traefik_ui" {
}

condition {
field = "host-header"
values = [var.traefik_ui_domain]
host-header {
values = [var.traefik_ui_domain]
}
}
}

0 comments on commit e506021

Please sign in to comment.