This Terraform module deploys a Route Table in Azure with a route or a set of routes passed in as input parameters. The routes are newly created with explicit next hop specified as input parameters.
Перейти к файлу
microsoft-github-policy-service[bot] 824733e321
Auto merge mandatory file pr
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
2023-05-31 18:47:54 +00:00
test Formatted the Terraform code 2018-08-21 21:51:11 +00:00
.gitignore Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
.travis.yml Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
Dockerfile Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
Gemfile Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
Gopkg.lock Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
Gopkg.toml Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
LICENSE Initial commit 2018-08-21 14:31:39 -07:00
README.md Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
Rakefile Initial commit with Complete module and Terratest added 2018-08-21 21:43:32 +00:00
SECURITY.md Microsoft mandatory file 2023-01-24 16:34:04 +00:00
main.tf Formatted the Terraform code 2018-08-21 21:51:11 +00:00
outputs.tf Formatted the Terraform code 2018-08-21 21:51:11 +00:00
variables.tf Formatted the Terraform code 2018-08-21 21:51:11 +00:00

README.md

terraform-azurerm-routetable

Build Status

Create a Routetable in Azure

This Terraform module deploys a Route Table in Azure with a route or a set of routes passed in as input parameters. The routes are newly created with explicit next hop specified as input parameters.

Usage


module "routetable" {
  source              = "Azure/routetable/azurerm"
  resource_group_name = "myapp"
  location            = "westus"
  route_prefixes      = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
  route_nexthop_types = ["VnetLocal", "VnetLocal", "VnetLocal"]
  route_names         = ["route1", "route2", "route3"]

  tags = {
    environment = "dev"
    costcenter  = "it"
  }
}

Test

Configurations

We provide 2 ways to build, run, and test the module on a local development machine. Native (Mac/Linux) or Docker.

Native (Mac/Linux)

Prerequisites

Environment setup

We provide simple script to quickly set up module development environment:

$ curl -sSL https://raw.githubusercontent.com/Azure/terramodtest/master/tool/env_setup.sh | sudo bash

Run test

Then simply run it in local shell:

$ cd $GOPATH/src/{directory_name}/
$ bundle install
$ rake build
$ rake e2e

Docker

We provide a Dockerfile to build a new image based FROM the microsoft/terraform-test Docker hub image which adds additional tools / packages specific for this module (see Custom Image section). Alternatively use only the microsoft/terraform-test Docker hub image by using these instructions.

Prerequisites

Custom Image

This builds the custom image:

$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-routetable .

This runs the build and unit tests:

$ docker run --rm azure-routetable /bin/bash -c "bundle install && rake build"

This runs the end to end tests:

$ docker run --rm azure-routetable /bin/bash -c "bundle install && rake e2e"

This runs the full tests:

$ docker run --rm azure-routetable /bin/bash -c "bundle install && rake full"

Authors

Originally created by Vaijanath Angadihiremath

License

MIT