Code Monkey home page Code Monkey logo

terraform-azurerm-vnet's Introduction

Azure Virtual Network

Changelog Notice Apache V2 License TF Registry

Common Azure module to generate an Azure virtual network.

Global versioning rule for Claranet Azure modules

Module version Terraform version AzureRM version
>= 7.x.x 1.3.x >= 3.0
>= 6.x.x 1.x >= 3.0
>= 5.x.x 0.15.x >= 2.0
>= 4.x.x 0.13.x / 0.14.x >= 2.0
>= 3.x.x 0.12.x >= 2.0
>= 2.x.x 0.12.x < 2.0
< 2.x.x 0.11.x < 2.0

Contributing

If you want to contribute to this repository, feel free to use our pre-commit git hook configuration which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices.

More details are available in the CONTRIBUTING.md file.

Usage

This module is optimized to work with the Claranet terraform-wrapper tool which set some terraform variables in the environment needed by this module. More details about variables set by the terraform-wrapper available in the documentation.

module "azure_region" {
  source  = "claranet/regions/azurerm"
  version = "x.x.x"

  azure_region = var.azure_region
}

module "rg" {
  source  = "claranet/rg/azurerm"
  version = "x.x.x"

  location    = module.azure_region.location
  client_name = var.client_name
  environment = var.environment
  stack       = var.stack
}

module "azure_virtual_network" {
  source  = "claranet/vnet/azurerm"
  version = "x.x.x"

  environment    = var.environment
  location       = module.azure_region.location
  location_short = module.azure_region.location_short
  client_name    = var.client_name
  stack          = var.stack

  resource_group_name = module.rg.resource_group_name

  vnet_cidr   = ["10.10.0.0/16"]
  dns_servers = ["10.0.0.4", "10.0.0.5"] # Can be empty if not used
}

Providers

Name Version
azurecaf ~> 1.2, >= 1.2.22
azurerm ~> 3.0

Modules

No modules.

Resources

Name Type
azurerm_virtual_network.main_vnet resource
azurecaf_name.vnet data source

Inputs

Name Description Type Default Required
client_name Client name/account used in naming string n/a yes
custom_vnet_name Optional custom virtual network name string "" no
default_tags_enabled Option to enable or disable default tags bool true no
dns_servers List of IP addresses of DNS servers list(string) [] no
environment Project environment string n/a yes
extra_tags Extra tags to add map(string) {} no
location Azure region to use string n/a yes
location_short Short string for Azure location. string n/a yes
name_prefix Optional prefix for the generated name string "" no
name_suffix Optional suffix for the generated name string "" no
resource_group_name Resource group name string n/a yes
stack Project stack name string n/a yes
use_caf_naming Use the Azure CAF naming provider to generate default resource name. custom_vnet_name override this if set. Legacy default name is used if this is set to false. bool true no
vnet_cidr The address space that is used by the virtual network list(string) n/a yes

Outputs

Name Description
virtual_network_id Virtual network generated id
virtual_network_location Virtual network location
virtual_network_name Virtual network name
virtual_network_space Virtual network space

Related documentation

Microsoft Azure documentation: docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-overview

terraform-azurerm-vnet's People

Contributors

bd-clara avatar bzspi avatar rossifumax avatar semantic-release-bot avatar shr3ps avatar zfiel avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.