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

feat(module/vmseries): adding ability to enable instance monitoring #77

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 modules/vmseries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ No modules.
| <a name="input_eip_domain"></a> [eip\_domain](#input\_eip\_domain) | Indicates if this EIP is for use in VPC | `string` | `"vpc"` | no |
| <a name="input_enable_imdsv2"></a> [enable\_imdsv2](#input\_enable\_imdsv2) | Whether to enable IMDSv2 on the EC2 instance.<br>Support for this feature has been added in VM-Series Plugin [3.0.0](https://docs.paloaltonetworks.com/plugins/vm-series-and-panorama-plugins-release-notes/vm-series-plugin/vm-series-plugin-30/vm-series-plugin-300#id126d0957-95d7-4b29-9147-fff20027986e), which in turn requires VM-Series version 10.2.0 at minimum. | `string` | `false` | no |
| <a name="input_enable_instance_termination_protection"></a> [enable\_instance\_termination\_protection](#input\_enable\_instance\_termination\_protection) | Whether to enable termination protection on the EC2 instance. | `bool` | `false` | no |
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. | `bool` | `false` | no |
| <a name="input_iam_instance_profile"></a> [iam\_instance\_profile](#input\_iam\_instance\_profile) | IAM instance profile. | `string` | `null` | no |
| <a name="input_include_deprecated_ami"></a> [include\_deprecated\_ami](#input\_include\_deprecated\_ami) | In certain scenarios, customers may deploy a VM-Series instance through the marketplace, <br>only to later discover that the ami has been deprecated, resulting in pipeline failures. <br>Setting the specified parameter to `true` will enable the continued use of deprecated AMIs, <br>mitigating this issue. | `bool` | `false` | no |
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | EC2 instance type. | `string` | `"m5.xlarge"` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/vmseries/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ resource "aws_instance" "this" {
disable_api_termination = var.enable_instance_termination_protection
ebs_optimized = true
instance_initiated_shutdown_behavior = "stop"
monitoring = false
monitoring = var.enable_monitoring

dynamic "metadata_options" {
for_each = var.enable_imdsv2 ? [1] : []
Expand Down
6 changes: 6 additions & 0 deletions modules/vmseries/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ variable "enable_instance_termination_protection" {
type = bool
}

variable "enable_monitoring" {
description = "(Optional) If true, the launched EC2 instance will have detailed monitoring enabled."
default = false
type = bool
}

variable "eip_domain" {
description = "Indicates if this EIP is for use in VPC"
default = "vpc"
Expand Down
Loading