This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_s3_bucket" "s3-bucket" { | |
bucket = "${var.environment}-${var.name}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "s3-private-bucket"{ | |
source = "../../s3-private" | |
name = "private-terraform-module" | |
environment = "dev" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "name" {} | |
variable "environment" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output "s3_arn" { | |
value = aws_s3_bucket.s3-bucket.arn | |
description = "The id of S3" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "s3-private-bucket"{ | |
source = "../../s3-private" | |
name = "private-terraform-module" | |
environment = "prod" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "prod"{ | |
source = "./env/prod" | |
} | |
module "dev"{ | |
source = "./env/dev" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws"{ | |
profile = "profilename" | |
region = "us-east-1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#creating s3 bucket | |
resource "aws_s3_bucket" "s3-bucket" { | |
bucket = "${var.environment}-${var.name}" | |
acl = "private" | |
tags = { | |
Name = "${var.environment}-${var.name}" | |
Environment = var.environment | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "environment" {} | |
variable "name" {} | |
variable "acm" {} | |
variable "domain" {} | |
variable "root_object" {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##S3-Cloudfront | |
module "sampleapp-prod-frontend-s3cloud" { | |
source = "../../s3-cloudfront" | |
environment = "sampleweb-prod" | |
name = "frontend" | |
root_object = "index.html" | |
acm = "arn:aws:acm:us-east-1:123456789101:certificate/4cb08723-6052-4853-8d1f-5674ac80d092" | |
domain = "app.example.com" | |
} |
OlderNewer