Skip to content

Commit

Permalink
Modules: add VRRP subnet
Browse files Browse the repository at this point in the history
Add module to manage SelVPC VRRP subnets.
  • Loading branch information
ozerovandrei committed Jan 13, 2019
1 parent c85239e commit 92ff62c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/vrrp_subnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# VRRP Subnet

Terraform module for creating a single SelVPC V2 VRRP Subnet.

## Variables

* `vrrp_subnet_project_id` - Project of the SelVPC V2 VRRP Subnet.

* `vrrp_subnet_region` - Region of the SelVPC V2 VRRP Subnet.

* `vrrp_subnet_prefix_length` - Prefix length of the SelVPC V2 VRRP Subnet.

* `vrrp_subnet_ip_version` - IP version of the SelVPC V2 VRRP Subnet.

## Outputs

* `vrrp_subnet_id` - ID of the created SelVPC V2 VRRP Subnet.
7 changes: 7 additions & 0 deletions modules/vrrp_subnet/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "selvpc_resell_vrrp_subnet_v2" "vrrp_subnet_1" {
project_id = "${var.vrrp_subnet_project_id}"
master_region = "${var.vrrp_subnet_master_region}"
slave_region = "${var.vrrp_subnet_slave_region}"
prefix_length = "${var.vrrp_subnet_prefix_length}"
ip_version = "${var.vrrp_subnet_ip_version}"
}
3 changes: 3 additions & 0 deletions modules/vrrp_subnet/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "vrrp_subnet_id" {
value = "${selvpc_resell_vrrp_subnet_v2.vrrp_subnet_1.id}"
}
21 changes: 21 additions & 0 deletions modules/vrrp_subnet/vars.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
variable "vrrp_subnet_project_id" {
description = "Project of the SelVPC V2 VRRP Subnet"
}

variable "vrrp_subnet_master_region" {
description = "Master region of the SelVPC V2 VRRP Subnet"
}

variable "vrrp_subnet_slave_region" {
description = "Slave region of the SelVPC V2 VRRP Subnet"
}

variable "vrrp_subnet_prefix_length" {
description = "Prefix length of the SelVPC V2 VRRP Subnet"
default = 29
}

variable "vrrp_subnet_ip_version" {
description = "IP version of the SelVPC V2 VRRP Subnet"
default = "ipv4"
}

0 comments on commit 92ff62c

Please sign in to comment.