<- All Blueprints
Customizable templates for deploying cloud infrastructure

Azure SQL Database

This blueprint creates an Azure SQL Database with best practices in mind, such as defaulting to the 'Basic' edition and service objective for cost-effectiveness, setting a standard collation, and encouraging the use of tags for better resource identification and management. It allows customization of advanced settings like collation and maximum size, organizing variables into logical groups to assist users—including those who may not be cloud infrastructure experts—in configuring essential and advanced settings easily.

Define and customize Blueprints to set what infrastructure configuration options are available to developers.

---
constants:
  __name: "{{ name }}_{{ __guid }}"
variables:
  name:
    desc: "Name of the SQL Database."
    required: true
    group: SQL Database Details
  resource_group_name:
    desc: "Name of the Resource Group."
    required: true
    group: SQL Database Details
    links_to: resource.azurerm_resource_group.name
  server_name:
    desc: "Name of the SQL Server."
    required: true
    group: SQL Server
    links_to: resource.azurerm_sql_server.name
  location:
    desc: "Azure region where the SQL Database will be created."
    required: true
    group: SQL Database Details
    default: "eastus"
  edition:
    desc: "The edition of the SQL Database."
    required: false
    group: Performance
    default: "Basic"
  requested_service_objective_name:
    desc: "The service objective for the SQL Database."
    required: false
    group: Performance
    default: "Basic"
  collation:
    desc: "The collation of the SQL Database."
    required: false
    group: Advanced
    default: "SQL_Latin1_General_CP1_CI_AS"
    advanced: true
  max_size_gb:
    desc: "Maximum size of the SQL Database in GB."
    required: false
    group: Advanced
    default: 2
    advanced: true
  tags:
    group: Tags
    required: false
groups:
  SQL Database Details:
    order: 1
    desc: "Basic settings for the SQL Database."
  SQL Server:
    order: 2
    desc: "Specify the SQL Server to host the Database."
  Performance:
    order: 3
    desc: "Performance settings for the SQL Database."
  Advanced:
    order: 4
    desc: "Advanced settings for the SQL Database."
  Tags:
    order: 5
    desc: "Tags to assign to the SQL Database."
---

resource "azurerm_sql_database" "__name" {
  name                               = {{ name }}
  resource_group_name                = {{ resource_group_name }}
  location                           = {{ location }}
  server_name                        = {{ server_name }}
  edition                            = {{ edition }}
  requested_service_objective_name   = {{ requested_service_objective_name }}
  collation                          = {{ collation | required: false | advanced: true }}
  max_size_gb                        = {{ max_size_gb | required: false | advanced: true }}

  tags = {
    Name = {{ name }}
    {{# tags }}
      {{ tags.key | required: false }} = {{ tags.value | required: false }}
    {{/ tags }}
  }
}

// Defaults to 'Basic' edition for cost-effectiveness.
// Allows customization of advanced settings like collation and max size.
// Encourages tagging for resource identification and management.
//
A form is created automatically that accepts inputs that you defined in the Blueprint.
After filling out the Blueprint form, Terraform is generated and a PR is automatically submitted.
What am I looking at?

Talk to a Human

See Resourcely in action and learn how it can help you secure and manage your cloud infrastructure today!