Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asg/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variable "ami" {
type = string
description = "The AMI ID to use for the instances. Keep this at the default value to automatically receive AMI updates to Amazon Linux 2"
// AMI Built from packer/base.json
default = "ami-0e8eb11a5429219ed"
default = "ami-0e8eb11a5429219ed"
}

variable "capacity" {
Expand Down
7 changes: 6 additions & 1 deletion asg/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 3 additions & 4 deletions chamberpolicy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "aws_iam_policy_document" "read_policy" {
actions = ["kms:Decrypt"]
resources = [data.aws_kms_alias.chamber_key.target_key_arn]
condition {
test = "StringLike"
test = "StringLike"
values = [local.namespace_parameters_arn]
variable = "kms:EncryptionContext:PARAMETER_ARN"
}
Expand All @@ -53,15 +53,15 @@ data "aws_iam_policy_document" "readwrite_policy" {
"ssm:DeleteParameter",
"ssm:DeleteParameters",
]
resources = ["${local.namespace_parameters_arn}"]
resources = [local.namespace_parameters_arn]
}

// Read (decrypt)
statement {
actions = ["kms:Decrypt"]
resources = [data.aws_kms_alias.chamber_key.target_key_arn]
condition {
test = "StringLike"
test = "StringLike"
values = [local.namespace_parameters_arn]
variable = "kms:EncryptionContext:PARAMETER_ARN"
}
Expand All @@ -73,4 +73,3 @@ data "aws_iam_policy_document" "readwrite_policy" {
resources = [data.aws_kms_alias.chamber_key.target_key_arn]
}
}

7 changes: 6 additions & 1 deletion chamberpolicy/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 6 additions & 1 deletion developerpolicy/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 6 additions & 1 deletion domain/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
4 changes: 2 additions & 2 deletions ecscluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ data "aws_iam_policy_document" "developer" {
]
resources = ["*"]
condition {
test = "ArnEquals"
values = [aws_ecs_cluster.cluster.arn]
test = "ArnEquals"
values = [aws_ecs_cluster.cluster.arn]
variable = "ecs:cluster"
}
}
Expand Down
10 changes: 9 additions & 1 deletion ecscluster/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
template = {
source = "hashicorp/template"
}
}
}
22 changes: 11 additions & 11 deletions lambda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ resource "aws_lambda_function" "default" {
}
}
tags = merge(
var.tags,
{
"Name" = var.name
},
var.tags,
{
"Name" = var.name
},
)
}

Expand All @@ -41,10 +41,10 @@ resource "aws_cloudwatch_log_group" "logs" {
name = "/aws/lambda/${var.name}"
retention_in_days = 30
tags = merge(
var.tags,
{
"Name" = var.name
},
var.tags,
{
"Name" = var.name
},
)
}

Expand Down Expand Up @@ -96,7 +96,7 @@ resource "aws_cloudwatch_event_rule" "schedule" {
}

resource "aws_cloudwatch_event_target" "schedule_target" {
count = length(var.schedule)
count = length(var.schedule)
arn = aws_lambda_function.default.arn
rule = element(aws_cloudwatch_event_rule.schedule.*.name, count.index)
target_id = "${var.name}_${count.index}"
Expand Down Expand Up @@ -161,8 +161,8 @@ data "aws_iam_policy_document" "developer" {
]
resources = ["*"]
condition {
test = "ArnLike"
values = [aws_lambda_function.default.arn]
test = "ArnLike"
values = [aws_lambda_function.default.arn]
variable = "lambda:FunctionArn"
}
}
Expand Down
2 changes: 1 addition & 1 deletion lambda/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ output "function_version" {
// Developer IAM policy.
output "developer_policies" {
value = [data.aws_iam_policy_document.developer.json]
}
}
4 changes: 2 additions & 2 deletions lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ variable "timeout" {
}

variable "memory_size" {
type = string
default = 128
type = string
default = 128
description = "The memory limit for the Lambda Function"
}

Expand Down
7 changes: 6 additions & 1 deletion lambda/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
12 changes: 6 additions & 6 deletions pipelines/pipeline/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
locals {
region = "${coalesce(var.region, data.aws_region.current.name)}"
account_id = "${coalesce(var.account_id, data.aws_caller_identity.current.account_id)}"
region = coalesce(var.region, data.aws_region.current.name)
account_id = coalesce(var.account_id, data.aws_caller_identity.current.account_id)
secrets_namespace = "tf/${var.namespace}"
}

Expand Down Expand Up @@ -200,15 +200,15 @@ EOD
}

resource "aws_cloudwatch_event_target" "build_failure" {
count = length(var.failure_topics)
arn = element(var.failure_topics, count.index)
rule = aws_cloudwatch_event_rule.build_failure.name
count = length(var.failure_topics)
arn = element(var.failure_topics, count.index)
rule = aws_cloudwatch_event_rule.build_failure.name
target_id = "${var.name}-to-SNS"
input_transformer {
input_template = jsonencode("Codebuild job failed for <project-name>")
input_paths = {
"project-name" = "$.detail.project-name"
"build-id" = "$.id"
"build-id" = "$.id"
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions pipelines/pipeline/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ variable "failure_topics" {
}

variable "region" {
type = "string"
type = string
description = "The AWS region to scope access to (defaults to current region)."
default = ""
default = ""
}

variable "account_id" {
type = "string"
type = string
description = "The AWS account ID to scope access to (defaults to current account)."
default = ""
default = ""
}

variable "plan_policy" {
type = string
type = string
description = "The ARN of an AWS IAM policy to use for 'plan' jobs."
default = "arn:aws:iam::aws:policy/ReadOnlyAccess"
default = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}

variable "apply_policy" {
type = string
type = string
description = "The ARN of an AWS IAM policy to use for 'apply' jobs."
default = "arn:aws:iam::aws:policy/AdministratorAccess"
default = "arn:aws:iam::aws:policy/AdministratorAccess"
}

7 changes: 6 additions & 1 deletion pipelines/pipeline/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 6 additions & 1 deletion pipelines/roles/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 6 additions & 1 deletion rdsinstance/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
7 changes: 6 additions & 1 deletion slackalerts/versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

terraform {
required_version = ">= 0.12"
required_version = ">= 0.13"
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}
8 changes: 4 additions & 4 deletions static-site/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ data "aws_iam_policy_document" "deployment" {

resource "aws_iam_group" "deployment" {
count = var.create_deployment_group ? 1 : 0
name = "${var.name}-deployment"
name = "${var.name}-deployment"
}
resource "aws_iam_group_policy" "deployment" {
count = var.create_deployment_group ? 1 : 0
group = "${aws_iam_group.deployment[0].name}"
policy = "${data.aws_iam_policy_document.deployment.json}"
count = var.create_deployment_group ? 1 : 0
group = aws_iam_group.deployment[0].name
policy = data.aws_iam_policy_document.deployment.json
}
Loading