GithubHelp home page GithubHelp logo

shardulsonar / terraform-azurerm-regions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/terraform-azurerm-regions

0.0 0.0 0.0 58 KB

Terraform module that provides data about Azure regions. Data is sourced from Azure APIs.

Home Page: https://registry.terraform.io/modules/Azure/regions/azurerm

License: MIT License

Makefile 9.26% HCL 90.74%

terraform-azurerm-regions's Introduction

Azure Regions and Availability Zones module

This module provides an output of all Azure regions and availability zones.

The module outputs a list of objects with the following attributes:

  • name - The name of the region. E.g. "eastus"
  • display_name - The display name of the region. E.g. "East US".
  • paired_region_name - The name of the region paired with this region. May be null if the region has no pair.
  • geography - The geography of the region.
  • geography_group - The geography group of the region.
  • zones - A list of the availability zones in the region. Will be empty if the region does not support zones.

This data is the further composed into useful maps keyed by region name and region display name.

Usage

module "regions" {
  source = "Azure/regions/azurerm"
  version = "<version>" # change this to your desired version, https://www.terraform.io/language/expressions/version-constraints
}

output "regions" {
  value = module.regions.regions
}

Credits

Belatedly adding this, waaaay overdue...

This module was created after a cool chat with @markti whilst we were at Hashiconf 2023. Thanks Mark!

Requirements

The following requirements are needed by this module:

Providers

The following providers are used by this module:

Resources

The following resources are used by this module:

Required Inputs

No required inputs.

Optional Inputs

The following input variables are optional (have default values):

Description: If true, the module will only return regions that are have the category set to Recommended by the locations API.

Type: bool

Default: true

Description: If true, the module will use cached data from the data directory. If false, the module will use live data from the Azure API.

The default is true to avoid unnecessary API calls and provide a guaranteed consistent output.
Set to false to ensure the latest data is used.

Using data from the Azure APIs means that if the API response changes, then the module output will change.
This may affect deployed resources that rely on this data.

Type: bool

Default: true

Outputs

The following outputs are exported:

Description: A list of region objects. Each region object contains the following attributes:

  • name - The name of the region.
  • display_name - The display name of the region.
  • paired_region_name - The name of the region paired with this region. May be null if the region has no pair.
  • geography - The geography of the region.
  • geography_group - The geography group of the region.
  • zones - A list of the availability zones in the region. Will be empty if the region does not support zones.

Description: A map of region display names to region objects. See regions output for more details.

Description: A map of geographies to a list of region objects. See regions output for more details.

Description: A map of geography groups to a list of region objects. See regions output for more details.

Description: A map of region display names to region objects. See regions output for more details.

Description: A map of regions by either display names or name, to region objects. See regions output for more details.

Modules

No modules.

terraform-azurerm-regions's People

Contributors

matt-ffffff avatar actions-user avatar cae-pr-creator[bot] avatar microsoft-github-policy-service[bot] 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.