Skip to content

Commit

Permalink
fix: Modules missing v2 formatting (#1481)
Browse files Browse the repository at this point in the history
## Description

- Reformatting several modules missing v2 formatting. 

> Note: Exempted following modules from this change
> - App/managed-environment: PR open, will request reformatting to
happen as part of the PR
> - Datafactory/factory: PR open, will request reformatting to happen as
part of the PR
> - Databricks/workspace: PR open, will request reformatting to happen
as part of the PR
> - DBforPostgreSql/flexible-server: Failing PSRule WAF reliability,
will request reformatting to happen as part of the PR fixing it
> - Storage: Bug raised for failing pipeline, will request reformatting
to happen as part of the PR fixing it

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.api-management.service](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.api-management.service.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.api-management.service.yml)
|
|
[![avm.res.app.container-app](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.app.container-app.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.app.container-app.yml)
|
|
[![avm.res.batch.batch-account](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.batch.batch-account.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.batch.batch-account.yml)
|
|
[![avm.res.cache.redis](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.cache.redis.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.cache.redis.yml)
|
|
[![avm.res.databricks.access-connector](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.databricks.access-connector.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.databricks.access-connector.yml)
|
|
[![avm.res.digital-twins.digital-twins-instance](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.digital-twins.digital-twins-instance.yml)
|
|
[![avm.res.document-db.database-account](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.document-db.database-account.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.document-db.database-account.yml)
|
|
[![avm.res.logic.workflow](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.logic.workflow.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.logic.workflow.yml)
|
|
[![avm.res.net-app.net-app-account](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.net-app.net-app-account.yml)
|
|
[![avm.res.relay.namespace](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.relay.namespace.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.relay.namespace.yml)
|
|
[![avm.res.web.connection](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.web.connection.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.web.connection.yml)
|
|
[![avm.res.web.hosting-environment](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.web.hosting-environment.yml/badge.svg?branch=fix%2Fv2-formatting)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.web.hosting-environment.yml)
|


## Type of Change

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

- [ ] Update to CI Environment or utlities (Non-module effecting
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

## Checklist

- [ ] I'm sure there are no other open Pull Requests for the same
update/change
- [ ] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to day with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
  • Loading branch information
eriqua authored Apr 1, 2024
1 parent 0f2ea76 commit c2f7387
Show file tree
Hide file tree
Showing 88 changed files with 4,770 additions and 3,931 deletions.
18 changes: 10 additions & 8 deletions avm/res/api-management/service/api/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,17 @@ resource api 'Microsoft.ApiManagement/service/apis@2021-08-01' = {
}
}

module policy 'policy/main.bicep' = [for (policy, index) in policies ?? []: {
name: '${deployment().name}-Policy-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
apiName: api.name
format: contains(policy, 'format') ? policy.format : 'xml'
value: policy.value
module policy 'policy/main.bicep' = [
for (policy, index) in policies ?? []: {
name: '${deployment().name}-Policy-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
apiName: api.name
format: contains(policy, 'format') ? policy.format : 'xml'
value: policy.value
}
}
}]
]

@description('The name of the API management service API.')
output name string = api.name
Expand Down
570 changes: 328 additions & 242 deletions avm/res/api-management/service/main.bicep

Large diffs are not rendered by default.

34 changes: 19 additions & 15 deletions avm/res/api-management/service/product/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,27 @@ resource product 'Microsoft.ApiManagement/service/products@2021-08-01' = {
}
}

module product_apis 'api/main.bicep' = [for (api, index) in apis: {
name: '${deployment().name}-Api-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: api.name
productName: name
module product_apis 'api/main.bicep' = [
for (api, index) in apis: {
name: '${deployment().name}-Api-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: api.name
productName: name
}
}
}]

module product_groups 'group/main.bicep' = [for (group, index) in groups: {
name: '${deployment().name}-Group-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: group.name
productName: name
]

module product_groups 'group/main.bicep' = [
for (group, index) in groups: {
name: '${deployment().name}-Group-${index}'
params: {
apiManagementServiceName: apiManagementServiceName
name: group.name
productName: name
}
}
}]
]

@sys.description('The resource ID of the API management service product.')
output resourceId string = product.id
Expand Down
20 changes: 11 additions & 9 deletions avm/res/api-management/service/tests/e2e/defaults/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// ============== //

@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
publisherEmail: '[email protected]'
publisherName: '${namePrefix}-az-amorg-x-001'
module testDeployment '../../../main.bicep' = [
for iteration in ['init', 'idem']: {
scope: resourceGroup
name: '${uniqueString(deployment().name, resourceLocation)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
location: resourceLocation
publisherEmail: '[email protected]'
publisherName: '${namePrefix}-az-amorg-x-001'
}
}
}]
]
Loading

0 comments on commit c2f7387

Please sign in to comment.