Skip to content

Commit

Permalink
fix: Common-Types - Fixed workflow configuration (#3563)
Browse files Browse the repository at this point in the history
## Description

- Fixed workflow configuration
- Implemented publish-triggering module change

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.utl.types.avm-common-types](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.utl.types.avm-common-types.yml/badge.svg?branch=users%2Falsehr%2FtypesPublish&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.utl.types.avm-common-types.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [x] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation
  • Loading branch information
AlexanderSehr authored Oct 16, 2024
1 parent da7e5cb commit b7299ed
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/avm.utl.types.avm-common-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
type: boolean
description: "Execute static validation"
required: false
default: false # true
default: true
deploymentValidation:
type: boolean
description: "Execute deployment validation"
Expand All @@ -22,7 +22,6 @@ on:
type: string
description: "Default location overwrite (e.g., eastus)"
required: false
default: 'northeurope'
push:
branches:
- main
Expand Down
23 changes: 15 additions & 8 deletions avm/utl/types/avm-common-types/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ This module provides you with all common variants for AVM interfaces to be used
Details for how to implement these interfaces can be found in the AVM documentation [here](https://azure.github.io/Azure-Verified-Modules/specs/shared/interfaces).
'''
metadata owner = 'Azure/module-maintainers'

// ====================== //
// Diagnostic Settings //
// ====================== //

// Type with all properties available
@export()
@description('An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider.')
type diagnosticSettingFullType = {
@description('Optional. The name of diagnostic setting.')
@description('Optional. The name of the diagnostic setting.')
name: string?

@description('Optional. The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to `[]` to disable log collection.')
Expand Down Expand Up @@ -55,8 +57,8 @@ type diagnosticSettingFullType = {
marketplacePartnerResourceId: string?
}

// Type with only metrics available
@export()
@description('An AVM-aligned type for a diagnostic setting. To be used if only metrics are supported by the resource provider.')
type diagnosticSettingMetricsOnlyType = {
@description('Optional. The name of diagnostic setting.')
name: string?
Expand Down Expand Up @@ -89,8 +91,8 @@ type diagnosticSettingMetricsOnlyType = {
marketplacePartnerResourceId: string?
}

// Type with only logs available
@export()
@description('An AVM-aligned type for a diagnostic setting. To be used if only logs are supported by the resource provider.')
type diagnosticSettingLogsOnlyType = {
@description('Optional. The name of diagnostic setting.')
name: string?
Expand Down Expand Up @@ -131,6 +133,7 @@ type diagnosticSettingLogsOnlyType = {
// =================== //

@export()
@description('An AVM-aligned type for a role assignment.')
type roleAssignmentType = {
@description('Optional. The name (as GUID) of the role assignment. If not provided, a GUID will be generated.')
name: string?
Expand Down Expand Up @@ -162,6 +165,7 @@ type roleAssignmentType = {
// ========= //

@export()
@description('An AVM-aligned type for a lock.')
type lockType = {
@description('Optional. Specify the name of lock.')
name: string?
Expand All @@ -174,8 +178,8 @@ type lockType = {
// Managed Identities //
// ====================== //

// Type with all properties available
@export()
@description('An AVM-aligned type for a managed identity configuration. To be used if both a system-assigned & user-assigned identities are supported by the resource provider.')
type managedIdentityAllType = {
@description('Optional. Enables system assigned managed identity on the resource.')
systemAssigned: bool?
Expand All @@ -184,15 +188,15 @@ type managedIdentityAllType = {
userAssignedResourceIds: string[]?
}

// Type with only system-assigned identities available
@export()
@description('An AVM-aligned type for a managed identity configuration. To be used if only system-assigned identities are supported by the resource provider.')
type managedIdentityOnlySysAssignedType = {
@description('Optional. Enables system assigned managed identity on the resource.')
systemAssigned: bool?
}

// Type with only user-assigned identities available
@export()
@description('An AVM-aligned type for a managed identity configuration. To be used if only user-assigned identities are supported by the resource provider.')
type managedIdentityOnlyUserAssignedType = {
@description('Optional. The resource ID(s) to assign to the resource. Required if a user assigned identity is used for encryption.')
userAssignedResourceIds: string[]?
Expand Down Expand Up @@ -241,8 +245,8 @@ type privateEndpointIpConfigurationType = {
}
}

// Type where the Private Endpoint's default service / groupId can be assumed (i.e., for services that only have one Private Endpoint type like 'vault' for key vault)
@export()
@description('An AVM-aligned type for a private endpoint. To be used if the private endpoint\'s default service / groupId can be assumed (i.e., for services that only have one Private Endpoint type like \'vault\' for key vault).')
type privateEndpointSingleServiceType = {
@description('Optional. The name of the Private Endpoint.')
name: string?
Expand Down Expand Up @@ -297,8 +301,8 @@ type privateEndpointSingleServiceType = {
resourceGroupName: string?
}

// Type where the Private Endpoint's default service / groupId can NOT be assumed (i.e., for services that have more than one subresource, like Storage Account with Blob (blob, table, queue, file, ...)
@export()
@description('An AVM-aligned type for a private endpoint. To be used if the private endpoint\'s default service / groupId can NOT be assumed (i.e., for services that have more than one subresource, like Storage Account with Blob (blob, table, queue, file, ...).')
type privateEndpointMultiServiceType = {
@description('Optional. The name of the private endpoint.')
name: string?
Expand Down Expand Up @@ -358,6 +362,7 @@ type privateEndpointMultiServiceType = {
// ======================== //

@export()
@description('An AVM-aligned type for a customer-managed key.')
type customerManagedKeyType = {
@description('Required. The resource ID of a key vault to reference a customer managed key for encryption from.')
keyVaultResourceId: string
Expand All @@ -377,6 +382,7 @@ type customerManagedKeyType = {
// ================== //

@export()
@description('An AVM-aligned type for the output of the secret set via the secrets export feature.')
type secretSetType = {
@description('The resourceId of the exported secret.')
secretResourceId: string
Expand All @@ -389,6 +395,7 @@ type secretSetType = {
}

@export()
@description('An AVM-aligned type for the secret to set via the secrets export feature.')
type secretToSetType = {
@description('Required. The name of the secret to set.')
name: string
Expand Down
46 changes: 30 additions & 16 deletions avm/utl/types/avm-common-types/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "14970745628674685946"
"templateHash": "3702359687684026662"
},
"name": "Default interface types for AVM modules",
"description": "This module provides you with all common variants for AVM interfaces to be used in AVM modules.\n\nDetails for how to implement these interfaces can be found in the AVM documentation [here](https://azure.github.io/Azure-Verified-Modules/specs/shared/interfaces).\n"
"description": "This module provides you with all common variants for AVM interfaces to be used in AVM modules.\n\nDetails for how to implement these interfaces can be found in the AVM documentation [here](https://azure.github.io/Azure-Verified-Modules/specs/shared/interfaces).\n",
"owner": "Azure/module-maintainers"
},
"definitions": {
"diagnosticSettingFullType": {
Expand All @@ -19,7 +20,7 @@
"type": "string",
"nullable": true,
"metadata": {
"description": "Optional. The name of diagnostic setting."
"description": "Optional. The name of the diagnostic setting."
}
},
"logCategoriesAndGroups": {
Expand Down Expand Up @@ -128,7 +129,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a diagnostic setting. To be used if both logs & metrics are supported by the resource provider."
}
},
"diagnosticSettingMetricsOnlyType": {
Expand Down Expand Up @@ -214,7 +216,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a diagnostic setting. To be used if only metrics are supported by the resource provider."
}
},
"diagnosticSettingLogsOnlyType": {
Expand Down Expand Up @@ -308,7 +311,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a diagnostic setting. To be used if only logs are supported by the resource provider."
}
},
"roleAssignmentType": {
Expand Down Expand Up @@ -380,7 +384,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a role assignment."
}
},
"lockType": {
Expand All @@ -407,7 +412,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a lock."
}
},
"managedIdentityAllType": {
Expand All @@ -432,7 +438,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a managed identity configuration. To be used if both a system-assigned & user-assigned identities are supported by the resource provider."
}
},
"managedIdentityOnlySysAssignedType": {
Expand All @@ -447,7 +454,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a managed identity configuration. To be used if only system-assigned identities are supported by the resource provider."
}
},
"managedIdentityOnlyUserAssignedType": {
Expand All @@ -465,7 +473,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a managed identity configuration. To be used if only user-assigned identities are supported by the resource provider."
}
},
"privateEndpointPrivateDnsZoneGroupType": {
Expand Down Expand Up @@ -698,7 +707,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a private endpoint. To be used if the private endpoint's default service / groupId can be assumed (i.e., for services that only have one Private Endpoint type like 'vault' for key vault)."
}
},
"privateEndpointMultiServiceType": {
Expand Down Expand Up @@ -836,7 +846,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a private endpoint. To be used if the private endpoint's default service / groupId can NOT be assumed (i.e., for services that have more than one subresource, like Storage Account with Blob (blob, table, queue, file, ...)."
}
},
"customerManagedKeyType": {
Expand Down Expand Up @@ -870,7 +881,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for a customer-managed key."
}
},
"secretSetType": {
Expand All @@ -896,7 +908,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for the output of the secret set via the secrets export feature."
}
},
"secretToSetType": {
Expand All @@ -916,7 +929,8 @@
}
},
"metadata": {
"__bicep_export!": true
"__bicep_export!": true,
"description": "An AVM-aligned type for the secret to set via the secrets export feature."
}
},
"secretsOutputType": {
Expand Down

0 comments on commit b7299ed

Please sign in to comment.