kuttleio / terraform-aws-environment

Kuttle - Blueprint - Main
https://ktl.ai
Apache License 2.0
0 stars 0 forks source link
aws environment fargate kuttle service terraform

Requirements

Name Version
terraform >= 1.0
github ~> 5.0
logdna ~> 1.0

Providers

Name Version
aws n/a
github ~> 5.0
logdna ~> 1.0
random n/a

Modules

Name Source Version
database terraform-aws-modules/rds/aws ~> 5.0
dynamodb_table terraform-aws-modules/dynamodb-table/aws ~> 4.0.0
ecs_fargate terraform-aws-modules/ecs/aws 4.1.3
force_new_deployment github.com/kuttleio/aws_ecs_fargate_force_new_deployment// 2.0.0
logdna terraform-aws-modules/lambda/aws ~> 4.0
s3_bucket terraform-aws-modules/s3-bucket/aws ~> 3.0
services github.com/kuttleio/aws_ecs_fargate_app 1.1.2

Resources

Name Type
aws_ecr_lifecycle_policy.main resource
aws_ecr_repository.main resource
aws_iam_policy.ecs resource
aws_iam_policy.pricing resource
aws_iam_policy.rds resource
aws_iam_policy.s3 resource
aws_iam_policy.sqs resource
aws_iam_role.main resource
aws_lambda_permission.allow_cloudwatch resource
aws_lb.loadbalancers resource
aws_route53_record.records resource
aws_s3_bucket.logs resource
aws_s3_bucket_lifecycle_configuration.logs resource
aws_s3_bucket_ownership_controls.logs resource
aws_s3_bucket_policy.logs resource
aws_s3_bucket_public_access_block.logs resource
aws_s3_bucket_server_side_encryption_configuration.logs resource
aws_s3_bucket_versioning.logs resource
aws_security_group.main resource
aws_service_discovery_private_dns_namespace.main resource
aws_sqs_queue.main resource
aws_sqs_queue.reversed resource
aws_ssm_parameter.database_connection_string resource
aws_wafv2_ip_set.whitelisted_ips resource
aws_wafv2_web_acl.waf_acl resource
aws_wafv2_web_acl_association.acl_association resource
github_branch.new resource
github_repository_file.respository_files resource
logdna_view.main resource
random_password.database resource
aws_acm_certificate.main data source
aws_elb_service_account.main data source
aws_iam_policy_document.policy_document data source
aws_region.current data source
aws_route53_zone.main data source
aws_ssm_parameter.github_token data source
aws_ssm_parameter.logdna_ingestion_key data source
aws_ssm_parameter.logdna_service_key data source
github_branch.master data source
github_repository.repositories data source

Inputs

Name Description Type Default Required
account_id n/a any n/a yes
clp_account n/a any n/a yes
clp_region n/a any n/a yes
clp_zenv n/a any n/a yes
database_allocated_storage n/a number 20 no
database_max_allocated_storage n/a number 100 no
database_username n/a string "kuttle" no
datastores n/a
object(
{
dynamodb = optional(map(object({
table_name = string
billing_mode = optional(string)
table_class = optional(string)
hash_key = string
range_key = optional(string)
attributes = list(object({
name = string
type = string
}))
read_capacity = optional(number)
write_capacity = optional(number)
server_side_encryption_enabled = optional(bool)
deletion_protection_enabled = optional(bool)
global_secondary_indexes = optional(list(object({
name = string
hash_key = string
range_key = optional(string)
write_capacity = optional(number)
read_capacity = optional(number)
projection_type = optional(string)
non_key_attributes = optional(list(string))
server_side_encryption_enabled = optional(bool)
stream_enabled = optional(bool)
stream_view_type = optional(string)
projection_non_key_attributes = optional(list(string))
projection_include = optional(bool)
projection_include_type = optional(string)
projection_include_non_key_attributes = optional(list(string))
})))
ignore_changes_global_secondary_index = optional(bool)
autoscaling_read_enabled = optional(bool)
autoscaling_read_scale_in_cooldown = optional(number)
autoscaling_read_scale_out_cooldown = optional(number)
autoscaling_read_target_value = optional(number)
autoscaling_read_max_capacity = optional(number)
autoscaling_write_enabled = optional(bool)
autoscaling_write_scale_in_cooldown = optional(number)
autoscaling_write_scale_out_cooldown = optional(number)
autoscaling_write_target_value = optional(number)
autoscaling_write_max_capacity = optional(number)
autoscaling_indexes = optional(map(object({
read_max_capacity = optional(number)
read_min_capacity = optional(number)
write_max_capacity = optional(number)
write_min_capacity = optional(number)
})))
stream_enabled = optional(bool)
stream_view_type = optional(string)
ttl_enabled = optional(bool)
ttl_attribute_name = optional(string)
point_in_time_recovery_enabled = optional(bool)
tags = optional(map(string))
})))
}
)
{
"dynamodb": {}
}
no
domain_name n/a any n/a yes
ecr_account_id n/a any n/a yes
ecr_region n/a any n/a yes
envvars n/a any n/a yes
ipwhitelist n/a list(string)
[
"0.0.0.0/1",
"128.0.0.0/1"
]
no
mezmo_account_id n/a any n/a yes
private_subnets n/a any n/a yes
public_subnets n/a any n/a yes
s3_buckets Map of S3 buckets
map(object({
versioning = optional(map(string))
block_public_acls = optional(bool)
block_public_policy = optional(bool)
ignore_public_acls = optional(bool)
restrict_public_buckets = optional(bool)
attach_policy = optional(bool)
policy = optional(object(
{
principals = optional(list(string))
actions = optional(list(string))
}
))
policy_json = optional(string)
lifecycle_rule = optional(list(any))
object_ownership = optional(string)
force_destroy = optional(bool)
tags = optional(map(string))
}))
{} no
s3_tf_artefacts n/a any n/a yes
secrets n/a any n/a yes
security_groups n/a any n/a yes
services Map of service names and configurations
map(object({
public = bool
name = string
cpu = number
memory = number
endpoint = optional(string)
command = optional(list(string))
environment = optional(list(object({ name = string, value = string })))
secrets = optional(list(object({ name = string, valueFrom = string })))
tags = optional(map(string))
deploy = object({
gitrepo = string
dockerfilepath = optional(string)
method = optional(string)
branch = optional(string)
version = optional(string)
})
}))
{
"backend": {
"cpu": 256,
"deploy": {
"branch": "master",
"dockerfilepath": "Dockerfile",
"gitrepo": "kuttleio/backend",
"method": "from_branch"
},
"endpoint": "backend",
"environment": [],
"memory": 512,
"name": "backend",
"public": true
},
"frontend": {
"cpu": 256,
"deploy": {
"branch": "master",
"dockerfilepath": "Dockerfile",
"gitrepo": "kuttleio/frontend",
"method": "from_branch"
},
"endpoint": "",
"environment": [],
"memory": 512,
"name": "frontend",
"public": true
},
"runner": {
"cpu": 256,
"deploy": {
"branch": "master",
"dockerfilepath": "Dockerfile",
"gitrepo": "kuttleio/runner",
"method": "from_branch"
},
"endpoint": "",
"environment": [],
"memory": 512,
"name": "runner",
"public": false
}
}
no
standard_tags n/a any n/a yes
vpc_id n/a any n/a yes

Outputs

Name Description
cluster_arn ECS Fargate Cluster ARN
cluster_id ECS Fargate Cluster ID
cluster_name ECS Fargate Cluster Name
ecr_repo_url ECR repository URL
fqdn n/a
logdna_view_id n/a
logdna_view_url Mezmo (LogDNA) View URL
public_lb_arn Public LB ARN
url n/a