infra/load-testing: format terraform config files

This commit is contained in:
Miya Chen 2017-10-03 17:19:32 +08:00
parent 30502d963d
commit e3db195507
2 changed files with 9 additions and 4 deletions

View File

@ -16,7 +16,7 @@ resource "random_id" "namer" {
}
variable "username" {
type = "string"
type = "string"
default = "amis"
}
@ -67,8 +67,9 @@ resource "azurerm_container_service" "test" {
resource "null_resource" "kubeconfig" {
provisioner "local-exec" {
command = "sleep 10 && scp -o StrictHostKeyChecking=no ${var.username}@istanbul-${random_id.namer.hex}.${azurerm_resource_group.test.location}.cloudapp.azure.com:~/.kube/config ~/.kube/config"
command = "scp -o StrictHostKeyChecking=no ${var.username}@istanbul-${random_id.namer.hex}.${azurerm_resource_group.test.location}.cloudapp.azure.com:~/.kube/config ~/.kube/config"
interpreter = ["bash", "-c"]
}
depends_on = ["azurerm_container_service.test"]
}

View File

@ -7,9 +7,11 @@ resource "kubernetes_service" "validator-svc" {
selector {
app = "validator-${count.index}"
}
type = "LoadBalancer"
port {
port = 8546
port = 8546
target_port = 8546
}
@ -17,4 +19,6 @@ resource "kubernetes_service" "validator-svc" {
}
count = "${length(var.svcs)}"
}
depends_on = ["null_resource.kubeconfig"]
}