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

adding getSecret helper to az namespace for bicepparam files #11236

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

polatengin
Copy link
Member

@polatengin polatengin commented Jul 14, 2023

Contributing a feature

  • I have opened a new issue for the proposal, or commented on an existing one, and ensured that the Bicep maintainers are good with the design of the feature being implemented
  • I have included "Fixes #{issue_number}" in the PR description, so GitHub can link to the issue and close it when the PR is merged
  • I have appropriate test coverage of my new feature

Fixes #10652

Design Proposal for the getSecret() support in .bicepparam files can be found on; #10652 (comment)

getSecret() helper is added to az namespace, so, it can be used in .bicepparam files as;

param sqlPwd = getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>')

or, with the az namespace alias

param webPwd = az.getSecret('<subscriptionId>', '<resourceGroupName>', '<keyVaultName>', '<secretName>', '<secretVersion>')

I added tests to make sure the functionality is working as expected. IntegrationTests and UnitTests projects are passing;

Cli.IntegrationTests
image

Core.IntegrationTests
image

Decompiler.IntegrationTests
image

LangServer.IntegrationTests
image

Cli.UnitTests
image

Core.UnitTests
image

Decompiler.UnitTests
image

LangServer.UnitTests
image

Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: codeflow:open?pullrequest=#11236

Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

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

:shipit:

@github-actions
Copy link
Contributor

Test Results (win-x64)

       33 files  ±0         33 suites  ±0   31m 51s ⏱️ - 1m 18s
10 184 tests +3  10 184 ✔️ +3  0 💤 ±0  0 ±0 
12 399 runs  +3  12 399 ✔️ +3  0 💤 ±0  0 ±0 

Results for commit 136c0c2. ± Comparison against base commit 2499ee5.

@github-actions
Copy link
Contributor

Test Results (linux-musl-x64)

       33 files  ±0         33 suites  ±0   30m 27s ⏱️ - 4m 37s
10 172 tests +3  10 172 ✔️ +3  0 💤 ±0  0 ±0 
12 388 runs  +3  12 388 ✔️ +3  0 💤 ±0  0 ±0 

Results for commit 136c0c2. ± Comparison against base commit 2499ee5.

@github-actions
Copy link
Contributor

Test Results (osx-x64)

       33 files  ±0         33 suites  ±0   1h 27m 9s ⏱️ - 19m 25s
10 176 tests +3  10 176 ✔️ +3  0 💤 ±0  0 ±0 
12 392 runs  +3  12 392 ✔️ +3  0 💤 ±0  0 ±0 

Results for commit 136c0c2. ± Comparison against base commit 2499ee5.

@github-actions
Copy link
Contributor

Test Results (linux-x64)

       33 files  ±0         33 suites  ±0   33m 47s ⏱️ + 7m 30s
10 172 tests +3  10 172 ✔️ +3  0 💤 ±0  0 ±0 
12 388 runs  +3  12 388 ✔️ +3  0 💤 ±0  0 ±0 

Results for commit 136c0c2. ± Comparison against base commit 2499ee5.

@polatengin polatengin merged commit 08f9979 into main Jul 28, 2023
@polatengin polatengin deleted the enpolat/getsecret-helper-in-bicepparam-files branch July 28, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bicep params support for Key Vault secrets
2 participants