This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 526
/
ipaddresses.go
53 lines (49 loc) · 1.72 KB
/
ipaddresses.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package engine
import (
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network"
"github.com/Azure/go-autorest/autorest/to"
)
func CreatePublicIPAddress() PublicIPAddressARM {
return PublicIPAddressARM{
ARMResource: ARMResource{
APIVersion: "[variables('apiVersionNetwork')]",
},
PublicIPAddress: network.PublicIPAddress{
Location: to.StringPtr("[variables('location')]"),
Name: to.StringPtr("[variables('masterPublicIPAddressName')]"),
PublicIPAddressPropertiesFormat: &network.PublicIPAddressPropertiesFormat{
DNSSettings: &network.PublicIPAddressDNSSettings{
DomainNameLabel: to.StringPtr("[variables('masterFqdnPrefix')]"),
},
PublicIPAllocationMethod: network.Static,
},
Sku: &network.PublicIPAddressSku{
Name: "[variables('loadBalancerSku')]",
},
Type: to.StringPtr("Microsoft.Network/publicIPAddresses"),
},
}
}
func createJumpboxPublicIPAddress() PublicIPAddressARM {
return PublicIPAddressARM{
ARMResource: ARMResource{
APIVersion: "[variables('apiVersionNetwork')]",
},
PublicIPAddress: network.PublicIPAddress{
Location: to.StringPtr("[variables('location')]"),
Name: to.StringPtr("[variables('jumpboxPublicIpAddressName')]"),
PublicIPAddressPropertiesFormat: &network.PublicIPAddressPropertiesFormat{
DNSSettings: &network.PublicIPAddressDNSSettings{
DomainNameLabel: to.StringPtr("[variables('masterFqdnPrefix')]"),
},
PublicIPAllocationMethod: network.Dynamic,
},
Sku: &network.PublicIPAddressSku{
Name: network.PublicIPAddressSkuNameBasic,
},
Type: to.StringPtr("Microsoft.Network/publicIPAddresses"),
},
}
}