Skip to content

reg1-shared-infra Documentation

This documentation provides an overview of the folder structure and the purpose of the files in the reg1-shared-infra repository. This Terraform configuration manages shared infrastructure components for Azure resources.

Folder Structure

reg1-shared-infra/
├── data.tf                # Data sources configuration in Terraform
├── outputs.tf             # Output values from Terraform execution
├── locals.tf              # Local values and variables
├── versions.tf            # Specifies Terraform and provider versions
├── tfvars/                # Directory for variable definition files
├── values/                # Directory holding configuration values or templates
├── acr.tf                 # Azure Container Registry (ACR) configuration
├── .github/               # GitHub workflows for CI/CD
├── variables.tf           # Terraform variables declaration
├── modules/               # Reusable Terraform modules for modular infrastructure

Key Files

data.tf

This file contains the configuration for data sources. Data sources allow Terraform to reference existing resources and pull information about them. This can include fetching information about existing infrastructure such as networks, resource groups, or specific resources in Azure.

outputs.tf

The outputs.tf file specifies the values that are returned after the execution of a Terraform configuration. These outputs are often used for integration with other configurations or for reference purposes.

locals.tf

In this file, local variables are defined. These variables help simplify the Terraform configuration by allowing the reuse of values and expressions.

versions.tf

The versions.tf file is used to specify the required versions of Terraform and the providers. It ensures that the right versions are used to prevent incompatibility issues.

aks-cluster.tf

This file manages the configuration of the Azure Kubernetes Service (AKS), specifying the infrastructure needed to deploy, scale, and manage containerized applications using Kubernetes on Azure.

acr.tf

This file configures the Azure Container Registry (ACR), which is used to store and manage container images for the AKS cluster.

variables.tf

All variables used in the Terraform configuration are declared in this file. It defines the input variables for the infrastructure setup.

tfvars/

This folder likely contains .tfvars files, which are used to pass different sets of variable values for different environments, such as development, staging, or production.

modules/

This directory contains reusable modules that can be referenced in the main configuration files. Modules make it easier to manage and scale Terraform configurations by encapsulating related resources and logic.

How to Use

  • Ensure that the correct versions of Terraform and the necessary providers are installed as specified in the versions.tf.
  • Configure the tfvars/ files with appropriate values for different environments.

VNET Peering to AKS, VPN, AVD and services vnet