Skip to content

Commit

Permalink
Add enable_monitoring flag in the module (#39)
Browse files Browse the repository at this point in the history
Add the ability to enable/disable detailed monitoring. This defaults to `true` for backwards-compatibility.
  • Loading branch information
glg-satish-tripathi authored Mar 31, 2023
1 parent 136e045 commit f7908e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .spacelift/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: 1
module_version: 1.3.0

module_version: 1.4.0
tests:
- name: AMD64-based workerpool
project_root: examples/amd64
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ $ make docs
| <a name="input_disable_container_credentials"></a> [disable\_container\_credentials](#input\_disable\_container\_credentials) | If true, the run container will not be able to access the instance profile<br> credentials by talking to the EC2 metadata endpoint. This is done by setting<br> the number of hops in IMDSv2 to 1. Since the Docker container goes through an<br> extra NAT step, this still allows the launcher to talk to the endpoint, but<br> prevents the container from doing so. | `bool` | `false` | no |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | Top-level domain name to use for pulling the launcher binary | `string` | `"spacelift.io"` | no |
| <a name="input_ec2_instance_type"></a> [ec2\_instance\_type](#input\_ec2\_instance\_type) | EC2 instance type for the workers. If an arm64-based AMI is used, this must be an arm64-based instance type. | `string` | `"t3.micro"` | no |
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Enables/disables detailed monitoring | `bool` | `true` | no |
| <a name="input_enabled_metrics"></a> [enabled\_metrics](#input\_enabled\_metrics) | List of CloudWatch metrics enabled on the ASG | `list(string)` | <pre>[<br> "GroupDesiredCapacity",<br> "GroupInServiceInstances",<br> "GroupMaxSize",<br> "GroupMinSize",<br> "GroupPendingInstances",<br> "GroupStandbyInstances",<br> "GroupTerminatingInstances",<br> "GroupTotalInstances"<br>]</pre> | no |
| <a name="input_iam_role_arn"></a> [iam\_role\_arn](#input\_iam\_role\_arn) | ARN of an existing IAM to use. Used `when create_iam_role` = `false` | `string` | `null` | no |
| <a name="input_max_size"></a> [max\_size](#input\_max\_size) | Maximum number of workers to spin up | `number` | `10` | no |
Expand Down
1 change: 1 addition & 0 deletions asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ module "asg" {
image_id = var.ami_id != "" ? var.ami_id : data.aws_ami.this.id
instance_type = var.ec2_instance_type
security_groups = var.security_groups
enable_monitoring = var.enable_monitoring

block_device_mappings = [
{
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ variable "worker_pool_id" {
description = "ID of the the worker pool. It is used for the naming convention of the resources."
}

variable "enable_monitoring" {
description = "Enables/disables detailed monitoring"
type = bool
default = true
}

locals {
namespace = "sp5ft-${var.worker_pool_id}"
}

0 comments on commit f7908e3

Please sign in to comment.