Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flaconi/terraform-aws-beanstalk
Terraform module for handling elastic beanstalk environment and application
https://github.com/flaconi/terraform-aws-beanstalk
aws terraform terraform-module
Last synced: about 5 hours ago
JSON representation
Terraform module for handling elastic beanstalk environment and application
- Host: GitHub
- URL: https://github.com/flaconi/terraform-aws-beanstalk
- Owner: Flaconi
- License: mit
- Created: 2022-03-02T09:44:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-27T09:16:39.000Z (12 months ago)
- Last Synced: 2023-11-27T10:30:55.274Z (12 months ago)
- Topics: aws, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-module-template
Template for Terraform modules[![lint](https://github.com/flaconi/terraform-aws-beanstalk/workflows/lint/badge.svg)](https://github.com/flaconi/terraform-aws-beanstalk/actions?query=workflow%3Alint)
[![test](https://github.com/flaconi/terraform-aws-beanstalk/workflows/test/badge.svg)](https://github.com/flaconi/terraform-aws-beanstalk/actions?query=workflow%3Atest)
[![Tag](https://img.shields.io/github/tag/flaconi/terraform-aws-beanstalk.svg)](https://github.com/flaconi/terraform-aws-beanstalk/releases)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3.0 |## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | ~> 1.1 |
| [aws](#requirement\_aws) | >= 3.0 |## Required Inputs
The following input variables are required:
Description: AWS region
Type: `string`
### [description](#input\_description)
Description: Short description of the Environment
Type: `string`
### [vpc\_id](#input\_vpc\_id)
Description: ID of the VPC
Type: `string`
### [private\_subnet\_ids](#input\_private\_subnet\_ids)
Description: List of subnets
Type: `list(string)`
### [public\_subnet\_ids](#input\_public\_subnet\_ids)
Description: List of subnets
Type: `list(string)`
### [solution\_stack\_name](#input\_solution\_stack\_name)
Description: Elastic Beanstalk stack, e.g. Docker, Go, Node, Java, IIS. For more info, see https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html
Type: `string`
### [application\_name](#input\_application\_name)
Description: n/a
Type: `string`
## Optional Inputs
The following input variables are optional (have default values):
### [loadbalancer\_type](#input\_loadbalancer\_type)
Description: Load Balancer type, e.g. 'application' or 'classic'
Type: `string`
Default: `"application"`
### [loadbalancer\_ssl\_policy](#input\_loadbalancer\_ssl\_policy)
Description: Specify a security policy to apply to the listener. This option is only applicable to environments with an application load balancer
Type: `string`
Default: `""`
### [instance\_type](#input\_instance\_type)
Description: Instances type
Type: `string`
Default: `"t3.micro"`
### [healthcheck\_url](#input\_healthcheck\_url)
Description: Application Health Check URL. Elastic Beanstalk will call this URL to check the health of the application running on EC2 instances
Type: `string`
Default: `"/healthz"`
### [healthcheck\_interval](#input\_healthcheck\_interval)
Description: The interval of time, in seconds, that Elastic Load Balancing checks the health of the Amazon EC2 instances of your application
Type: `number`
Default: `15`
### [health\_streaming\_enabled](#input\_health\_streaming\_enabled)
Description: For environments with enhanced health reporting enabled, whether to create a group in CloudWatch Logs for environment health and archive Elastic Beanstalk environment health data. For information about enabling enhanced health, see aws:elasticbeanstalk:healthreporting:system.
Type: `bool`
Default: `false`
### [health\_streaming\_delete\_on\_terminate](#input\_health\_streaming\_delete\_on\_terminate)
Description: Whether to delete the log group when the environment is terminated. If false, the health data is kept RetentionInDays days.
Type: `bool`
Default: `false`
### [health\_streaming\_retention\_in\_days](#input\_health\_streaming\_retention\_in\_days)
Description: The number of days to keep the archived health data before it expires.
Type: `number`
Default: `7`
### [autoscale\_min](#input\_autoscale\_min)
Description: Minumum instances to launch
Type: `number`
Default: `1`
### [autoscale\_max](#input\_autoscale\_max)
Description: Maximum instances to launch
Type: `number`
Default: `1`
### [env\_vars](#input\_env\_vars)
Description: Map of custom ENV variables to be provided to the application running on Elastic Beanstalk, e.g. env\_vars = { DB\_USER = 'admin' DB\_PASS = 'xxxxxx' }
Type: `map(string)`
Default: `{}`
### [dns\_zone\_id](#input\_dns\_zone\_id)
Description: Route53 parent zone ID. The module will create sub-domain DNS record in the parent zone for the EB environment
Type: `string`
Default: `""`
### [domain\_name](#input\_domain\_name)
Description: n/a
Type: `string`
Default: `""`
### [dns\_subdomain](#input\_dns\_subdomain)
Description: The subdomain to create on Route53 for the EB environment. For the subdomain to be created, the `dns_zone_id` variable must be set as well
Type: `string`
Default: `""`
### [deployment\_version](#input\_deployment\_version)
Description: n/a
Type: `string`
Default: `"initial"`
### [deployment\_bucket](#input\_deployment\_bucket)
Description: n/a
Type: `string`
Default: `null`
### [deployment\_file\_path](#input\_deployment\_file\_path)
Description: n/a
Type: `string`
Default: `"Dockerrun.aws.json"`
### [deployment\_definition](#input\_deployment\_definition)
Description: n/a
Type: `string`
Default: `null`
Description: A map of additional tags to apply to all VPC resources
Type: `map(string)`
Default: `{}`
### [subject\_alternative\_names](#input\_subject\_alternative\_names)
Description: n/a
Type: `list(string)`
Default: `[]`
### [validation\_allow\_overwrite\_records](#input\_validation\_allow\_overwrite\_records)
Description: n/a
Type: `bool`
Default: `true`
### [additional\_settings](#input\_additional\_settings)
Description: Additional Elastic Beanstalk setttings. For full list of options, see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html
Type:
```hcl
list(object({
namespace = string
name = string
value = string
}))
```Default: `[]`
### [managed\_actions\_enabled](#input\_managed\_actions\_enabled)
Description: Enable managed platform updates. When you set this to true, you must also specify a `PreferredStartTime` and `UpdateLevel`
Type: `bool`
Default: `false`
### [preferred\_start\_time](#input\_preferred\_start\_time)
Description: Configure a maintenance window for managed actions in UTC
Type: `string`
Default: `"Sun:10:00"`
### [update\_level](#input\_update\_level)
Description: The highest level of update to apply with managed platform updates
Type: `string`
Default: `"minor"`
### [enable\_stream\_logs](#input\_enable\_stream\_logs)
Description: Whether to create groups in CloudWatch Logs for proxy and deployment logs, and stream logs from each instance in your environment
Type: `bool`
Default: `false`
### [logs\_delete\_on\_terminate](#input\_logs\_delete\_on\_terminate)
Description: Whether to delete the log groups when the environment is terminated. If false, the logs are kept RetentionInDays days
Type: `bool`
Default: `false`
### [logs\_retention\_in\_days](#input\_logs\_retention\_in\_days)
Description: The number of days to keep log events before they expire.
Type: `number`
Default: `7`
### [keypair](#input\_keypair)
Description: Name of SSH key that will be deployed on Elastic Beanstalk and DataPipeline instance. The key should be present in AWS
Type: `string`
Default: `""`
## Outputs
| Name | Description |
|------|-------------|
| [elastic\_beanstalk\_application\_name](#output\_elastic\_beanstalk\_application\_name) | Elastic Beanstalk Application name |
| [elastic\_beanstalk\_environment\_all\_settings](#output\_elastic\_beanstalk\_environment\_all\_settings) | List of all option settings configured in the environment. These are a combination of default settings and their overrides from setting in the configuration |
| [elastic\_beanstalk\_environment\_application](#output\_elastic\_beanstalk\_environment\_application) | The Elastic Beanstalk Application specified for this environment |
| [elastic\_beanstalk\_environment\_autoscaling\_groups](#output\_elastic\_beanstalk\_environment\_autoscaling\_groups) | The autoscaling groups used by this environment |
| [elastic\_beanstalk\_environment\_ec2\_instance\_profile\_role\_name](#output\_elastic\_beanstalk\_environment\_ec2\_instance\_profile\_role\_name) | Instance IAM role name |
| [elastic\_beanstalk\_environment\_elb\_zone\_id](#output\_elastic\_beanstalk\_environment\_elb\_zone\_id) | ELB zone id |
| [elastic\_beanstalk\_environment\_endpoint](#output\_elastic\_beanstalk\_environment\_endpoint) | Fully qualified DNS name for the environment |
| [elastic\_beanstalk\_environment\_hostname](#output\_elastic\_beanstalk\_environment\_hostname) | DNS hostname |
| [elastic\_beanstalk\_environment\_id](#output\_elastic\_beanstalk\_environment\_id) | ID of the Elastic Beanstalk environment |
| [elastic\_beanstalk\_environment\_instances](#output\_elastic\_beanstalk\_environment\_instances) | Instances used by this environment |
| [elastic\_beanstalk\_environment\_launch\_configurations](#output\_elastic\_beanstalk\_environment\_launch\_configurations) | Launch configurations in use by this environment |
| [elastic\_beanstalk\_environment\_load\_balancers](#output\_elastic\_beanstalk\_environment\_load\_balancers) | Elastic Load Balancers in use by this environment |
| [elastic\_beanstalk\_environment\_log\_streams](#output\_elastic\_beanstalk\_environment\_log\_streams) | Log Streaming in this environment |
| [elastic\_beanstalk\_environment\_name](#output\_elastic\_beanstalk\_environment\_name) | Name |
| [elastic\_beanstalk\_environment\_queues](#output\_elastic\_beanstalk\_environment\_queues) | SQS queues in use by this environment |
| [elastic\_beanstalk\_environment\_security\_group\_arn](#output\_elastic\_beanstalk\_environment\_security\_group\_arn) | Elastic Beanstalk environment Security Group ARN |
| [elastic\_beanstalk\_environment\_security\_group\_id](#output\_elastic\_beanstalk\_environment\_security\_group\_id) | Elastic Beanstalk environment Security Group ID |
| [elastic\_beanstalk\_environment\_security\_group\_name](#output\_elastic\_beanstalk\_environment\_security\_group\_name) | Elastic Beanstalk environment Security Group name |
| [elastic\_beanstalk\_environment\_setting](#output\_elastic\_beanstalk\_environment\_setting) | Settings specifically set for this environment |
| [elastic\_beanstalk\_environment\_tier](#output\_elastic\_beanstalk\_environment\_tier) | The environment tier |
| [elastic\_beanstalk\_environment\_triggers](#output\_elastic\_beanstalk\_environment\_triggers) | Autoscaling triggers in use by this environment |## License
**[MIT License](LICENSE)**
Copyright (c) 2022 **[Flaconi GmbH](https://github.com/flaconi)**