Skip to content

Terraform setup to validate the private connection between an Azure VM and a Blob Storage account. It provisions a virtual network, subnet, and storage account with a service endpoint, disables public access, and tests connectivity using CURL and nslookup.

License

Notifications You must be signed in to change notification settings

kolosovpetro/AzureServiceEndpoint

Repository files navigation

Azure Service Endpoint

Terraform setup to validate the private connection between an Azure VM and a Blob Storage account. It provisions a virtual network, subnet, and storage account with a service endpoint, disables public access, and tests connectivity using CURL and nslookup.

Validation

  • nslookup storageacctsvcendpt.blob.core.windows.net
  • Nslookup output Alt

Terraform Init

  • Create and configure Azure Storage Account for Terraform state
  • Create azure.sas.conf file with the following content:
    storage_account_name = "storage_account_name"
    container_name       = "container_name"
    key                  = "terraform.tfstate"
    sas_token            = "sas_token"
  • terraform init -backend-config="azure.sas.conf" -reconfigure -upgrade

Module referencing

Pre-commit configuration

  • Install python3 via Windows Store
  • pip install --upgrade pip
  • pip install pre-commit
  • Update PATH variable
  • pre-commit install

Install terraform docs

  • choco install terraform-docs

Install tflint

  • choco install tflint

Documentation

Storage account configuration file

storage_account_name = "storage_account_name"
container_name       = "container_name"
key                  = "terraform.tfstate"
sas_token            = "sas_token"

Deploy storage account for terraform state

About

Terraform setup to validate the private connection between an Azure VM and a Blob Storage account. It provisions a virtual network, subnet, and storage account with a service endpoint, disables public access, and tests connectivity using CURL and nslookup.

Topics

Resources

License

Stars

Watchers

Forks