Skip to content

equinor/terraform-azurerm-sql

Repository files navigation

Azure SQL Terraform Module

SCM Compliance Equinor Terraform Baseline Conventional Commits

Terraform module which creates Azure SQL resources.

Features

  • Microsoft Entra administrator enforced.
  • Microsoft Entra-only authentication enabled by default.
  • Audit logs sent to given Log Analytics workspace by default.
  • Vulnerability assessments stored in given Storage account.

Prerequisites

  • Azure role Contributor at the resource group scope.
  • Azure role Role Based Access Control Administrator at the Storage account scope.

Development

  1. Read this document.

  2. Clone this repository.

  3. Configure Terraform variables in a file .devcontainer/devcontainer.env:

    TF_VAR_resource_group_name=
    TF_VAR_location=
  4. Open repository in dev container.

Testing

  1. Change to the test directory:

    cd test
  2. Login to Azure:

    az login
  3. Set active subscription:

    az account set -s <SUBSCRIPTION_NAME_OR_ID>
  4. Run tests:

    go test -timeout 60m

Contributing

See Contributing guidelines.