File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
quickstart/201-vmss-packer-jumpbox Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,21 @@ provider "azurerm" {
1414resource "azurerm_resource_group" "vmss" {
1515 name = var. resource_group_name
1616 location = var. location
17-
1817 tags = var. tags
1918}
2019
20+ resource "random_string" "fqdn" {
21+ length = 6
22+ special = false
23+ upper = false
24+ number = false
25+ }
26+
2127resource "azurerm_virtual_network" "vmss" {
2228 name = " vmss-vnet"
2329 address_space = [" 10.0.0.0/16" ]
2430 location = var. location
2531 resource_group_name = azurerm_resource_group. vmss . name
26-
2732 tags = var. tags
2833}
2934
@@ -39,7 +44,7 @@ resource "azurerm_public_ip" "vmss" {
3944 location = var. location
4045 resource_group_name = azurerm_resource_group. vmss . name
4146 allocation_method = " Static"
42-
47+ domain_name_label = random_string . fqdn . result
4348 tags = var. tags
4449}
4550
@@ -154,7 +159,7 @@ resource "azurerm_public_ip" "jumpbox" {
154159 location = var. location
155160 resource_group_name = azurerm_resource_group. vmss . name
156161 allocation_method = " Static"
157-
162+ domain_name_label = " ${ random_string . fqdn . result } -ssh "
158163 tags = var. tags
159164}
160165
You can’t perform that action at this time.
0 commit comments