jenkins

cloudposse/jenkins/aws

Terraform Module HCL AWS

Terraform module to build Docker image with Jenkins, save it to an ECR repo, and deploy to Elastic Beanstalk running Docker stack

Install
module "jenkins" {
source = "cloudposse/jenkins/aws"
version = "0.11.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-jenkins ![Latest Release](https://github.com/cloudposse/terraform-aws-jenkins/releases/latest) ![Slack Community](https://slack.cloudposse.com) [![README Header][readme_header_img]][readme_header_link] [![Cloud Posse][logo]](https://cpco.io/homepage) terraform-aws-jenkins is a Terraform module to build a Docker image with Jenkins, save it to an ECR repo, and deploy to Elastic Beanstalk running Docker. This is an enterprise-ready, scalable and highly-available architecture and the CI/CD pattern to build and deploy Jenkins. Features The module will create the following AWS resources: Elastic Beanstalk Application Elastic Beanstalk Environment with Docker stack to run the Jenkins master ECR repository to store the Jenkins Docker image EFS filesystem to store Jenkins config and j

Inputs (50)
NameTypeDescriptionDefault
regionstringAWS region in which to provision the AWS resources required
availability_zoneslist(string)List of Availability Zones for EFS required
loadbalancer_subnetslist(string)List of subnets to place Elastic Load Balancer required
application_subnetslist(string)List of subnets to place EC2 instances and EFS required
dns_zone_idstringRoute53 parent zone ID. The module will create sub-domain DNS records in the par required
aws_account_idstringAWS Account ID. Used as CodeBuild ENV variable $AWS_ACCOUNT_ID when building Doc required
github_oauth_tokenstringGitHub Oauth Token required
vpc_idstringID of the VPC in which to provision the AWS resources required
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
loadbalancer_typestringLoad Balancer type, e.g. 'application' or 'classic'"application"
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
rolling_update_typestring`Health`, `Time` or `Immutable`. Set it to `Immutable` to apply the configuratio"Health"
efs_backup_completion_windownumberThe amount of time AWS Backup attempts a backup before canceling the job and retnull
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
github_branchstringGitHub repository branch, e.g. 'master'. By default, this module will deploy 'ht"master"
label_key_casestringControls the letter case of the `tags` keys (label names) for tags generated by null
descriptionstringWill be used as Elastic Beanstalk application description"Jenkins server as Docker container runn
associated_security_group_idslist(string)List of security groups to be allowed to connect to Jenkins master EC2 instances[]
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
github_organizationstringGitHub organization, e.g. 'cloudposse'. By default, this module will deploy 'htt"cloudposse"
cicd_bucket_force_destroyboolForce destroy the CI/CD S3 bucket even if it's not emptyfalse
build_imagestringCodeBuild build image, e.g. 'aws/codebuild/amazonlinux2-x86_64-standard:1.0'. Fo"aws/codebuild/docker:1.12.1"
use_efs_ip_addressboolIf set to `true`, will provide the EFS IP address instead of DNS name to Jenkinsfalse
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
… and 10 more inputs
Outputs (43)
codepipeline_id — CodePipeline ID
codepipeline_arn — CodePipeline ARN
ecr_registry_id — Registry ID
codebuild_project_id — CodeBuild project ID
codebuild_badge_url — The URL of the build badge when badge_enabled is enabled
efs_network_interface_ids — List of mount target network interface IDs
codebuild_project_name — CodeBuild project name
efs_backup_vault_id — Backup Vault ID
efs_backup_vault_arn — Backup Vault ARN
elastic_beanstalk_environment_security_group_id — Security group id
elastic_beanstalk_environment_autoscaling_groups — The autoscaling groups used by this environment
efs_host — Route53 DNS hostname for the EFS
efs_id — EFS ID
efs_dns_name — EFS DNS name
efs_backup_selection_id — Backup Selection ID
elastic_beanstalk_environment_id — ID of the Elastic Beanstalk environment
elastic_beanstalk_environment_application — The Elastic Beanstalk Application specified for this environment
ecr_repository_name — Repository name
elastic_beanstalk_environment_tier — The environment tier
elastic_beanstalk_environment_launch_configurations — Launch configurations in use by this environment
efs_arn — EFS ARN
elastic_beanstalk_environment_name — Name
elastic_beanstalk_environment_elb_zone_id — ELB zone id
elastic_beanstalk_environment_endpoint — Fully qualified DNS name for the environment
elastic_beanstalk_environment_queues — SQS queues in use by this environment
codebuild_role_id — CodeBuild IAM Role ID
efs_backup_plan_arn — Backup Plan ARN
elastic_beanstalk_environment_hostname — DNS hostname
elastic_beanstalk_environment_setting — Settings specifically set for this environment
elastic_beanstalk_environment_load_balancers — Elastic Load Balancers in use by this environment
… and 13 more outputs
Resources (3)
aws_iam_policyaws_iam_role_policy_attachmentaws_security_group
Details
FrameworkTerraform Module
LanguageHCL
Version0.11.0
Cloud AWS
★ Stars255
Forks150
Total downloads7.2k
Inputs50
Outputs43
Resources3
Examples4
LicenseApache-2.0
Namespacecloudposse
Updated