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

4311 automationaccount #1

Merged
merged 2 commits into from
Dec 1, 2023
Merged

4311 automationaccount #1

merged 2 commits into from
Dec 1, 2023

Conversation

elanzel
Copy link
Owner

@elanzel elanzel commented Dec 1, 2023

Description

If you haven't already, read the full contribution guide. The guide may have changed since the last time you read it, so please double-check. Once you are done and ready to submit your PR, edit the PR description and run through the relevant checklist below.

Enable GitHub Worksflows in your fork to enable auto-generation of assets with our GitHub Action.
To trigger GitHub Actions after auto-generation, add a GitHub PAT as a secret in your forked repository called PAT.

Adding a new module

  • A proposal has been submitted and approved.
  • I have included "Closes #{module_proposal_issue_number}" in the PR description.
  • I have run brm validate locally to verify the module files.
  • I have run deployment tests locally to ensure the module is deployable.

Updating an existing module

  • This is a bug fix:
    • 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.
  • I have run brm validate locally to verify the module files.
  • I have run deployment tests locally to ensure the module is deployable.
  • I have read the Updating an existing module section in the contributing guide and updated the version.json file properly:
    • The PR contains backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json.
    • The PR contains backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • The PR contains breaking changes, and I have bumped the MAJOR version in version.json.
  • I have updated the examples in README with the latest module version number.

@elanzel elanzel merged commit d2c2a42 into main Dec 1, 2023
8 of 9 checks passed
elanzel pushed a commit that referenced this pull request Oct 23, 2024
…zure#3015)

## Description

- Example implementation to dynamically inject
tenant/contributor-specific information into test cases
- Tests
- Using GitHub Secrets: Failed as not dynamic. All secrets would need to
be declared explicitely in the templates, requiring continuous updates
- Using Key Vault: Works, but requires an Azure Key Vault in the test
subscription + granting the deploying principal Key Vault Secret User
permissions on set Key vault
- Secret values are fetched by prefix (currently `CI-`) and only if a
given test template has a parameter of the same name.
- Secrets are passed as secureStrings from beginning to end (i.e., also
the parameter **must** be declared as `@secure()`
- The test template parameter must follow the same naming as the secret
to be matched as per the following rules
  -  `CI-MySecret` would be matched wih a parameter named `mySecret`

Remaining TODOs

- [x] Agree on naming of variable & prefix
- [x] Test whether the solution is robust enough to not fail if the Key
Vault name variable is not set ([Test Run - See attempt
#1](https://github.com/Azure/bicep-registry-modules/actions/runs/10559737937))
  <details><summary>Result</summary>

The lack of the variable does **not** fail the pipeline as shown in the
following run. The logic goes past the point where it checks for the Key
Vault

![image](https://github.com/user-attachments/assets/8756cf62-bfef-473e-929f-01611ba560ee)

  </details>

@clintgrove, @rahalan & @segraef, please note that if this PR is merged
it means you would need to update your forks in order to continue
contributing to your modules. As the names etc. can still change I'd
advice against any action at this point, but you should be the first to
know :) On the plus side, no more updating of tenant-specific values 😉

### GitHub Settings 

![image](https://github.com/user-attachments/assets/2af9a297-6938-4a29-b926-16e4148d949e)

### Azure KeyVault

![image](https://github.com/user-attachments/assets/24e57585-571e-4494-9aa7-de64feeb2d15)


### Pipeline logic in action

![image](https://github.com/user-attachments/assets/4efa1919-e09d-46af-ac4d-52cbfbbeef3e)


## Pipeline Reference

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

| Pipeline |
| -------- |

[![avm.res.managed-services.registration-definition](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.managed-services.registration-definition.yml/badge.svg?branch=users%2Falsehr%2FsecretPassThru&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.managed-services.registration-definition.yml)

[![avm.res.compute.virtual-machine](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.compute.virtual-machine.yml/badge.svg?branch=users%2Falsehr%2FsecretPassThru&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.compute.virtual-machine.yml)

[![avm.res.databricks.workspace](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml/badge.svg?branch=users%2Falsehr%2FsecretPassThru&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.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:
- [ ] 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.
- [ ] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Jack Tracey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant