Skip to content

fix uneven '=' alignment(terraform fmt style), and fix typo. #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 alb_template/aws_acm_certificate_validation.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_acm_certificate_validation" "cert" {
certificate_arn = aws_acm_certificate.https-certificate.arn
certificate_arn = aws_acm_certificate.https-certificate.arn
validation_record_fqdns = aws_route53_record.https-certificate-validations.*.fqdn
}

6 changes: 3 additions & 3 deletions ecs_ec2_cluster_template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ EOF
}

variable "autoscaling_scaledown_max" {
default = 0
default = 0
description = "Max instance count during autoscaling_scaledown_between_utc period."
}

variable "autoscaling_scaledown_desired_capacity" {
default = 0
default = 0
description = "Instance count during autoscaling_scaledown_between_utc period."
}

variable "autoscaling_scaledown_min" {
default = 0
default = 0
description = "Minimum instance count during autoscaling_scaledown_between_utc period."
}

32 changes: 16 additions & 16 deletions ecs_web_service_template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ EOF
}

variable "loadbalancer_listener_arns" {
type = list(string)
type = list(string)
description = <<EOF
List of listener ARN of ALB. All listeners must belong to same ALB.

Expand All @@ -79,7 +79,7 @@ variable "loadbalancer_listener_arns_count" {
}

variable "loadbalancer_listener_priority" {
default = 1000
default = 1000
description = "The priority for the rule of the loadbalancer."
}

Expand Down Expand Up @@ -107,7 +107,7 @@ variable "policy_arn" {
}

variable "task_execution_policy_arn" {
default = ""
default = ""
description = "ARN of IAM policy to attatch to ESC task execution role"
}

Expand All @@ -128,14 +128,14 @@ variable "container_definitions" {
}

variable "ecs_deployment_maximum_percent" {
type = number
default = null
type = number
default = null
description = "aws_ecs_service.ecs_deployment_maximum_percent (0 to 200)"
}

variable "ecs_deployment_minimum_healthy_percent" {
type = number
default = null
type = number
default = null
description = "aws_ecs_service.deployment_minimum_healthy_percent (0 to 100)"
}

Expand All @@ -144,7 +144,7 @@ variable "ecs_service_desired_count" {
}

variable "volume_name" {
default = "task_volume"
default = "task_volume"
description = "volume name for the ECS task."
}

Expand All @@ -157,17 +157,17 @@ variable "target_container_port" {
}

variable "target_group_protocol" {
default = "HTTP"
default = "HTTP"
description = "Protocol between LB and container."
}

variable "slow_start_sec" {
default = 30
default = 30
description = "aws_alb_target_group.slow_start, LB don't so much traffic to the container during this period."
}

variable "deregistration_delay" {
default = 30
default = 30
description = "aws_alb_target_group.deregistration_delay, duration of draining state [sec]"
}

Expand All @@ -176,7 +176,7 @@ variable "health_check_path" {
}

variable "health_check_matcher" {
default = "200"
default = "200"
description = "healthcheck successful status code. Can use comma to specify multiple. Can use hypen to specify range."
}

Expand All @@ -185,22 +185,22 @@ variable "health_check_grace_period_seconds" {
}

variable "health_check_interval" {
default = 10
default = 10
description = "healthcheck interval [sec]"
}

variable "health_check_timeout" {
default = 6
default = 6
description = "helthcheck timeout [sec]"
}

variable "unhealthy_threshold" {
default = 3
default = 3
description = "Contignous healthcheck count to mark container as unhealthy"
}

variable "healthy_threshold" {
default = 3
default = 3
description = "Contignous healthcheck count to mark container as healthy"
}

4 changes: 2 additions & 2 deletions guardduty_slack/regional/aws_guardduty_ipset.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_guardduty_ipset" "MyIPSet" {
count = var.is_enable_gurdduty_ipset == true ? 1 : 0
count = var.is_enable_guardduty_ipset == true ? 1 : 0
provider = aws.regional

activate = true
Expand All @@ -10,7 +10,7 @@ resource "aws_guardduty_ipset" "MyIPSet" {
}

resource "random_id" "hash" {
count = var.is_enable_gurdduty_ipset == true ? 1 : 0
count = var.is_enable_guardduty_ipset == true ? 1 : 0

keepers = {
# Generate a new id each time we switch to a new AMI id
Expand Down
2 changes: 1 addition & 1 deletion guardduty_slack/regional/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "is_enable_lambda_notify_to_slack" {
type = bool
}

variable "is_enable_gurdduty_ipset" {
variable "is_enable_guardduty_ipset" {
type = bool
}

Expand Down
32 changes: 16 additions & 16 deletions guardduty_slack/regions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module "us-east-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "us-east-2" {
Expand All @@ -26,7 +26,7 @@ module "us-east-2" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "us-west-1" {
Expand All @@ -39,7 +39,7 @@ module "us-west-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "us-west-2" {
Expand All @@ -52,7 +52,7 @@ module "us-west-2" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ca-central-1" {
Expand All @@ -65,7 +65,7 @@ module "ca-central-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "eu-central-1" {
Expand All @@ -78,7 +78,7 @@ module "eu-central-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "eu-west-1" {
Expand All @@ -91,7 +91,7 @@ module "eu-west-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "eu-west-2" {
Expand All @@ -104,7 +104,7 @@ module "eu-west-2" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "eu-west-3" {
Expand All @@ -117,7 +117,7 @@ module "eu-west-3" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "eu-north-1" {
Expand All @@ -130,7 +130,7 @@ module "eu-north-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ap-northeast-1" {
Expand All @@ -143,7 +143,7 @@ module "ap-northeast-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ap-northeast-2" {
Expand All @@ -156,7 +156,7 @@ module "ap-northeast-2" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ap-southeast-1" {
Expand All @@ -169,7 +169,7 @@ module "ap-southeast-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ap-southeast-2" {
Expand All @@ -182,7 +182,7 @@ module "ap-southeast-2" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "ap-south-1" {
Expand All @@ -195,7 +195,7 @@ module "ap-south-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
module "sa-east-1" {
Expand All @@ -208,6 +208,6 @@ module "sa-east-1" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
2 changes: 1 addition & 1 deletion guardduty_slack/regions.tf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module "$region" {
lambda_notify_to_slack_arn = module.lambda_sns_to_slack.lambda_arn
is_enable_lambda_notify_to_slack = var.guardduty_slack_webhook_url == "" ? false : true
ipset_location = local.ipset_location
is_enable_gurdduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
is_enable_guardduty_ipset = length(var.trusted_ip_cidr_blocks) > 0 ? true : false
guardduty_finding_publishing_frequency = var.guardduty_finding_publishing_frequency
}
EOS
Expand Down
2 changes: 1 addition & 1 deletion guardduty_slack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable "s3_bucket_name" {

variable "trusted_ip_cidr_blocks" {
type = list(string)
description = "CIDR block notations of trusted IP address ranges. (If you set an empty list, build without the gurdduty ipset. )"
description = "CIDR block notations of trusted IP address ranges. (If you set an empty list, build without the guardduty ipset. )"
default = []
}

Expand Down
Loading