Skip to content
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 main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ resource "aws_instance" "default" {
#bridgecrew:skip=BC_AWS_GENERAL_31: Skipping `Ensure Instance Metadata Service Version 1 is not enabled` check until BridgeCrew support condition evaluation. See https://github.com/bridgecrewio/checkov/issues/793
count = module.this.enabled ? 1 : 0
ami = coalesce(var.ami, join("", data.aws_ami.default[*].id))
availability_zone = length(var.availability_zone) > 0 ? var.availability_zone : null
instance_type = var.instance_type
user_data = length(var.user_data_base64) > 0 ? var.user_data_base64 : local.user_data_templated
vpc_security_group_ids = compact(concat(module.security_group[*].id, var.security_groups))
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ variable "subnets" {
description = "AWS subnet IDs"
}

variable "availability_zone" {
type = string
description = "(Optional) AZ to start the instance in"
}

variable "user_data" {
type = list(string)
default = []
Expand Down