Skip to content

dodevops/terraform-azure-azuresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opinionated Azure SQL databases

Introduction

This module manages an Azure SQL database including its server and the needed firewall rule

Usage

Instantiate the module by calling it from Terraform like this:

module "azure-basics" {
  source  = "dodevops/azuresql/azure"
  version = "<version>"
}

Requirements

The following requirements are needed by this module:

  • terraform (>=1.0.0)

  • azurerm (>=3.0.0)

Providers

The following providers are used by this module:

  • azurerm (>=3.0.0)

Modules

No modules.

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

administrator_login_password

Description: Password for the SQL server administrator login

Type: string

location

Description: Azure location to use

Type: string

project

Description: Three letter project key

Type: string

resource_group

Description: Azure Resource Group to use

Type: string

sku_name

Description: Which SKU to use - see https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mssql_database#sku_name

Type: string

stage

Description: Stage for this ip

Type: string

Optional Inputs

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

enable_audit

Description: Enable audit of database access and usage

Type: bool

Default: true

public_access

Description: Whether or not public network access is allowed for this server

Type: bool

Default: false

sqlserver_version

Description: SQL server version to use

Type: string

Default: "12.0"

suffix

Description: suffix for special databases

Type: string

Default: ""

Outputs

The following outputs are exported:

azuresql_administrator_login

Description: n/a

azuresqldb

Description: n/a

azuresqldbsrv

Description: n/a

Development

Use the terraform module tools to check and generate the documentation by running

docker run -v "$PWD":/terraform ghcr.io/dodevops/terraform-module-tools:latest