infra/load-testing: format terraform config files
This commit is contained in:
parent
30502d963d
commit
e3db195507
|
@ -16,7 +16,7 @@ resource "random_id" "namer" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "username" {
|
variable "username" {
|
||||||
type = "string"
|
type = "string"
|
||||||
default = "amis"
|
default = "amis"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +67,9 @@ resource "azurerm_container_service" "test" {
|
||||||
|
|
||||||
resource "null_resource" "kubeconfig" {
|
resource "null_resource" "kubeconfig" {
|
||||||
provisioner "local-exec" {
|
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"]
|
interpreter = ["bash", "-c"]
|
||||||
}
|
}
|
||||||
|
|
||||||
depends_on = ["azurerm_container_service.test"]
|
depends_on = ["azurerm_container_service.test"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,11 @@ resource "kubernetes_service" "validator-svc" {
|
||||||
selector {
|
selector {
|
||||||
app = "validator-${count.index}"
|
app = "validator-${count.index}"
|
||||||
}
|
}
|
||||||
|
|
||||||
type = "LoadBalancer"
|
type = "LoadBalancer"
|
||||||
|
|
||||||
port {
|
port {
|
||||||
port = 8546
|
port = 8546
|
||||||
target_port = 8546
|
target_port = 8546
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,4 +19,6 @@ resource "kubernetes_service" "validator-svc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
count = "${length(var.svcs)}"
|
count = "${length(var.svcs)}"
|
||||||
|
|
||||||
|
depends_on = ["null_resource.kubeconfig"]
|
||||||
}
|
}
|
Loading…
Reference in New Issue