Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Terraform module to deploy Atlantis on AWS Fargate 🇺🇦

License

NotificationsYou must be signed in to change notification settings

terraform-aws-modules/terraform-aws-atlantis

SWUbanner

Atlantis is tool which provides unified workflow for collaborating on Terraform through GitHub, GitLab and Bitbucket Cloud.

Before using Atlantis and the code in this repository, please make sure that you have read and understood the security implications described inthe official Atlantis documentation.

Usage

GitHub is shown below in usage examples; however, any git provider supported by Atlantis can be used by simply using the correct Atlantis environment variables and configuring the respective webhook for the given git provider.

See theSupplemental Docs for additional details on integrating with git providers.

GitHub Complete

The Atlantis module creates all resources required to run Atlantis on AWS Fargate.

module"atlantis" {source="terraform-aws-modules/atlantis/aws"name="atlantis"# ECS Container Definitionatlantis={    environment= [      {        name="ATLANTIS_GH_USER"        value="myuser"      },      {        name="ATLANTIS_REPO_ALLOWLIST"        value="github.com/terraform-aws-modules/*"      },    ]    secrets= [      {        name="ATLANTIS_GH_TOKEN"        valueFrom="arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes256-7g8H9i"      },      {        name="ATLANTIS_GH_WEBHOOK_SECRET"        valueFrom="arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes192-4D5e6F"      },    ]  }# ECS Serviceservice={    task_exec_secret_arns= ["arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes256-7g8H9i","arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes192-4D5e6F",    ]# Provide Atlantis permission necessary to create/destroy resources    tasks_iam_role_policies= {      AdministratorAccess="arn:aws:iam::aws:policy/AdministratorAccess"    }  }service_subnets=["subnet-xyzde987","subnet-slkjf456","subnet-qeiru789"]vpc_id="vpc-1234556abcdef"# ALBalb_subnets=["subnet-abcde012","subnet-bcde012a","subnet-fghi345a"]certificate_domain_name="example.com"route53_zone_id="Z2ES7B9AZ6SHAE"tags={    Environment="dev"    Terraform="true"  }}

GitHub Separate

The Atlantis module creates most of resources required to run Atlantis on AWS Fargate, except for the ECS Cluster and ALB. This allows you to integrate Atlantis with your existing AWS infrastructure.

module"atlantis" {source="terraform-aws-modules/atlantis/aws"name="atlantis"# Existing clustercreate_cluster=falsecluster_arn="arn:aws:ecs:eu-west-1:123456789012:cluster/default"# Existing ALBcreate_alb=falsealb_target_group_arn="arn:aws:elasticloadbalancing:eu-west-1:1234567890:targetgroup/bluegreentarget1/209a844cd01825a4"alb_security_group_id="sg-12345678"# ECS Container Definitionatlantis={    environment= [      {        name="ATLANTIS_GH_USER"        value="myuser"      },      {        name="ATLANTIS_REPO_ALLOWLIST"        value="github.com/terraform-aws-modules/*"      },    ]    secrets= [      {        name="ATLANTIS_GH_TOKEN"        valueFrom="arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes256-7g8H9i"      },      {        name="ATLANTIS_GH_WEBHOOK_SECRET"        valueFrom="arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes192-4D5e6F"      },    ]  }# ECS Serviceservice={    task_exec_secret_arns= ["arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes256-7g8H9i","arn:aws:secretsmanager:eu-west-1:111122223333:secret:aes192-4D5e6F",    ]# Provide Atlantis permission necessary to create/destroy resources    tasks_iam_role_policies= {      AdministratorAccess="arn:aws:iam::aws:policy/AdministratorAccess"    }  }service_subnets=["subnet-xyzde987","subnet-slkjf456","subnet-qeiru789"]vpc_id="vpc-1234556abcdef"tags={    Environment="dev"    Terraform="true"  }}

Utilize EFS for Persistent Storage

You can enable EFS to ensure that any plan outputs are persisted to EFS in the event that the Atlantis Task is replaced:

```hclmodule"atlantis" {source="terraform-aws-modules/atlantis/aws"# Truncated for brevity ...# EFSenable_efs=trueefs={    mount_targets= {"eu-west-1a"= {        subnet_id="subnet-xyzde987"      }"eu-west-1b"= {        subnet_id="subnet-slkjf456"      }"eu-west-1c"= {        subnet_id="subnet-qeiru789"      }    }  }}

Supply Atlantis server configuration

server-atlantis.yaml

repos:  -id:/.*/allow_custom_workflows:trueallowed_overrides:      -apply_requirements      -workflowapply_requirements:      -approvedworkflow:default

main.tf

module"atlantis" {source="terraform-aws-modules/atlantis/aws"# ...atlantis={    environment= [      {        name:"ATLANTIS_REPO_CONFIG_JSON",        value:jsonencode(yamldecode(file("${path.module}/server-atlantis.yaml"))),      },    ]  }}

Examples

Requirements

NameVersion
terraform>= 1.0
aws~> 5.0

Providers

No providers.

Modules

NameSourceVersion
acmterraform-aws-modules/acm/aws5.0.0
albterraform-aws-modules/alb/aws9.1.0
ecs_clusterterraform-aws-modules/ecs/aws//modules/cluster5.11.0
ecs_serviceterraform-aws-modules/ecs/aws//modules/service5.11.0
efsterraform-aws-modules/efs/aws1.3.1

Resources

No resources.

Inputs

NameDescriptionTypeDefaultRequired
albMap of values passed to ALB module definition. See theALB module for full list of arguments supportedany{}no
alb_https_default_actionDefault action for the ALB https listenerany
{
"forward": {
"target_group_key": "atlantis"
}
}
no
alb_security_group_idID of an existing security group that will be used by ALB. Required ifcreate_alb isfalsestring""no
alb_subnetsList of subnets to place ALB in. Required ifcreate_alb istruelist(string)[]no
alb_target_group_arnARN of an existing ALB target group that will be used to route traffic to the Atlantis service. Required ifcreate_alb isfalsestring""no
atlantisMap of values passed to Atlantis container definition. See theECS container definition module for full list of arguments supportedany{}no
atlantis_gidGID of the atlantis usernumber1000no
atlantis_uidUID of the atlantis usernumber100no
certificate_arnARN of certificate issued by AWS ACM. If empty, a new ACM certificate will be created and validated using Route53 DNSstring""no
certificate_domain_nameRoute53 domain name to use for ACM certificate. Route53 zone for this domain should be created in advance. Specify if it is different from value inroute53_zone_namestring""no
clusterMap of values passed to ECS cluster module definition. See theECS cluster module for full list of arguments supportedany{}no
cluster_arnARN of an existing ECS cluster where resources will be created. Required whencreate_cluster isfalsestring""no
createControls if resources should be created (affects nearly all resources)booltrueno
create_albDetermines whether to create an ALB or notbooltrueno
create_certificateDetermines whether to create an ACM certificate or not. Iffalse,certificate_arn must be providedbooltrueno
create_clusterWhether to create an ECS cluster or notbooltrueno
create_route53_recordsDetermines whether to create Route53A andAAAA records for the loadbalancerbooltrueno
efsMap of values passed to EFS module definition. See theEFS module for full list of arguments supportedany{}no
enable_efsDetermines whether to create and utilize an EFS filesystemboolfalseno
nameCommon name to use on all resources created unless a more specific name is providedstring"atlantis"no
route53_record_nameName of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB.stringnullno
route53_zone_idRoute53 zone ID to use for ACM certificate and Route53 recordsstring""no
serviceMap of values passed to ECS service module definition. See theECS service module for full list of arguments supportedany{}no
service_subnetsList of subnets to place ECS service withinlist(string)[]no
tagsA map of tags to add to all resourcesmap(string){}no
validate_certificateDetermines whether to validate ACM certificate using Route53 DNS. Iffalse, certificate will be created but not validatedbooltrueno
vpc_idID of the VPC where the resources will be provisionedstring""no

Outputs

NameDescription
albALB created and all of its associated outputs
clusterECS cluster created and all of its associated outputs
efsEFS created and all of its associated outputs
serviceECS service created and all of its associated outputs
urlURL of Atlantis

Authors

Module is maintained byAnton Babenko with help fromthese awesome contributors.

License

Apache 2 Licensed. SeeLICENSE for full details.

Additional information for users from Russia and Belarus

About

Terraform module to deploy Atlantis on AWS Fargate 🇺🇦

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp