mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
terraform: fix syntax in Azure example due to deprecated tf resource arguments (#17497)
This commit is contained in:
@@ -38,7 +38,7 @@ resource "azurerm_subnet" "hashistack-sn" {
|
||||
name = "hashistack-sn"
|
||||
resource_group_name = "${azurerm_resource_group.hashistack.name}"
|
||||
virtual_network_name = "${azurerm_virtual_network.hashistack-vn.name}"
|
||||
address_prefix = "10.0.2.0/24"
|
||||
address_prefixes = ["10.0.2.0/24"]
|
||||
}
|
||||
|
||||
resource "azurerm_network_security_group" "hashistack-sg" {
|
||||
@@ -100,7 +100,7 @@ resource "azurerm_public_ip" "hashistack-server-public-ip" {
|
||||
name = "hashistack-server-ip-${count.index}"
|
||||
location = "${var.location}"
|
||||
resource_group_name = "${azurerm_resource_group.hashistack.name}"
|
||||
public_ip_address_allocation = "static"
|
||||
allocation_method = "Static"
|
||||
}
|
||||
|
||||
resource "azurerm_network_interface" "hashistack-server-ni" {
|
||||
@@ -117,7 +117,7 @@ resource "azurerm_network_interface" "hashistack-server-ni" {
|
||||
public_ip_address_id = "${element(azurerm_public_ip.hashistack-server-public-ip.*.id, count.index)}"
|
||||
}
|
||||
|
||||
tags {
|
||||
tags = {
|
||||
ConsulAutoJoin = "auto-join"
|
||||
}
|
||||
}
|
||||
@@ -166,8 +166,7 @@ resource "azurerm_virtual_machine" "server" {
|
||||
|
||||
data "template_file" "user_data_server" {
|
||||
template = "${file("${path.root}/user-data-server.sh")}"
|
||||
|
||||
vars {
|
||||
vars = {
|
||||
server_count = "${var.server_count}"
|
||||
retry_join = "${var.retry_join}"
|
||||
}
|
||||
@@ -178,7 +177,7 @@ resource "azurerm_public_ip" "hashistack-client-public-ip" {
|
||||
name = "hashistack-client-ip-${count.index}"
|
||||
location = "${var.location}"
|
||||
resource_group_name = "${azurerm_resource_group.hashistack.name}"
|
||||
public_ip_address_allocation = "static"
|
||||
allocation_method = "Static"
|
||||
}
|
||||
|
||||
resource "azurerm_network_interface" "hashistack-client-ni" {
|
||||
@@ -195,7 +194,7 @@ resource "azurerm_network_interface" "hashistack-client-ni" {
|
||||
public_ip_address_id = "${element(azurerm_public_ip.hashistack-client-public-ip.*.id, count.index)}"
|
||||
}
|
||||
|
||||
tags {
|
||||
tags = {
|
||||
ConsulAutoJoin = "auto-join"
|
||||
}
|
||||
}
|
||||
@@ -245,8 +244,7 @@ resource "azurerm_virtual_machine" "client" {
|
||||
|
||||
data "template_file" "user_data_client" {
|
||||
template = "${file("${path.root}/user-data-client.sh")}"
|
||||
|
||||
vars {
|
||||
vars = {
|
||||
retry_join = "${var.retry_join}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user