Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update PIP #898

Merged
merged 2 commits into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"publicIPAllocationMethod": {
"value": "Static"
},
"zones": {
"value": [
"1",
"2",
"3"
]
},
"roleAssignments": {
"value": [
{
Expand Down
33 changes: 28 additions & 5 deletions arm/Microsoft.Network/publicIPAddresses/deploy.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,37 @@ param name string
@description('Optional. Resource ID of the Public IP Prefix object. This is only needed if you want your Public IPs created in a PIP Prefix.')
param publicIPPrefixResourceId string = ''

@description('Optional. The public IP address allocation method. - Static or Dynamic.')
@description('Optional. The public IP address allocation method.')
@allowed([
'Dynamic'
'Static'
])
param publicIPAllocationMethod string = 'Dynamic'

@description('Optional. Public IP Address sku Name')
@description('Optional. Name of a public IP address SKU.')
@allowed([
'Basic'
'Standard'
])
param skuName string = 'Basic'

@description('Optional. Public IP Address pricing tier')
@description('Optional. Tier of a public IP address SKU.')
@allowed([
'Global'
'Regional'
])
param skuTier string = 'Regional'

@description('Optional. A list of availability zones denoting the IP allocated for the resource needs to come from.')
param zones array = []

@description('Optional. IP address version.')
@allowed([
'IPv4'
'IPv6'
])
param publicIPAddressVersion string = 'IPv4'

@description('Optional. Specifies the number of days that logs will be kept for; a value of 0 will retain data indefinitely.')
@minValue(0)
@maxValue(365)
Expand Down Expand Up @@ -98,16 +120,17 @@ module pid_cuaId '.bicep/nested_cuaId.bicep' = if (!empty(cuaId)) {
params: {}
}

resource publicIpAddress 'Microsoft.Network/publicIPAddresses@2021-02-01' = {
resource publicIpAddress 'Microsoft.Network/publicIPAddresses@2021-05-01' = {
name: name
location: location
tags: tags
sku: {
name: skuName
tier: skuTier
}
zones: zones
properties: {
publicIPAddressVersion: 'IPv4'
publicIPAddressVersion: publicIPAddressVersion
publicIPAllocationMethod: publicIPAllocationMethod
publicIPPrefix: !empty(publicIPPrefixResourceId) ? publicIPPrefix : null
idleTimeoutInMinutes: 4
Expand Down
12 changes: 7 additions & 5 deletions arm/Microsoft.Network/publicIPAddresses/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| `Microsoft.Authorization/locks` | 2017-04-01 |
| `Microsoft.Authorization/roleAssignments` | 2021-04-01-preview |
| `Microsoft.Insights/diagnosticSettings` | 2021-05-01-preview |
| `Microsoft.Network/publicIPAddresses` | 2021-02-01 |
| `Microsoft.Network/publicIPAddresses` | 2021-05-01 |

## Parameters

Expand All @@ -24,12 +24,14 @@
| `logsToEnable` | array | `[DDoSProtectionNotifications, DDoSMitigationFlowLogs, DDoSMitigationReports]` | `[DDoSProtectionNotifications, DDoSMitigationFlowLogs, DDoSMitigationReports]` | Optional. The name of logs that will be streamed. |
| `metricsToEnable` | array | `[AllMetrics]` | `[AllMetrics]` | Optional. The name of metrics that will be streamed. |
| `name` | string | | | Required. The name of the Public IP Address |
| `publicIPAllocationMethod` | string | `Dynamic` | | Optional. The public IP address allocation method. - Static or Dynamic. |
| `publicIPAddressVersion` | string | `IPv4` | `[IPv4, IPv6]` | Optional. IP address version. |
| `publicIPAllocationMethod` | string | `Dynamic` | `[Dynamic, Static]` | Optional. The public IP address allocation method. |
| `publicIPPrefixResourceId` | string | | | Optional. Resource ID of the Public IP Prefix object. This is only needed if you want your Public IPs created in a PIP Prefix. |
| `roleAssignments` | array | `[]` | | Optional. Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' |
| `skuName` | string | `Basic` | | Optional. Public IP Address sku Name |
| `skuTier` | string | `Regional` | | Optional. Public IP Address pricing tier |
| `skuName` | string | `Basic` | `[Basic, Standard]` | Optional. Name of a public IP address SKU. |
| `skuTier` | string | `Regional` | `[Global, Regional]` | Optional. Tier of a public IP address SKU. |
| `tags` | object | `{object}` | | Optional. Tags of the resource. |
| `zones` | array | `[]` | | Optional. A list of availability zones denoting the IP allocated for the resource needs to come from. |

### Parameter Usage: `tags`

Expand Down Expand Up @@ -82,5 +84,5 @@ Tag names and tag values can be provided as needed. A tag can be left without a

- [Diagnosticsettings](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings)
- [Locks](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks)
- [Publicipaddresses](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-02-01/publicIPAddresses)
- [Publicipaddresses](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/publicIPAddresses)
- [Roleassignments](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2021-04-01-preview/roleAssignments)