Skip to content

Fix variable reference for agent IP in key vault access#14383

Open
BalintBanyasz wants to merge 1 commit into
MicrosoftDocs:mainfrom
BalintBanyasz:main
Open

Fix variable reference for agent IP in key vault access#14383
BalintBanyasz wants to merge 1 commit into
MicrosoftDocs:mainfrom
BalintBanyasz:main

Conversation

@BalintBanyasz

Copy link
Copy Markdown

The sample currently sets the agentIP variable incorrectly:

echo "##vso[task.setvariable variable=agentIP]ip"

This stores the literal string ip instead of the value of $ip. As a result, the later Remove-AzKeyVaultNetworkRule step cannot remove the rule that was added, leaving the agent IP in the Key Vault network rules.

The sample should only use:

echo "##vso[task.setvariable variable=agentIP]$ip"

Likewise, the removal step should reference the pipeline variable:

$ipRange = "$(agentIP)/32"

This ensures the example works end-to-end.

@prmerger-automator

Copy link
Copy Markdown
Contributor

@BalintBanyasz : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@prmerger-automator

Copy link
Copy Markdown
Contributor

@BalintBanyasz : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@v-regandowner

Copy link
Copy Markdown
Contributor

@ramiMSFT

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants