Skip to content

Commit

Permalink
refactor(terraform): apply terraform fmt
Browse files Browse the repository at this point in the history
The terraform fmt command is used to rewrite
Terraform configuration files to a canonical
format and style. This command applies a subset
of the Terraform language style conventions,
along with other minor adjustments for readability.

This commit apply terraform fmt command to fix
deprecated interpolation syntax and code
indentation.

#3
  • Loading branch information
diodonfrost committed Dec 20, 2020
1 parent 5c7ed0f commit e10eb9f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/analytic/msk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "aws_msk_cluster" "nuke" {
number_of_broker_nodes = 3

broker_node_group_info {
instance_type = "kafka.m5.large"
instance_type = "kafka.m5.large"
ebs_volume_size = 1000
client_subnets = [
aws_subnet.az1.id,
Expand Down
4 changes: 2 additions & 2 deletions examples/compute/dlm-nuke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ EOF

resource "aws_iam_role_policy" "nuke" {
name = "dlm-lifecycle-policy"
role = "${aws_iam_role.nuke.id}"
role = aws_iam_role.nuke.id

policy = <<EOF
{
Expand Down Expand Up @@ -54,7 +54,7 @@ EOF

resource "aws_dlm_lifecycle_policy" "nuke" {
description = "nuke DLM lifecycle policy"
execution_role_arn = "${aws_iam_role.nuke.arn}"
execution_role_arn = aws_iam_role.nuke.arn
state = "ENABLED"

policy_details {
Expand Down
4 changes: 2 additions & 2 deletions examples/test_fixture/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ resource "aws_kms_key" "scheduler" {

module "nuke-everything" {
source = "../.."
name = "nuke-everything"
name = "nuke-everything"
kms_key_arn = aws_kms_key.scheduler.arn
cloudwatch_schedule_expression = "cron(0 22 ? * MON-FRI *)"
older_than = "0d"
}

module "nuke-except-rds" {
source = "../.."
name = "nuke-except-rds"
name = "nuke-except-rds"
cloudwatch_schedule_expression = "cron(0 22 ? * MON-FRI *)"
older_than = "0d"
}
26 changes: 13 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -263,37 +263,37 @@ EOF

locals {
lambda_logging_policy = {
"Version": "2012-10-17",
"Statement": [
"Version" : "2012-10-17",
"Statement" : [
{
"Action": [
"Action" : [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "${aws_cloudwatch_log_group.this.arn}",
"Effect": "Allow"
"Resource" : aws_cloudwatch_log_group.this.arn,
"Effect" : "Allow"
}
]
}
lambda_logging_and_kms_policy = {
"Version": "2012-10-17",
"Statement": [
"Version" : "2012-10-17",
"Statement" : [
{
"Action": [
"Action" : [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "${aws_cloudwatch_log_group.this.arn}",
"Effect": "Allow"
"Resource" : aws_cloudwatch_log_group.this.arn,
"Effect" : "Allow"
},
{
"Action": [
"Action" : [
"kms:Encrypt",
"kms:Decrypt",
"kms:CreateGrant"
],
"Resource": "${var.kms_key_arn}",
"Effect": "Allow"
"Resource" : var.kms_key_arn,
"Effect" : "Allow"
}
]
}
Expand Down

0 comments on commit e10eb9f

Please sign in to comment.