Skip to content

filatov0120/terraform_modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform modules GitHub Tag GitHub top language GitHub repo size

  • EC2 instance with security group and with EIP
  • EC2 instance without EIP
  • EBS volume
  • VPC and subnet in multi az. NAT optional
  • RDS instance
  • ECR
  • ECS cluster/service/task definition
  • Amplify
  • ACM
  • ALB
  • IAM user
  • IAM role

Root folder consist an example files for simple infrastructure creating.

Requirements

Name Version
aws ~> 5.0
cloudflare ~> 4.0

Providers

Name Version
aws ~> 5.0
cloudflare ~> 4.0
terraform n/a

Modules

Name Source Version
amplify [email protected]:filatov0120/terraform_modules.git//aws_amplify v1.5.0
certificate_manager [email protected]:filatov0120/terraform_modules.git//aws_certificate_manager v1.5.0
ebs_volume [email protected]:Filicipa/terraform_modules.git//aws_ebs v1.5.0
ecr-repo [email protected]:filatov0120/terraform_modules.git//aws_ecr v1.5.0
ecs-cluster [email protected]:filatov0120/terraform_modules.git//aws_ecs_cluster v1.5.0
ecs-service [email protected]:filatov0120/terraform_modules.git//aws_ecs_service v1.5.0
elasticache [email protected]:filatov0120/terraform_modules.git//aws_elasticache v1.5.0
iam_role [email protected]:filatov0120/terraform_modules.git//aws_iam_role v1.5.0
iam_user [email protected]:filatov0120/terraform_modules.git//main_iam_user v1.5.0
load_balancer [email protected]:filatov0120/terraform_modules.git//aws_loadbalancer v1.5.0
rds_postgres [email protected]:filatov0120/terraform_modules.git//aws_rds v1.5.0
task-definition [email protected]:filatov0120/terraform_modules.git//aws_task_definition v1.5.0
test_server [email protected]:filatov0120/terraform_modules.git//aws_instance v1.5.0
vpc [email protected]:filatov0120/terraform_modules.git//aws_vpc v1.5.0

Resources

Name Type
cloudflare_record.backend_server resource
aws_ami.ubuntu_server data source
aws_availability_zones.available data source
aws_iam_policy.ecsTask data source
terraform_remote_state.shared data source

Inputs

Name Description Type Default Required
access_token GitHub access_token string n/a yes
allocated_storage Storage amount GB string "20" no
allow_major_version_upgrade Allow major version upgrade bool false no
ami_ubuntu_22_04 ami_ubuntu_22.04 string "ami-0ec7f9846da6b0f61" no
app_name n/a string n/a yes
apply_immediately Apply immediately bool false no
backend_domain_name n/a string n/a yes
backend_environment_variables n/a map(string) n/a yes
backup_retention_period Backup retention period string "3" no
branch_name n/a string n/a yes
build_spec n/a string n/a yes
cidr_vpc CIDR block for VPC string "192.168.0.0/16" no
cluster_name Created cluster name string n/a yes
cpu n/a number n/a yes
custom_rules n/a
list(object({
source = string
status = string
target = string
condition = string
}))
n/a yes
db_name Created db name string n/a yes
db_port DB open port string n/a yes
deletion_protection Deletion protection bool false no
desired_count n/a number n/a yes
dns_prefix_branch n/a string n/a yes
ebs_name EBS name string "/dev/sdf" no
ecr_repository_name n/a list(string) n/a yes
env Environment string "dev" no
force_delete n/a bool n/a yes
framework n/a string n/a yes
frontend_domain_name n/a string n/a yes
frontend_environment_variables n/a map(string) n/a yes
github_repository GitHub repositoty URL string n/a yes
health_check_path n/a string n/a yes
iam_role_name IAM role name string n/a yes
iam_user IAM user name string n/a yes
image_count Image count for lifecycle policy number n/a yes
image_tag_mutability n/a string n/a yes
inst1_name Name for instances string "test" no
inst2_name Name for instances string "" no
inst3_name Name for instances string "" no
inst4_name Name for instances string "" no
instance_class Instance_class string "db.t4g.micro" no
loadbalancer_name n/a string n/a yes
loadbalancer_type n/a string n/a yes
max_allocated_storage Autoscale storage amount string "0" no
memory n/a number n/a yes
monitoring_interval Monitoring interval string "0" no
multi_az multi_az bool false no
nat_create Is create a NAT Gateway? bool false no
node_type Node type string n/a yes
num_cache_nodes Node count string n/a yes
parameter_group_name Parameter group name string "default.postgres14" no
password Password for master username string n/a yes
private_subnet_cidrs Public subnet CIDRs list(string)
[
"192.168.21.0/24",
"192.168.22.0/24"
]
no
project_name Project name string n/a yes
public_subnet_cidrs Public subnet CIDRs list(string)
[
"192.168.11.0/24",
"192.168.12.0/24"
]
no
publicly_accessible Publicly accessible bool false no
rds_engine Engine type string "postgres" no
rds_engine_version Engine_version string "14.8" no
redis_engine Cluster engine string "redis" no
redis_engine_version Engine version string n/a yes
redis_port Redis open port string n/a yes
region AWS region string "eu-central-1" no
scan_on_push n/a bool false no
service_name n/a string n/a yes
sg_allow_tcp_ports n/a list(string) n/a yes
skip_final_snapshot Skip final snapshot bool n/a yes
ssh_key SSH key pair for instances string "test_key" no
stage n/a string n/a yes
storage_type Storage type string "gp3" no
target_group_name n/a string n/a yes
target_type Type of target group instance or ip string n/a yes
task_name n/a string n/a yes
username Master username string n/a yes
validation_method n/a string "DNS" no

Outputs

Name Description
Redis n/a
alb_dns The DNS name of the load balancer
amplify_cloud_front_dns_record DNS record for the subdomain
amplify_default_domain Default domain for the Amplify app
amplify_verification_dns_record The DNS record for certificate verification
avz n/a
avz_ids n/a
ecr_url The URL of the repository (in the form aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName)
iam_role_arn n/a
nat_eip n/a
private_subnet_ids n/a
public_subnet_ids n/a
rds_endpoint Endpoint of the RDS instance
vpc_id n/a