Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zachreborn committed Nov 5, 2024
1 parent bb5e405 commit c8e96cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions modules/aws/vendor/velocloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module "aws_prod_sdwan" {
number = 1
public_subnet_ids = module.vpc.public_subnet_ids
private_subnet_ids = module.vpc.private_subnet_ids
velocloud_activation_key = "1234-5678-90AB-CDEF"
velocloud_activation_keys = ["1234-5678-90AB-CDEF"]
velocloud_orchestrator = "vco.example.com"
velocloud_ignore_cert_errors = true
velocloud_lan_cidr_blocks = ["0.0.0.0/0"]
Expand All @@ -99,7 +99,7 @@ module "aws_prod_sdwan" {
number = 1
public_subnet_ids = module.vpc.public_subnet_ids
private_subnet_ids = module.vpc.private_subnet_ids
velocloud_activation_key = "1234-5678-90AB-CDEF"
velocloud_activation_keys = ["1234-5678-90AB-CDEF"]
velocloud_orchestrator = "vco.example.com"
velocloud_ignore_cert_errors = true
velocloud_lan_cidr_blocks = ["0.0.0.0/0"]
Expand Down
16 changes: 8 additions & 8 deletions modules/aws/vendor/velocloud/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ resource "aws_security_group" "sdwan_wan_sg" {
############################################

resource "aws_eip" "wan_external_ip" {
count = var.number
count = var.quantity
domain = "vpc"
tags = merge(var.tags, ({ "Name" = format("%s%d_wan", var.instance_name_prefix, count.index + 1) }))
}

resource "aws_eip_association" "wan_external_ip" {
count = var.number
count = var.quantity
allocation_id = element(aws_eip.wan_external_ip[*].id, count.index)
network_interface_id = element(aws_network_interface.public_nic[*].id, count.index)
}
Expand All @@ -139,7 +139,7 @@ resource "aws_eip_association" "wan_external_ip" {

resource "aws_network_interface" "mgmt_nic" {
# Ge1 is the management interface in VeloCloud and attached at eth0
count = var.number
count = var.quantity
description = var.mgmt_nic_description
private_ips = var.mgmt_ips == null ? null : [element(var.mgmt_ips, count.index)]
security_groups = [aws_security_group.sdwan_mgmt_sg.id]
Expand All @@ -150,7 +150,7 @@ resource "aws_network_interface" "mgmt_nic" {

resource "aws_network_interface" "public_nic" {
# Ge2 is the public interface in VeloCloud and attached at eth1
count = var.number
count = var.quantity
description = var.public_nic_description
private_ips = var.public_ips == null ? null : [element(var.public_ips, count.index)]
security_groups = [aws_security_group.sdwan_wan_sg.id]
Expand All @@ -161,7 +161,7 @@ resource "aws_network_interface" "public_nic" {

resource "aws_network_interface" "private_nic" {
# Ge3 is the private interface in VeloCloud and attached at eth2
count = var.number
count = var.quantity
description = var.private_nic_description
private_ips = var.private_ips == null ? null : [element(var.private_ips, count.index)]
security_groups = [aws_security_group.velocloud_lan_sg.id]
Expand All @@ -176,7 +176,7 @@ resource "aws_network_interface" "private_nic" {

resource "aws_instance" "ec2_instance" {
ami = var.ami_id != null ? var.ami_id : data.aws_ami.velocloud.id
count = var.number
count = var.quantity
ebs_optimized = var.ebs_optimized
hibernation = var.hibernation
iam_instance_profile = var.iam_instance_profile
Expand Down Expand Up @@ -239,7 +239,7 @@ resource "aws_cloudwatch_metric_alarm" "instance" {
alarm_description = "EC2 instance StatusCheckFailed_Instance alarm"
alarm_name = format("%s-instance-alarm", element(aws_instance.ec2_instance[*].id, count.index))
comparison_operator = "GreaterThanOrEqualToThreshold"
count = var.number
count = var.quantity
datapoints_to_alarm = 2
dimensions = {
InstanceId = element(aws_instance.ec2_instance[*].id, count.index)
Expand All @@ -265,7 +265,7 @@ resource "aws_cloudwatch_metric_alarm" "system" {
alarm_description = "EC2 instance StatusCheckFailed_System alarm"
alarm_name = format("%s-system-alarm", element(aws_instance.ec2_instance[*].id, count.index))
comparison_operator = "GreaterThanOrEqualToThreshold"
count = var.number
count = var.quantity
datapoints_to_alarm = 2
dimensions = {
InstanceId = element(aws_instance.ec2_instance[*].id, count.index)
Expand Down
2 changes: 1 addition & 1 deletion modules/aws/vendor/velocloud/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ variable "tags" {
}
}

variable "number" {
variable "quantity" {
description = "(Optional) Quantity of resources to make with this module. Example: Setting this to 2 will create 2 of all the required resources. Default: 1"
type = number
default = 1
Expand Down

0 comments on commit c8e96cc

Please sign in to comment.