run terraform fmt

This commit is contained in:
sid palas
2021-05-27 14:39:53 -07:00
parent 6d7faf2664
commit 44ad33037d
8 changed files with 50 additions and 50 deletions

View File

@@ -1,16 +1,16 @@
resource "aws_route53_zone" "primary" {
count = var.create_dns_zone ? 1 : 0
name = var.domain
name = var.domain
}
data "aws_route53_zone" "primary" {
count = var.create_dns_zone ? 0 : 1
name = var.domain
name = var.domain
}
locals {
dns_zone_id = var.create_dns_zone ? aws_route53_zone.primary[0].zone_id : data.aws_route53_zone.primary[0].zone_id
subdomain = var.environment_name == "production" ? "" : "${var.environment_name}."
subdomain = var.environment_name == "production" ? "" : "${var.environment_name}."
}
resource "aws_route53_record" "root" {

View File

@@ -8,14 +8,14 @@ variable "region" {
variable "app_name" {
description = "Name of the web application"
type = string
default = "web-app"
type = string
default = "web-app"
}
variable "environment_name" {
description = "Deployment environment (dev/staging/production)"
type = string
default = "dev"
type = string
default = "dev"
}
# EC2 Variables
@@ -43,8 +43,8 @@ variable "bucket_name" {
variable "create_dns_zone" {
description = "If true, create new route53 zone, if false read existing route53 zone"
type = bool
default = false
type = bool
default = false
}
variable "domain" {