Skip to content

Commit

Permalink
Merge pull request #34 from DNXLabs/feature/add_ami_id
Browse files Browse the repository at this point in the history
Feature/add ami
  • Loading branch information
caiovfernandes authored Jul 4, 2024
2 parents 0af93ed + 0bfc107 commit a0cbab9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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

0 comments on commit a0cbab9

Please sign in to comment.