Skip to content

Instantly share code, notes, and snippets.

@ritasker
Created August 23, 2016 11:19
Show Gist options
  • Save ritasker/4a700396cd5fb8d8a2f523fd5269d5c7 to your computer and use it in GitHub Desktop.
Save ritasker/4a700396cd5fb8d8a2f523fd5269d5c7 to your computer and use it in GitHub Desktop.
Terraform Files
# Create a resource group
resource "azurerm_resource_group" "eg-resource-group" {
name = "EventGeniusApi"
location = "${var.location}"
}
# Create SQL Server
resource "azurerm_sql_server" "eg-sql-server" {
name = "eg-sql-sandbox"
resource_group_name = "${azurerm_resource_group.eg-resource-group.name}"
location = "${var.location}"
version = "12.0"
administrator_login = "${var.sql_username}"
administrator_login_password = "${var.sql_password}"
}
# Create Search
resource "azurerm_search_service" "eg-search" {
name = "eg-search-sandbox"
resource_group_name = "${azurerm_resource_group.eg-resource-group.name}"
location = "${var.location}"
sku = "standard"
}
# Azure Subscription Credentials
subscription_id = "redacted"
client_id = "redacted"
client_secret = "redacted"
tenant_id = "redacted"
location = "North Europe"
sql_username = "richierich"
sql_password = "qwerty123$%^"
# Azure Subscription Credentials
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
# Environment
variable "location" {}
# SQL Credentials
variable "sql_username" {}
variable "sql_password" {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment