Assessment 2- Write a terraform file to create an azure express route circuit with 100 Mbps speed, All the code into one single terraform code file.

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

Prerequisite

  1. System ( Windows or Linux)
  2. Terraform setup file
  3. Azure CLI
  4. Access to Azure provider( Subscription)
  5. Git Bash / PowerShell
  6. Notepad ++ or any code Editor

Setup to execute the terraform code from git bash CLI. to create an azure express route circuit

  1. Run the command terraform init for initializing the provider, Prepare your working directory for other commands
  2. Run the command terraform validate to Check whether the configuration is valid
  3. Run the command terraform plan Show changes required by the current configuration
  4. Run the command terraform apply to Create or update infrastructure
# file name create-circute.tf
terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "3.12.0"
    }
#Provider module and azure Authendiction  
provider "azurerm" {
  # Configuration options
    features {}
  subscription_id = "54d18623-a88e-4b6e-bcfe-a772406993b0"
  client_id       = "7e757450-7239-4c36-88f8-6664f3e49a49"
  client_secret   = "yhJ8Q~T7ycWjr4PjQ2ZUkTKgLeKTQ82YYGdiscP9"
  tenant_id       = "bc0f52a6-5a6d-45f4-8842-36ab113a5eb5"
}
#creating new RG call rg-hub-network
resource "azurerm_resource_group" "er-circute" {
  name     = "rg-hub-network"
  location = "West Europe"
}

# code to create express route circuit
resource "azurerm_express_route_circuit" "er-circute" {
  name                  = "ct-dc-azure-west-eu"
  resource_group_name   = azurerm_resource_group.er-circute.name
  location              = azurerm_resource_group.er-circute.location
  service_provider_name = "Equinix"
  peering_location      = "Silicon Valley"
  bandwidth_in_mbps     = 100

  sku {
    tier   = "Standard"
    family = "MeteredData"
  }

  tags = {
    environment = "Production"
  }
}


Code language: PHP (php)
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x