From 9bd580cff7656a29c88cbae1a7a16355c69308ba Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Tue, 21 Sep 2021 11:08:51 -0500 Subject: [PATCH] setup shared environment --- modules/codebuild/main.tf | 20 ++++++++++++++------ modules/ec2/asg.tf | 6 +++--- modules/ec2/variables.tf | 15 +++++++++++++++ production/main.tf | 8 ++++---- staging/main.tf | 8 ++++---- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/modules/codebuild/main.tf b/modules/codebuild/main.tf index f50a412..1fd4903 100644 --- a/modules/codebuild/main.tf +++ b/modules/codebuild/main.tf @@ -1,10 +1,18 @@ resource "aws_s3_bucket" "artifacts" { - bucket = "cloudcasts-${var.infra_env}-artifacts" + bucket = "cloudcasts-artifacts" acl = "private" + + tags = { + Name = "cloudcasts - Artifacts Bucket" + Environment = var.infra_env + Project = "cloudcasts" + Role = "build" + ManagedBy = "terraform" + } } resource "aws_iam_role" "this" { - name = "cloudcasts-${var.infra_env}-codebuild-role" + name = "cloudcasts-codebuild-role" assume_role_policy = <