Last active
November 10, 2017 03:42
-
-
Save lenadroid/2bc595f974d6b58c11f906dcf22e0e8d to your computer and use it in GitHub Desktop.
ACS Kubernetes Terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "azurerm_resource_group" "KubeTerraform" { | |
name = "${var.rg_name}" | |
location = "East US" | |
} | |
resource "azurerm_container_service" "KubeTerraform" { | |
name = "${var.kube_cluster_name}" | |
location = "${azurerm_resource_group.KubeTerraform.location}" | |
resource_group_name = "${azurerm_resource_group.KubeTerraform.name}" | |
orchestration_platform = "Kubernetes" | |
master_profile { | |
count = 1 | |
dns_prefix = "${var.custom_dns_prefix_agent}" | |
} | |
linux_profile { | |
admin_username = "azureuser" | |
ssh_key { | |
key_data = "${var.ssh_key_data}" | |
} | |
} | |
agent_pool_profile { | |
name = "default" | |
count = 3 | |
dns_prefix = "${var.custom_dns_prefix_agent}" | |
vm_size = "Standard_D2_v2" | |
} | |
service_principal { | |
client_id = "${var.service_principal_id}" | |
client_secret = "${var.service_principal_password}" | |
} | |
diagnostics_profile { | |
enabled = false | |
} | |
tags { | |
Environment = "Production" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service_principal_id="<your value>" | |
service_principal_password="<your value>" | |
ssh_key_data="<your value>" | |
custom_dns_prefix_agent="<your value>" | |
custom_dns_prefix_master="<your value>" | |
rg_name="<your value>" | |
kube_cluster_name="<your value>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// General Variables | |
variable "service_principal_id" { | |
type = "string" | |
} | |
variable "service_principal_password" { | |
type = "string" | |
} | |
variable "ssh_key_data" { | |
type = "string" | |
} | |
variable "custom_dns_prefix_agent" { | |
type = "string" | |
} | |
variable "custom_dns_prefix_master" { | |
type = "string" | |
} | |
variable "rg_name" { | |
type = "string" | |
} | |
variable "kube_cluster_name" { | |
type = "string" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment