Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add ami #34

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The following resources will be created:
| alarm\_alb\_latency\_anomaly\_threshold | ALB Latency anomaly detection width (use 0 to disable this alarm) | `number` | `4` | no |
| alarm\_asg\_high\_cpu\_threshold | Max threshold average CPU percentage allowed in a 2 minutes interval (use 0 to disable this alarm) | `number` | `80` | no |
| alarm\_sns\_topics | Alarm topics to create and alert on ECS service metrics. Leaving empty disables all alarms. | `list` | `[]` | no |
| ami\_id | ElasticBeanstalk custom AMI ID | `string` | `""` | no |
| application\_port | Port application is listening on | `number` | `80` | no |
| application\_subnets | List of subnets to place EC2 instances | `list(string)` | n/a | yes |
| asg\_max | Max number of instances for autoscaling group | `number` | `4` | no |
Expand Down
8 changes: 8 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,11 @@ variable "solutions_stack_name_regex" {
default = ""
description = "Regex string to apply to the solution stack list returned by AWS"
}


variable "ami_id" {
type = string
default = ""
description = "ElasticBeanstalk custom AMI ID"
}

5 changes: 5 additions & 0 deletions eb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ locals {
]

eb_launch_config = [
{
name = "ImageId"
namespace = "aws:autoscaling:launchconfiguration"
value = var.ami_id
},
{
name = "InstanceType"
namespace = "aws:autoscaling:launchconfiguration"
Expand Down