From 3a170dd3d1e300ebda416e7334c5c369071c8c25 Mon Sep 17 00:00:00 2001 From: waruwat-dev <42961261+waruwat-dev@users.noreply.github.com> Date: Wed, 10 Aug 2022 20:01:53 +0700 Subject: [PATCH] (feat) support disable ec2-monitoring (#3) Co-authored-by: waruwat --- CHANGELOG.md | 9 +++++++++ README.md | 19 ++++++++++++------- launch-template.tf | 1 + variables.tf | 6 ++++++ 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81457d4..f6fb26c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this module will be documented in this file. +## [1.1.1] - 2022-08-10 + +Here we would have the update steps for 1.1.1 for people to follow. + +### Added + +- new variables (Optional) + - `enable_ec2_monitoring` + ## [1.1.0] - 2022-07-27 Here we would have the update steps for 1.1.0 for people to follow. diff --git a/README.md b/README.md index 0406fa4..c42dfb3 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ mongorestore /efs/dump | Name | Source | Version | |------|--------|---------| -| [efs](#module\_efs) | git::ssh://git@github.com/oozou/terraform-aws-efs.git | feat/support-ip-mount | +| [efs](#module\_efs) | git::ssh://git@github.com/oozou/terraform-aws-efs.git | v1.0.1 | | [launch\_template](#module\_launch\_template) | git::ssh://git@github.com/oozou/terraform-aws-launch-template.git | v1.0.2 | ## Resources @@ -216,6 +216,9 @@ mongorestore /efs/dump | [additional\_sg\_attacment\_ids](#input\_additional\_sg\_attacment\_ids) | (Optional) The ID of the security group. | `list(string)` | `[]` | no | | [ami](#input\_ami) | (Optional) AMI to use for the instance. Required unless launch\_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template | `string` | `""` | no | | [custom\_https\_allow\_cidr](#input\_custom\_https\_allow\_cidr) | cidr block for config pritunl vpn | `list(string)` | `null` | no | +| [efs\_backup\_policy\_enabled](#input\_efs\_backup\_policy\_enabled) | If `true`, it will turn on automatic backups. | `bool` | `true` | no | +| [enable\_ec2\_monitoring](#input\_enable\_ec2\_monitoring) | Enables/disables detailed monitoring | `bool` | `false` | no | +| [enabled\_backup](#input\_enabled\_backup) | Enable Backup EFS | `bool` | `true` | no | | [environment](#input\_environment) | Environment Variable used as a prefix | `string` | n/a | yes | | [instance\_type](#input\_instance\_type) | (Optional) The instance type to use for the instance. Updates to this field will trigger a stop/start of the EC2 instance. | `string` | `"t2.medium"` | no | | [is\_create\_route53\_reccord](#input\_is\_create\_route53\_reccord) | if true will create route53 reccord for vpn, vpn console | `bool` | `false` | no | @@ -224,13 +227,13 @@ mongorestore /efs/dump | [key\_name](#input\_key\_name) | Key name of the Key Pair to use for the vpn instance; which can be managed using | `string` | `null` | no | | [prefix](#input\_prefix) | The prefix name of customer to be displayed in AWS console and resource | `string` | n/a | yes | | [private\_lb\_vpn\_domain](#input\_private\_lb\_vpn\_domain) | domain of vpn console output will be . | `string` | `"vpn-console"` | no | -| [private\_rule](#input\_private\_rule) | private rule for run connect vpn |
list(object({
port = number
protocol = string
}))
| `[]` | no | -| [private\_subnet\_ids](#input\_private\_subnet\_ids) | The List of the private subnet ID to deploy private lb for vpn relate to VPC | `list(string)` | n/a | yes | +| [private\_rule](#input\_private\_rule) | private rule for run connect vpn |
list(object({
port = number
protocol = string
health_check_port = number
health_check_protocol = string
}))
| `[]` | no | +| [private\_subnet\_ids](#input\_private\_subnet\_ids) | The List of the private subnet ID to deploy instance and private lb for vpn relate to VPC | `list(string)` | n/a | yes | | [public\_lb\_vpn\_domain](#input\_public\_lb\_vpn\_domain) | domain of vpn output will be . | `string` | `"vpn"` | no | -| [public\_rule](#input\_public\_rule) | public rule for run connect vpn |
list(object({
port = number
protocol = string
}))
|
[
{
"port": 12383,
"protocol": "UDP"
}
]
| no | -| [public\_subnet\_ids](#input\_public\_subnet\_ids) | The List of the subnet ID to deploy vpn relate to VPC | `list(string)` | n/a | yes | +| [public\_rule](#input\_public\_rule) | public rule for run connect vpn |
list(object({
port = number
protocol = string
health_check_port = number
health_check_protocol = string
}))
|
[
{
"health_check_port": 443,
"health_check_protocol": "TCP",
"port": 12383,
"protocol": "UDP"
}
]
| no | +| [public\_subnet\_ids](#input\_public\_subnet\_ids) | The List of the subnet ID to deploy Public Loadbalancer relate to VPC | `list(string)` | n/a | yes | | [route53\_zone\_name](#input\_route53\_zone\_name) | This is the name of the hosted zone | `string` | `""` | no | -| [security\_group\_ingress\_rules](#input\_security\_group\_ingress\_rules) | Map of ingress and any specific/overriding attributes to be created | `any` |
{
"allow_to_config_vpn": {
"cidr_blocks": [
"0.0.0.0/0"
],
"port": "443"
},
"allow_to_connect_vpn": {
"cidr_blocks": [
"0.0.0.0/0"
],
"port": "12383",
"protocol": "udp"
},
"allow_to_ssh": {
"cidr_blocks": [
"0.0.0.0/0"
],
"port": "22"
}
}
| no | +| [security\_group\_ingress\_rules](#input\_security\_group\_ingress\_rules) | Map of ingress and any specific/overriding attributes to be created | `any` |
{
"allow_to_connect_vpn": {
"cidr_blocks": [
"0.0.0.0/0"
],
"port": "12383",
"protocol": "udp"
}
}
| no | | [tags](#input\_tags) | Tags to add more; default tags contian {terraform=true, environment=var.environment} | `map(string)` | `{}` | no | | [vpc\_id](#input\_vpc\_id) | The ID of the VPC | `string` | n/a | yes | @@ -238,8 +241,10 @@ mongorestore /efs/dump | Name | Description | |------|-------------| -| [dns\_name](#output\_dns\_name) | The DNS name for the filesystem | +| [efs\_dns\_name](#output\_efs\_dns\_name) | The DNS name for the filesystem | | [efs\_id](#output\_efs\_id) | The ID that identifies the file system for pritunl vpn | | [lb\_private\_dns](#output\_lb\_private\_dns) | The DNS name of the private load balancer. | | [lb\_public\_dns](#output\_lb\_public\_dns) | The DNS name of the public load balancer. | +| [vpn\_private\_dns](#output\_vpn\_private\_dns) | private dns for connect vpn server | +| [vpn\_public\_dns](#output\_vpn\_public\_dns) | public dns for connect vpn server | diff --git a/launch-template.tf b/launch-template.tf index 555a70b..391269d 100644 --- a/launch-template.tf +++ b/launch-template.tf @@ -13,5 +13,6 @@ module "launch_template" { key_name = var.key_name instance_type = var.instance_type vpc_security_group_ids = local.security_group_ids + enable_monitoring = var.enable_ec2_monitoring tags = local.tags } diff --git a/variables.tf b/variables.tf index c8f0c96..469fd24 100644 --- a/variables.tf +++ b/variables.tf @@ -147,3 +147,9 @@ variable "efs_backup_policy_enabled" { description = "If `true`, it will turn on automatic backups." default = true } + +variable "enable_ec2_monitoring" { + description = "Enables/disables detailed monitoring" + type = bool + default = false +}