terraform fmt

This commit is contained in:
Michaela 2021-10-09 17:23:00 +11:00
parent ad0fa3ac28
commit a4de33c33a
3 changed files with 27 additions and 27 deletions

6
es.tf
View File

@ -171,7 +171,7 @@ resource "aws_cognito_user_pool_client" "CognitoUserPoolClient" {
explicit_auth_flows = ["ALLOW_CUSTOM_AUTH", "ALLOW_REFRESH_TOKEN_AUTH", "ALLOW_USER_SRP_AUTH"]
access_token_validity = 60
id_token_validity = 60
id_token_validity = 60
token_validity_units {
access_token = "minutes"
id_token = "minutes"
@ -188,8 +188,8 @@ resource "aws_cognito_user_pool_domain" "main" {
resource "aws_route53_record" "auth" {
for_each = toset(["A", "AAAA"])
name = "auth"
type = each.key
name = "auth"
type = each.key
alias {
name = "${aws_cognito_user_pool_domain.main.cloudfront_distribution_arn}."
zone_id = "Z2FDTNDATAQYW2"

View File

@ -23,7 +23,7 @@ resource "aws_lambda_function" "upload_telem" {
architectures = ["arm64"]
environment {
variables = {
"SNS_TOPIC" = aws_sns_topic.sonde_telem.arn
"SNS_TOPIC" = aws_sns_topic.sonde_telem.arn
}
}
}

46
vpc.tf
View File

@ -1,6 +1,6 @@
resource "aws_vpc" "main" {
cidr_block = "172.31.0.0/16"
cidr_block = "172.31.0.0/16"
assign_generated_ipv6_cidr_block = true
}
@ -10,29 +10,29 @@ resource "aws_egress_only_internet_gateway" "main" {
locals {
private_subnets = {
"us-east-1a"= "172.31.128.0/24",
"us-east-1b"= "172.31.131.0/24",
"us-east-1c"= "172.31.130.0/24",
"us-east-1d"= "172.31.133.0/24",
"us-east-1e"= "172.31.129.0/24",
"us-east-1f"= "172.31.132.0/24"
"us-east-1a" = "172.31.128.0/24",
"us-east-1b" = "172.31.131.0/24",
"us-east-1c" = "172.31.130.0/24",
"us-east-1d" = "172.31.133.0/24",
"us-east-1e" = "172.31.129.0/24",
"us-east-1f" = "172.31.132.0/24"
}
public_subnets = {
"us-east-1a"= "172.31.80.0/20",
"us-east-1b"= "172.31.16.0/20",
"us-east-1c"= "172.31.32.0/20",
"us-east-1d"= "172.31.0.0/20",
"us-east-1e"= "172.31.48.0/20",
"us-east-1f"= "172.31.64.0/20"
"us-east-1a" = "172.31.80.0/20",
"us-east-1b" = "172.31.16.0/20",
"us-east-1c" = "172.31.32.0/20",
"us-east-1d" = "172.31.0.0/20",
"us-east-1e" = "172.31.48.0/20",
"us-east-1f" = "172.31.64.0/20"
}
}
resource "aws_subnet" "private" {
for_each = local.private_subnets
map_public_ip_on_launch = false
vpc_id = aws_vpc.main.id
cidr_block = each.value
vpc_id = aws_vpc.main.id
cidr_block = each.value
tags = {
Name = "${each.key} - private"
}
@ -42,9 +42,9 @@ resource "aws_subnet" "public" {
for_each = local.public_subnets
map_public_ip_on_launch = false
vpc_id = aws_vpc.main.id
cidr_block = each.value
vpc_id = aws_vpc.main.id
cidr_block = each.value
tags = {
Name = "${each.key} - public"
}
@ -54,12 +54,12 @@ resource "aws_route_table" "main" {
vpc_id = aws_vpc.main.id
}
resource "aws_route_table_association" "public" {
for_each = local.public_subnets
for_each = local.public_subnets
subnet_id = aws_subnet.public[each.key].id
route_table_id = aws_route_table.main.id
}
resource "aws_route_table_association" "private" {
for_each = local.private_subnets
for_each = local.private_subnets
subnet_id = aws_subnet.private[each.key].id
route_table_id = aws_route_table.main.id
}
@ -75,7 +75,7 @@ resource "aws_route" "main6" {
}
resource "aws_route" "main" {
route_table_id = aws_route_table.main.id
route_table_id = aws_route_table.main.id
destination_cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.gw.id
gateway_id = aws_internet_gateway.gw.id
}