An open API service indexing awesome lists of open source software.

https://github.com/jameswoolfenden/terraform-aws-codedeploy

Basic codedeploy module
https://github.com/jameswoolfenden/terraform-aws-codedeploy

aws codedeploy module terraform

Last synced: 9 months ago
JSON representation

Basic codedeploy module

Awesome Lists containing this project

README

          

# terraform-aws-codedeploy

[![Build Status](https://github.com/JamesWoolfenden/terraform-aws-codedeploy/workflows/Verify%20and%20Bump/badge.svg?branch=master)](https://github.com/JamesWoolfenden/terraform-aws-codedeploy)
[![Latest Release](https://img.shields.io/github/release/JamesWoolfenden/terraform-aws-codedeploy.svg)](https://github.com/JamesWoolfenden/terraform-aws-codedeploy/releases/latest)
[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/JamesWoolfenden/terraform-aws-codedeploy.svg?label=latest)](https://github.com/JamesWoolfenden/terraform-aws-codedeploy/releases/latest)
![Terraform Version](https://img.shields.io/badge/tf-%3E%3D0.14.0-blue.svg)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/JamesWoolfenden/terraform-aws-codedeploy/cis_aws)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-aws-codedeploy&benchmark=CIS+AWS+V1.2)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![checkov](https://img.shields.io/badge/checkov-verified-brightgreen)](https://www.checkov.io/)
[![Infrastructure Tests](https://www.bridgecrew.cloud/badges/github/jameswoolfenden/terraform-aws-codedeploy/general)](https://www.bridgecrew.cloud/link/badge?vcs=github&fullRepo=JamesWoolfenden%2Fterraform-aws-codedeploy&benchmark=INFRASTRUCTURE+SECURITY)

Terraform module.

---

It's 100% Open Source and licensed under the [APACHE2](LICENSE).

## Usage

```terraform
module "codedeploy" {
source = "JamesWoolfenden/budget/aws"
version = "0.0.1"
tags= {
pike="permissions"
}
}
```

## Requirements

No requirements.

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_codedeploy_app.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codedeploy_app) | resource |
| [aws_codedeploy_deployment_config.pike](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codedeploy_deployment_config) | resource |
| [aws_codedeploy_deployment_group.example](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/codedeploy_deployment_group) | resource |
| [aws_iam_role.deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy_attachment.AWSCodeDeployRole](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
| [aws_sns_topic.deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [alarm\_configuration](#input\_alarm\_configuration) | n/a |

object({
alarms = list(string)
enabled = bool
})
|
{
"alarms": [
"my-alarm-name"
],
"enabled": true
}
| no |
| [app](#input\_app) | n/a | `map(any)` | n/a | yes |
| [auto\_rollback\_configuration](#input\_auto\_rollback\_configuration) | n/a |
object({
events = list(string)
enabled = bool
})
|
{
"enabled": true,
"events": [
"DEPLOYMENT_FAILURE"
]
}
| no |
| [blue\_green\_config](#input\_blue\_green\_config) | n/a |
object({
action_on_timeout = string
wait_time_in_minutes = number
green_action = string
blue_action = string
termination_wait_time_in_minutes = number
})
|
{
"action_on_timeout": null,
"blue_action": null,
"green_action": null,
"termination_wait_time_in_minutes": null,
"wait_time_in_minutes": null
}
| no |
| [config](#input\_config) | n/a |
object({
deployment_config_name = string
minimum_healthy_hosts = object({
type = string
value = number
})
})
| n/a | yes |
| [deployment\_config\_name](#input\_deployment\_config\_name) | n/a | `string` | `"CodeDeployDefault.OneAtATime"` | no |
| [deployment\_group\_name](#input\_deployment\_group\_name) | n/a | `string` | n/a | yes |
| [ec2\_tag\_filters](#input\_ec2\_tag\_filters) | n/a | `list(any)` | n/a | yes |
| [ecs\_services](#input\_ecs\_services) | n/a | `list(any)` | `[]` | no |
| [elb\_info](#input\_elb\_info) | n/a | `string` | `""` | no |
| [kms\_key\_id](#input\_kms\_key\_id) | n/a | `any` | n/a | yes |
| [load\_balancer\_info](#input\_load\_balancer\_info) | n/a | `list(any)` | `[]` | no |
| [style](#input\_style) | n/a | `map(any)` |
{
"deployment_option": "WITHOUT_TRAFFIC_CONTROL",
"deployment_type": "IN_PLACE"
}
| no |
| [tags](#input\_tags) | n/a | `map(any)` | n/a | yes |
| [traffic\_routing\_config](#input\_traffic\_routing\_config) | n/a |
list(object({
type = string
time_based_linear = list(object({
interval = number
percentage = number
}))
time_based_canary = list(object({
interval = number
percentage = number
}))
}))
| n/a | yes |
| [trigger\_configuration](#input\_trigger\_configuration) | n/a |
object({
trigger_events = list(string)
trigger_name = string
})
|
{
"trigger_events": [
"DeploymentFailure"
],
"trigger_name": "example-trigger"
}
| no |

## Outputs

No outputs.

## Policy

The Terraform resource required is:

```golang
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"

policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"SNS:CreateTopic",
"SNS:DeleteTopic",
"SNS:GetTopicAttributes",
"SNS:ListTagsForResource",
"SNS:SetTopicAttributes"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"codedeploy:CreateApplication",
"codedeploy:CreateDeploymentConfig",
"codedeploy:CreateDeploymentGroup",
"codedeploy:DeleteApplication",
"codedeploy:DeleteDeploymentConfig",
"codedeploy:DeleteDeploymentGroup",
"codedeploy:GetApplication",
"codedeploy:GetDeploymentConfig",
"codedeploy:GetDeploymentGroup",
"codedeploy:ListTagsForResource",
"codedeploy:TagResource",
"codedeploy:UntagResource"
],
"Resource": "*"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"ec2:DescribeAccountAttributes"
],
"Resource": "*"
},
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:CreateRole",
"iam:DeleteRole",
"iam:DetachRolePolicy",
"iam:GetRole",
"iam:ListAttachedRolePolicies",
"iam:ListInstanceProfilesForRole",
"iam:ListRolePolicies",
"iam:PassRole"
],
"Resource": "*"
}
]
})
}

```

## Related Projects

Check out these related projects.

- [terraform-aws-s3](https://github.com/jameswoolfenden/terraform-aws-s3) - S3 buckets

## Help

**Got a question?**

File a GitHub [issue](https://github.com/JamesWoolfenden/terraform-aws-codedeploy/issues).

## Contributing

### Bug Reports & Feature Requests

Please use the [issue tracker](https://github.com/JamesWoolfenden/terraform-aws-codedeploy/issues) to report any bugs or file feature requests.

## Copyrights

Copyright 2022 James Woolfenden

## License

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

See [LICENSE](LICENSE) for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

### Contributors

[![James Woolfenden][jameswoolfenden_avatar]][jameswoolfenden_homepage]
[James Woolfenden][jameswoolfenden_homepage]

[jameswoolfenden_homepage]: https://github.com/jameswoolfenden
[jameswoolfenden_avatar]: https://github.com/jameswoolfenden.png?size=150