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

feat: Added support for Discrimintor-based variants to readme utility #4146

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6c06b68
Added Variant support
AlexanderSehr Jan 12, 2025
dbbfcb3
Update to latest
AlexanderSehr Jan 12, 2025
0c16632
Update to latest
AlexanderSehr Jan 12, 2025
2529217
Update to latest
AlexanderSehr Jan 12, 2025
7d7ad9b
Update to latest
AlexanderSehr Jan 12, 2025
9fc4f89
Update to latest
AlexanderSehr Jan 12, 2025
7571241
Removed unused parameter
AlexanderSehr Jan 12, 2025
c3e5384
Update to latest
AlexanderSehr Jan 12, 2025
6b72f5f
Regenerated ptn modules
AlexanderSehr Jan 12, 2025
81c5095
Update to latest
AlexanderSehr Jan 12, 2025
18a5527
Update to latest
AlexanderSehr Jan 12, 2025
b0afd17
Added support for secureObject
AlexanderSehr Jan 12, 2025
a0029a8
Update to latest
AlexanderSehr Jan 12, 2025
2bca0f4
Update to latest
AlexanderSehr Jan 12, 2025
7258adb
Update to latest
AlexanderSehr Jan 12, 2025
4be63d2
Update to latest
AlexanderSehr Jan 12, 2025
d0c4354
Update to latest
AlexanderSehr Jan 12, 2025
6613708
Small update to readme functino
AlexanderSehr Jan 13, 2025
79a94b1
Update to latest
AlexanderSehr Jan 13, 2025
cdbcdc0
Update to latest
AlexanderSehr Jan 13, 2025
0c9cc1c
Update to latest
AlexanderSehr Jan 13, 2025
612ed21
Update to latest
AlexanderSehr Jan 13, 2025
b23dcfd
Update to latest
AlexanderSehr Jan 13, 2025
417fef6
Update to latest
AlexanderSehr Jan 13, 2025
0edc305
Update to latest
AlexanderSehr Jan 13, 2025
1b5a6ea
Update to latest
AlexanderSehr Jan 13, 2025
a08850c
Update to latest
AlexanderSehr Jan 13, 2025
6368299
Update to latest
AlexanderSehr Jan 13, 2025
4889247
Update to latest
AlexanderSehr Jan 13, 2025
5a3c1ef
Update to latest
AlexanderSehr Jan 13, 2025
42fc000
Enabled parameter-resolving function to work with user-defined types
AlexanderSehr Jan 13, 2025
c12c4f5
Merge branch 'main' into users/alsehr/4128_discriminator
AlexanderSehr Jan 14, 2025
a7d99e4
Added missing description, fixed another, added UDT, updated tests
AlexanderSehr Jan 14, 2025
5cadd3f
Update to latest
AlexanderSehr Jan 14, 2025
7f4e4c3
Update to latest
AlexanderSehr Jan 14, 2025
d38d771
Update to latest
AlexanderSehr Jan 14, 2025
715b259
Update to latest
AlexanderSehr Jan 14, 2025
dfa413e
Update to latest
AlexanderSehr Jan 21, 2025
a6e4643
resolved conflicts
AlexanderSehr Feb 28, 2025
502fbe9
Merge branch 'main' into users/alsehr/4128_discriminator
AlexanderSehr Mar 7, 2025
6178501
Merge branch 'main' into users/alsehr/4128_discriminator
AlexanderSehr Mar 7, 2025
6fd858c
Merge branch 'users/alsehr/4128_discriminator' of https://github.com/…
AlexanderSehr Mar 7, 2025
aa138e1
Fixed bug regarding max & min values
AlexanderSehr Mar 7, 2025
0f83616
Regenerated all readme's
AlexanderSehr Mar 7, 2025
d83d9a8
Merge branch 'main' into users/alsehr/4128_discriminator
ChrisSidebotham Mar 12, 2025
191a834
Resolved conflicts
AlexanderSehr Mar 12, 2025
1a310ad
Update utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1
AlexanderSehr Mar 14, 2025
0cd4975
Merge branch 'main' into users/alsehr/4128_discriminator
AlexanderSehr Mar 14, 2025
7930c8e
Update to [discriminator]
AlexanderSehr Mar 14, 2025
3ee82ff
Update avm/res/insights/metric-alert/main.bicep
AlexanderSehr Mar 14, 2025
ef91287
Update avm/res/insights/metric-alert/main.bicep
AlexanderSehr Mar 14, 2025
dc60f61
Regenerated readmes
AlexanderSehr Mar 14, 2025
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
243 changes: 243 additions & 0 deletions avm/ptn/ai-platform/baseline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,249 @@ The outbound rule. The name of the rule is the object key.

- Required: Yes
- Type: object
- Type-deciding property: type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


<h4>The available variants are:</h4>

| Variant | Description |
| :-- | :-- |
| [`FQDN`](#variant-workspaceconfigurationnetworkoutboundrules>any_other_property<type-fqdn) | The type for a FQDN outbound rule. |
| [`PrivateEndpoint`](#variant-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpoint) | The type for a private endpoint outbound rule. |
| [`ServiceTag`](#variant-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetag) | The type for an service tag outbound rule. |

### Variant: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-FQDN`
The type for a FQDN outbound rule.

To use this variant, set the property `type` to `FQDN`.

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`destination`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-fqdndestination) | string | Fully Qualified Domain Name to allow for outbound traffic. |
| [`type`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-fqdntype) | string | Type of a managed network Outbound Rule of the workspace hub. Only supported when 'isolationMode' is 'AllowOnlyApprovedOutbound'. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`category`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-fqdncategory) | string | Category of a managed network Outbound Rule of the workspace hub. |

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-FQDN.destination`
Copy link
Contributor

@eriqua eriqua Mar 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended to have variant parameters with the same header level 3 (###)? Shouldn't they be level 4 (####)?
Not blocking if complex to achieve, as I understand they may be multiple levels of nesting (e.g. variants in parameters containing variants as well). Just wanted to bring this up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a great question and it took me a while to understand why it's implemented in the way it is. If you collapse all sections in a readme (like this one) you'll see that the Parameters section is on nesting level 2 (##) and all parameters below it are on level 3 (###). This may seem odd a first, but the hierachy is actually not expressed via the # but the title which gets continuously appended the further 'in' you go.
image

I can't recall why this was done for the parameters originally - but - my best guess is that we'd run the hazard of having parameters being nested like ############### storageAccount.blobService.container.blob.immatbilitypolicy.somethingelse.and.so.on.lastItem. The alternative would be just to have the headers and end on ############### lastItem - but that would not be unique (so it cannot be referenced).
The other thing is that something like ################### title can look super odd in Markdown. I can't recall in which Wiki I've seen it, but I've seen these titles being rendered smaller and smaller the deeper you go. Naturally with the text below it, that's not a header, being at normal size 😄.
Anyways, these are just some guesses.


Fully Qualified Domain Name to allow for outbound traffic.

- Required: Yes
- Type: string

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-FQDN.type`

Type of a managed network Outbound Rule of the workspace hub. Only supported when 'isolationMode' is 'AllowOnlyApprovedOutbound'.

- Required: Yes
- Type: string
- Allowed:
```Bicep
[
'FQDN'
]
```

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-FQDN.category`

Category of a managed network Outbound Rule of the workspace hub.

- Required: No
- Type: string
- Allowed:
```Bicep
[
'Dependency'
'Recommended'
'Required'
'UserDefined'
]
```

### Variant: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint`
The type for a private endpoint outbound rule.

To use this variant, set the property `type` to `PrivateEndpoint`.

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`destination`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointdestination) | object | Service Tag destination for a Service Tag Outbound Rule for the managed network of the workspace hub. |
| [`type`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointtype) | string | Type of a managed network Outbound Rule of the workspace hub. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`category`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointcategory) | string | Category of a managed network Outbound Rule of the workspace hub. |

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.destination`

Service Tag destination for a Service Tag Outbound Rule for the managed network of the workspace hub.

- Required: Yes
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`serviceResourceId`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointdestinationserviceresourceid) | string | The resource ID of the target resource for the private endpoint. |
| [`subresourceTarget`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointdestinationsubresourcetarget) | string | The sub resource to connect for the private endpoint. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`sparkEnabled`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-privateendpointdestinationsparkenabled) | bool | Whether the private endpoint can be used by jobs running on Spark. |

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.destination.serviceResourceId`

The resource ID of the target resource for the private endpoint.

- Required: Yes
- Type: string

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.destination.subresourceTarget`

The sub resource to connect for the private endpoint.

- Required: Yes
- Type: string

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.destination.sparkEnabled`

Whether the private endpoint can be used by jobs running on Spark.

- Required: No
- Type: bool

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.type`

Type of a managed network Outbound Rule of the workspace hub.

- Required: Yes
- Type: string
- Allowed:
```Bicep
[
'PrivateEndpoint'
]
```

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-PrivateEndpoint.category`

Category of a managed network Outbound Rule of the workspace hub.

- Required: No
- Type: string
- Allowed:
```Bicep
[
'Dependency'
'Recommended'
'Required'
'UserDefined'
]
```

### Variant: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag`
The type for an service tag outbound rule.

To use this variant, set the property `type` to `ServiceTag`.

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`destination`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagdestination) | object | Service Tag destination for a Service Tag Outbound Rule for the managed network of the workspace hub. |
| [`type`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagtype) | string | Type of a managed network Outbound Rule of the workspace hub. Only supported when 'isolationMode' is 'AllowOnlyApprovedOutbound'. |

**Optional parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`category`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagcategory) | string | Category of a managed network Outbound Rule of the workspace hub. |

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.destination`

Service Tag destination for a Service Tag Outbound Rule for the managed network of the workspace hub.

- Required: Yes
- Type: object

**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`portRanges`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagdestinationportranges) | string | The name of the service tag to allow. |
| [`protocol`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagdestinationprotocol) | string | The protocol to allow. Provide an asterisk(*) to allow any protocol. |
| [`serviceTag`](#parameter-workspaceconfigurationnetworkoutboundrules>any_other_property<type-servicetagdestinationservicetag) | string | Which ports will be allow traffic by this rule. Provide an asterisk(*) to allow any port. |

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.destination.portRanges`

The name of the service tag to allow.

- Required: Yes
- Type: string

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.destination.protocol`

The protocol to allow. Provide an asterisk(*) to allow any protocol.

- Required: Yes
- Type: string
- Allowed:
```Bicep
[
'*'
'ICMP'
'TCP'
'UDP'
]
```

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.destination.serviceTag`

Which ports will be allow traffic by this rule. Provide an asterisk(*) to allow any port.

- Required: Yes
- Type: string

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.type`

Type of a managed network Outbound Rule of the workspace hub. Only supported when 'isolationMode' is 'AllowOnlyApprovedOutbound'.

- Required: Yes
- Type: string
- Allowed:
```Bicep
[
'ServiceTag'
]
```

### Parameter: `workspaceConfiguration.networkOutboundRules.>Any_other_property<.type-ServiceTag.category`

Category of a managed network Outbound Rule of the workspace hub.

- Required: No
- Type: string
- Allowed:
```Bicep
[
'Dependency'
'Recommended'
'Required'
'UserDefined'
]
```

### Parameter: `workspaceConfiguration.projectName`

Expand Down
24 changes: 0 additions & 24 deletions avm/ptn/app/container-job-toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,107 +868,83 @@ Network protocol this rule applies to.
'Udp'
]
```
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.description`

The description of the security rule.

- Required: No
- Type: string
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.destinationAddressPrefix`

The destination address prefix. CIDR or destination IP range. Asterisk "*" can also be used to match all source IPs. Default tags such as "VirtualNetwork", "AzureLoadBalancer" and "Internet" can also be used.

- Required: No
- Type: string
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.destinationAddressPrefixes`

The destination address prefixes. CIDR or destination IP ranges.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.destinationApplicationSecurityGroupResourceIds`

The resource IDs of the application security groups specified as destination.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.destinationPortRange`

The destination port or range. Integer or range between 0 and 65535. Asterisk "*" can also be used to match all ports.

- Required: No
- Type: string
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.destinationPortRanges`

The destination port ranges.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.sourceAddressPrefix`

The CIDR or source IP range. Asterisk "*" can also be used to match all source IPs. Default tags such as "VirtualNetwork", "AzureLoadBalancer" and "Internet" can also be used. If this is an ingress rule, specifies where network traffic originates from.

- Required: No
- Type: string
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.sourceAddressPrefixes`

The CIDR or source IP ranges.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.sourceApplicationSecurityGroupResourceIds`

The resource IDs of the application security groups specified as source.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.sourcePortRange`

The source port or range. Integer or range between 0 and 65535. Asterisk "*" can also be used to match all ports.

- Required: No
- Type: string
- MinValue: 100
- MaxValue: 4096

### Parameter: `customNetworkSecurityGroups.properties.sourcePortRanges`

The source port ranges.

- Required: No
- Type: array
- MinValue: 100
- MaxValue: 4096

### Parameter: `deployInVnet`

Expand Down
Loading