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 add codedeploy

License

NotificationsYou must be signed in to change notification settings

skyscrapers/terraform-codedeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform modules that are related to codedeploy

Create a codedeploy app

Requirements

NameVersion
terraform>= 0.12

Providers

NameVersion
awsn/a

Inputs

NameDescriptionTypeDefaultRequired
nameName of your codedeploy applicationanyn/ayes
projectThe current projectanyn/ayes
s3_bucket_arnARN of the S3 bucket where to fetch the application revision packagesstring""no

Outputs

NameDescription
app_namen/a
deployer_policy_arnn/a
deployer_policy_idn/a
deployer_policy_namen/a

Example

  module "codedeploy" {    source  = "github.com/skyscrapers/terraform-codedeploy//app"    name    = "application"    project = "example"  }

deployment-group

Create an deployment group for a codedeploy app

Requirements

NameVersion
terraform>= 0.12

Providers

NameVersion
awsn/a

Inputs

NameDescriptionTypeDefaultRequired
app_nameName of the appanyn/ayes
autoscaling_groupsAutoscaling groups you want to attach to the deployment grouplist(string)n/ayes
environmentEnvironment where your codedeploy deployment group is used foranyn/ayes
service_role_arnIAM role that is used by the deployment groupanyn/ayes
alb_target_groupName of the ALB target group to use, define it when traffic need to be blocked from ALB during deploymentstringnullno
blue_termination_behaviorThe action to take on instances in the original environment after a successful deployment. Only relevant whenenable_bluegreen istruestring"KEEP_ALIVE"no
bluegreen_timeout_actionWhen to reroute traffic from an original environment to a replacement environment. Only relevant whenenable_bluegreen istruestring"CONTINUE_DEPLOYMENT"no
ec2_tag_filterFilter key and value you want to use for tags filters. Defined as key/value format, example:{"Environment":"staging"}map(string)nullno
enable_bluegreenEnable all bluegreen deployment optionsboolfalseno
green_provisioningThe method used to add instances to a replacement environment. Only relevant whenenable_bluegreen istruestring"COPY_AUTO_SCALING_GROUP"no
rollback_enabledWhether to enable auto rollbackboolfalseno
rollback_eventsThe event types that trigger a rollbacklist(string)
[
"DEPLOYMENT_FAILURE"
]
no
trigger_eventsevents that can trigger the notificationslist(string)
[
"DeploymentStop",
"DeploymentRollback",
"DeploymentSuccess",
"DeploymentFailure",
"DeploymentStart"
]
no
trigger_target_arnThe ARN of the SNS topic through which notifications are sentstringnullno

Outputs

No output.

Example

  module "deployment_group" {    source             = "github.com/skyscrapers/terraform-codedeploy//deployment-group"    environment        = "production"    app_name           = module.codedeploy.app_name    service_role_arn   = module.iam.arn_role    autoscaling_groups = ["autoscaling1", "autoscaling2"]  }

S3 bucket

Create an S3 bucket to use with Codedeploy, to store application revisions.

Requirements

NameVersion
terraform>= 0.12

Providers

NameVersion
awsn/a

Inputs

NameDescriptionTypeDefaultRequired
name_prefixPrefix for the bucket name. Note that the same bucket is used for all codedeploy deployment groupsanyn/ayes

Outputs

NameDescription
bucket_arnn/a
bucket_idn/a
policy_arnn/a
policy_idn/a
policy_namen/a

Example

module "codedeploy_bucket" {  source      = "github.com/skyscrapers/terraform-codedeploy//s3bucket?ref=478373f6f8d4a46b7a1ec96090707365e0ae3e42"  name_prefix = "app"}

notify-slack

Creates a lambda function that notifies Slack via theincoming webhooks when a deployment event happens using an SNS topic to call the lambda function.

Requirements

NameVersion
terraform>= 0.12

Providers

NameVersion
archiven/a
awsn/a

Inputs

NameDescriptionTypeDefaultRequired
kms_key_arnKMS used for encrypting the webhookanyn/ayes
slack_channelE.g. #channel_nameanyn/ayes
slack_webhook_urlNeeds to be encrypted from a file withno encryption context, using: aws kms encrypt --key-id 'arn:' --plaintext 'fileb://webhook' --output text --query CiphertextBlobanyn/ayes
notify_usersSlack usernames for mentions as a space separated string as '<@name1> <@name2>' or '<!channel>' or '<!here>'string""no
verboseAll codedeploy messages will be output if true. Only CREATED, FAILED, STOPPED and SUCCEEDED if it is empty or falsestring"true"no

Outputs

NameDescription
sns_topicn/a

Example

  module "slack-notification" {    source  = "github.com/skyscrapers/terraform-codedeploy//notify-slack"    slack_webhook_url = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"    slack_channel = "#channel_name"    kms_key_arn = aws_kms_key.kms_key.arn  }

About

Terraform module to add codedeploy

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp