Skip to content

Instantly share code, notes, and snippets.

@zembutsu
Created March 16, 2016 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zembutsu/56a7745492fa1462dcc0 to your computer and use it in GitHub Desktop.
Save zembutsu/56a7745492fa1462dcc0 to your computer and use it in GitHub Desktop.
azure sample
provider "azure" {
publish_settings = "${file("credentials.publishsettings")}"
}
resource "azure_hosted_service" "terraform-service" {
name = "zem03-01a"
location = "Japan East"
ephemeral_contents = false
description = "Hosted service created by Terraform."
label = "tf-hs-01"
}
resource "azure_instance" "web" {
name = "terraform-test"
hosted_service_name = "${azure_hosted_service.terraform-service.name}"
image = "Ubuntu Server 14.04 LTS"
size = "Basic_A1"
storage_service_name = "zem0301a"
location = "Japan East"
username = "terraform"
password = "Pass!admin123"
# domain_name = "contoso.com"
# domain_ou = "OU=Servers,DC=contoso.com,DC=Contoso,DC=com"
# domain_username = "Administrator"
# domain_password = "Pa$$word123"
endpoint {
name = "SSH"
protocol = "tcp"
public_port = 22
private_port = 22
}
}
resource "azure_storage_service" "tfstor" {
name = "zem0301a"
location = "Japan East"
description = "Made by Terraform."
account_type = "Standard_LRS"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment