Skip to content

Commit

Permalink
Support to Get IKE Security Associations for VPN Site Link Connections (
Browse files Browse the repository at this point in the history
#14182)

* Adding skeleton code

* Adding VpnLinkConnectionBaseCmdlet and formatting display for IKE SA

* Bug fixes

* Adding test

* Update ChangeLog.md

* Adding help file

* SDK support files

* Update Get-AzVpnSiteLinkConnectionIkeSa.md

* Reverting Compute version

* Changing Network version in other csproj files

* Test bug fix

* Update CredScanSuppressions.json

* Update CredScanSuppressions.json

* Sync network with master branch (#14198)

* Added Zone Redundancy for Recovery Service Vaults (#13962)

* Corrected example command (#13901)

* Corrected example command

The Get-AzRecoveryServicesBackupProtectableItem command in the example was incorrect.

* Updated the Example 1

$Container was using "MSSQL" for ContainerType which is an invalid option.
$Container was missing VaultId
$Item was missing WorkloadType

* Update Get-AzRecoveryServicesBackupProtectableItem.md

Added spacing between terminal and command

* [AppService] Register App Service Resources for Private Link Powershells (#13967)

* Update ChangeLog.md

* Register App Service Resources for Private Link Powershells

* Update ChangeLog.md

* Update ChangeLog.md

* Only use supported commands for prediction request (#13863)

* Only use supported commands for prediction request.

- We only request predictions for the last two commands. When the
  commands are not supported, we replace them with "start_of_snippet".
  The problem of that is when the user has inputted a few unsupported
  commands such as assignments, we'll start to request prediction for
  [ "start_of_snippet", "start_of_snippet" ]. That'll the same as
  resetting the prediction as the beginning of the session. While in
  fact there may be Az commands in the history.
- The change here is not to use those unsupported commands to request
  predictions. We'll skip the unsupported commands unless we don't have
  enough commands from history to use for the prediction.

* Incorporate PR feedback

* [Az.RecoveryServices.Backup] modifying policy validation limits as per backup service (#14006)

* modifying policy validation limits as per backup service

* updated changelog

* Improve getting command ast and parse parameters (#13864)

* Improve getting command ast and parse parameters.

- We use the RelatedAsts from PSReadLine to get the command AST as the
  user input. This is what our prediction will try to match.
- Now we can parse the parameter in the format of "-Name:Value".
- We don't parse  positioinal parameters yet.

* Incorporate PR feedback.

* Add test matrix for Az.Accounts (#13760)

* add test matrix for Az.Accounts

* Update test-matrix-for-az-accounts.md

* Update test-matrix-for-az-accounts.md

* update to address comments

* update category description

* refine test auto tag

* refine test matrix

* refine document

* Documentation improvement to Az.StackHCI (#13988)

* Fix example format of Register-AzStackHCI

* module description

* Update Register-AzStackHCI.md

* exit 0

* Support for Proximity placement group and Availability zone for Vmware to Azure and HyperV to Azure scenarios (#14007)

* Support for Proximity placement group and Availability zone for Vmware to Azure and HyperV to Azure scenarios

* Updated changeLog to resolve conflicts�

* Updated changelog

* Resolving conflicts

* Addressed review comments

* Resolving conflict

* Resoving conflicts in changeLog.md file

* Fixed broken link to contribution guidelines (#14009)

* Fixed broken link to contribution guidelines

I assume the correct link should be `https://opensource.microsoft.com/collaborate` like it was updated in other projects like [azure-sdk](Azure/azure-sdk-for-c#1101).

* Updated broken link in contributing.md

Co-authored-by: Damien Caro <dcaro@microsoft.com>

* Update error kind when context is incorrect (#14013)

* Release Az.Migrate 2021-01-21 (#13995) (#14027)

* enable import EC key via byok (#14002)

Co-authored-by: Yeming Liu <yeliu@microsoft.com>

* [HDInsight] Support compute isolation feature and return private ip address feature (#14032)

* Support compute isolation feature and return private ip address feature

* Fix bad code style

Co-authored-by: Zhenyu Zhou <zhezhou@microsoft.com>

* Update .gitignore - ignore all test results (#14043)

* Webapp: Support for appservice ImportKeyVault Certificate (#14037)

* #Commit1

* #Commit2

* #Commit3

* Cplat enablebursting (#14038)

* bursting enabled

* update

* [Automation]Fix the issue of processing PSCustomObject (#14045)

* Fix the issue of processing PSCustomObject.

* Add changelog

* Update ChangeLog.md

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>

* Log Analytics new parameters Group By ApplicationId and UserAgent (#14015)

* data dog work, signed nuget packages

* nuget pkg from signed location .net

* using the package that released data dog functionality

* update nuget and disk objs

* back to 42 to avoid test failures

* v42

* Update RecoveryServices.Backup.Test.csproj

* Update RecoveryServices.SiteRecovery.Test.csproj

* Update SqlVirtualMachine.Test.csproj

* remove bad cmdlet to see if resolves CI errors

* Update LogAnalyticTests.ps1

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

> > @Sandido
> > Compute test module uses storage via cmdlets defined in AzureRM.Storage.ps1. New-AzStorageContext cannot be recognized because it is not defined in AzureRM.Storage.ps1.
> > Could you try to modify your test and not to use these storage cmdlets?
> 
> @msJinLei , Without this cmdlet, the test does not function. I have commented out the test code, and made the test a LiveOnly test. The code can be uncommented to be run locally. I will see if the SDK team can add New-AzStorageContext to AzureRM.Storage.ps1 at a later date. We want this work merged by 2/1 so please consider this PR for merging.

OK

* Fix top value when top is not provided (#14051)

* Fix top value when max is not provided

* Fix changelog.md error

* Update ChangeLog.md

Co-authored-by: Namrata Jagasia <najagasi@microsoft.com>
Co-authored-by: msJinLei <leijin@microsoft.com>
Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* breaking change message (#14050)

* Update WAF Sdk to support RequestBodyCheck and JSON exclussions (#14044)

* Update WAF Sdk to support RequestBodyCheck and JSON exclussions

* Add check to test case

* Add sets

* Update ChangeLog.md

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* rename VMWare to VMware, and set confirmimpact to 'High' for remove-azvmwareprivatecloud (#14031)

* rename VMWare to VMware

* Update Changelog.md

* Update Changelog.md

* fix changelog

* change name from virtual router to route server

* Fix predicate expression for server audit (#14063)

* fix PredicateExpression for server audit policy

* re-record all audit tests to avoid regression

* updated ChangeLog.md

* Make build change

* Undo make build change

Co-authored-by: Oleg Sternberg <olsternb@microsoft.com>

* Add ExpressRoutePort MACsec SCI state  (#13928)

* Migrate macsec changes from broken repo

* Move get service principal id into PS script.  Add documentation in PS test cript

* Update ChangeLog.md

* Add SciState to Get-AzExpressRoutePort help examples

* Add test record

* change name from virtual router to route server (#14061)

Co-authored-by: Yabo Hu <yabhu@microsoft.com>

* Update service principal warning (#14064)

* Azure VMware Solution (#14059)

* Add codeowner for policyInsights (#14052)

We had a change go into our cmdlets from someone outside the service team.  Want to ensure future changes are reviewed by us,

* Enable Get-AzVM piping to Get-AzVMExtension cmdlet (#14039)

* dev, test, changelog, help doc

* resourceId and switch

* id

* resourceId fix

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* Fix Microsoft.Azure.Management.ResourceManager dll conflict (#14072)

* Upgrade common, implement getserviceclient credential, invoke listener to be cleared (#14073)

* Using the latest version of autorest to generate code for 'costmanagement' (#14048)

* Move CostManagement to master

* update the changelog

* update the changelog file

Co-authored-by: azurepowershell <azurepowershell@ms.com>

* [Storage] Upgrade XSCL and Azure.Core 1.8.1 (#14058)

* Remove tools/VersionController/packages.config (#14065)

* Webapp: [Documentation]Adding Linux property for New-AzAppServicePlan cmdlet (#14078)

* #Commit1

* #Commit2

* #Commit3

* #13531Commit1

* Set-AzDataLakeGen2AclRecursive.md - Fix typo (directiry -> directory) (#14082)

* Using the latest version of autorest to generate code for 'Databricks' (#14049)

* Move Databricks to master

* update the changelog

* update the changelog file

Co-authored-by: azurepowershell <azurepowershell@ms.com>

* Add CloudError code into exception for tracking (#14077)

* Update error kind when context is incorrect

* Add cloud error code into exception data

* Add changelog

* Improve error handling and bug fix (#14033)

* Improve error handling and bug fix

* Change literal string to constant per change in Common assembly

* Fix build error

* Code refactoring

* add ACR repository operations (#13946)

* add ACR repository operations

* add shouldprocess

* implement iazuresessioncomponentlistener

* add comments and exception

* fix cache impl

* resolve comments

* getlastlisted

* remove unused class

* remove unneeded changes

* fix null reference in PSAcrManifest and remove unused suppression

* Update ChangeLog.md

* fix Acr to ACR in help markdown

* fix output type for Get-AzContainerRegistryRepository

* polish changelog for upcoming release (#14076)

* Polish changelog for az.accounts (#14080)

* Update ChangeLog.md

* Update ChangeLog.md

* Create ChangeLog.md

Co-authored-by: Dingmeng Xue <dixue@microsoft.com>

* Update Az.Accounts help (#14090)

* Added cmdlet Test-AzMySqlFlexibleServerConnect (#14091)

* Revert module version (#14098)

* Add cmdlet Test-AzPostgreSqlFlexibleServerConnect (#14096)

* Add cmdlet Test-AzPostgreSqlFlexibleServerConnect

* Update ChangeLog.md

Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>

* Cover New-AzSqlElasticPool case for SQL maintenance (#14102)

* Cover New-Pool case for maintenance

* Added test coverage

Co-authored-by: Dingmeng Xue <dixue@microsoft.com>

* Remove incorrect changelog (#14099)

* Revert module version

* Remove incorrect changelog

* add cmdlets Get/Start/convert-SynapseVulnerabilityAssessmentScan (#13690)

* SynapseVulnerabilityAssessmentScan

* refine name

* refine function

* fix problem for StartAzureSynapseSqlPoolVulnerabilityAssessmentScan not work

* some draft codes

* resolve confilct 2

* removce strange sign

* format code

* refine function

* add test

* add help doc

* code refine

* format refine

* update Az.Synapse.psd1

* add test json

* refinde document

* improve help examples

* added test json

* added test json 2

* improved test

* add tests to credscansuppression

* Get-AzSynapseSqlPoolGeoBackup and Get-AzSynapseDroppedSqlPool. (#13621)

* GetAzureSynapseSqlPoolGeoBackup

* refine function and constant

* add help

* GetAzureSynapseSqlDeletedDatabaseBackup

* refine backup function

* refine doc

* add Getazuresynapsesqldeleteddatabasebackup

* refined help doc

* refine function

* resolve id name type not found in output problem

* add test

* update command name

* resolve some comments

* resovle function problem

* test improvement

* add wildcard

* rename help doc

* add resourceid

* Update ChangeLog.md

Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>

* Type fox: changed SshKeyVaule to SshKeyValue (#14087)

* Examples used New-AzAks which is legacy cmdlet and the alias for New-AzAksCluster. Changed examples to use New-AzAksCluster which is the cmdlet this documentation page targets. (#14088)

Co-authored-by: erich-wang <eriwan@microsoft.com>

* Fixed a typo in the cmdlet (#14112)

* Add legal term and parameter -AcceptEULA to 'New-AzVMwarePrivateCloud' (#14111)

* Move VMware to master

* update changelog

* Update Changelog.md

* Update New-AzVMwarePrivateCloud.ps1

* Update New-AzVMwarePrivateCloud.md

* Update New-AzVMwarePrivateCloud.ps1

Co-authored-by: azurepowershell <azurepowershell@ms.com>
Co-authored-by: Dingmeng Xue <dixue@microsoft.com>

* Revert "Pass principal type during role assignment put operations" (#14122)

* Revert "Pass principal type during role assignment put operations (#13590)"

This reverts commit 3d473e4.

* changelog

* update changelog

Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com>
Co-authored-by: Daniel Orozco <Daniel.Orozco@microsoft.com>

* Honoring UseManagedDisk input for HyperV to Azure scenario in site recovery service (#14128) (#14131)

* Honoring UseManagedDisk input for HyperV to Azure scenario in site recovery service

* Update in changeLog

* Update in help file

* Minor fix in help file

* Added test cases

* NIT fixes for spaces

* Addressed review comments

Co-authored-by: vidyadharijami <57709079+vidyadharijami@users.noreply.github.com>

* Added support for -QueryString parameters to cmdlets hitting /validate API and Fixed issues with dynamic parameters (#14132)

* QuerySTring support for validate cmdlets

* Refactor querystring; Fix issues with dynamic parameters

* Updated changelog and help files

* Honoring UseManagedDisk input for HyperV to Azure scenario in site recovery service (#14128)

* Honoring UseManagedDisk input for HyperV to Azure scenario in site recovery service

* Update in changeLog

* Update in help file

* Minor fix in help file

* Added test cases

* NIT fixes for spaces

* Addressed review comments

Co-authored-by: vidyadharijami <57709079+vidyadharijami@users.noreply.github.com>

* release-2021-02-09 (#14137)

* release-2021-02-09

* Update ChangeLog.md

* switch param best practice (#14142)

* add local parameter map saving to a local file (#14018) (#14140)

* add local parameter map saving to a local file

* fix local parameter map saving

* revere serviceUri change in AzPredictorSettings

Co-authored-by: yemohyle <73853907+yemohyle@users.noreply.github.com>

* Remove culture from help markdown files (#14047)

* update MarkDwon file to remove specified language

* update the "HelpGeneration" file to fix static analysis issue

* Update the ‘Az.VMware.md’ file

* update the "HelpGeneration" files

* update markdown file to fix online url issue for azsynapse

* update markdown file for Synaps

* Test-AzMySqlFlexibleServerConnect.md

* Update Test-AzPostgreSqlFlexibleServerConnect.md

Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>
Co-authored-by: Yeming Liu <felix_liu@outlook.com>

* Optimize for CI filter. (#13994)

* Optimize for CI filter.

* Add support for TargetModule

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>

* [Tools] Use type fullname to avoid issue from class renaming. (#14147)

* Optimize for CI filter.

* Add support for TargetModule

* Avoid the issue caused by renaming class.

* Avoid the issue caused by renaming class.

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>

* Fix example doc syntax (#14146)

* [Tools] Fix the issue of different name of module and folder when run CI pipeline (#14151)

* Optimize for CI filter.

* Add support for TargetModule

* Avoid the issue caused by renaming class.

* Avoid the issue caused by renaming class.

* Fix the issue of different name of module and folder

* Fix the issue of different name of module and folder

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>

* [DataFactory]Upgrade sdk version to 4.14.0 (#14149)

* [DataFactory]Upgrade sdk version to 4.14.0

* revert

* Revert "revert"

This reverts commit aa7f924.

* Azure Automation documentation update for Get-AzAutomationWebhook and New-AzAutomationSourceControl (#14154)

* Updating documentation

* Adding new line and adding bold emphasis

* Small spelling, formatting changes (#14155)

'objecy' jumped out at me, so I figured I'd see if there's anything else needs changing to make this look better.
Question: In other functions, SubscriptionId is a "String" type - here it is listed as a "String[]" type - is this correct?

* Update Set-AzNetworkSecurityRuleConfig.md (#14176)

* Added an additional cmdline to the example which applies the changes to the load balancer (#14185)

When running the PowerShell example, the changes will not be applied to the load balancer unless you perform an additional Set-AzLoadBalancer step.

* Add cmdlet to enable/disable az predictor (#14188)

* Add cmdlet.

* Modify the parmaeter values.

* Fixed issues with TemplateSpec deployments in New-AzTenantDeployment … (#14179)

* Fixed issues with TemplateSpec deployments in New-AzTenantDeployment and New-AzManagementGroupDeployment

* Review fixes

* Modified and re-recorded Test-NewMGDeploymentFromTemplateSpec

* Acr fix (#14177) (#14189)

* fix docker push issue: use refresh token to login

* changelog

* OOB release for Az.ContainerReigstry

* resolve comments

* Blueprint: Unregister API delegating handler (#14200)

* Update blueprint client to unregister api handler

* Update change log

* Use initial client design where we create seperate clients based on whether delegating handler is used. This works better with piping scenarios

* New and set artifact cmdlets don't require bp client with $expand handler

* Clean white space

* Clean up more white space

* Fix the issue that PR changed files list is empty (#14202)

* Fix the issue that PR changed files list is empty

* Fix the issue that PR changed files list is empty

Co-authored-by: wyunchi <yunwang@microsoft.com>

* update parameter descriptions: -CustomData for Set-AzVMOperatingSystem and -LicenseType for New-AzVM (#14210)

* update md files

* Update Set-AzVMOperatingSystem.md

* Update Set-AzVMOperatingSystem.md

* Update New-AzVM.md

* Update the cmdlet parameters according to feedback. (#14217)

* [DPS] Add attestation mechanism updates to device enrollment and enrollment group commands (#14219)

* Added attestation mechanism updates to device enrollment and enrollment group commands

* Updated changelog

* Update ChangeLog.md

Co-authored-by: Yabo Hu <yabhu@microsoft.com>

* Add prompt for usage and survey (#13965)

* Add prompt for usage and survey.

* Condition the survey and correlate survey and telemetry.

- Check if the user has used the module in the past 30 days and whether
  the user uses at least 3 times. If so, prompt the survey.
- Create a survey id based on user id and use it to associate the survey
  and the telemetry.
- Add a field in the telemetry to check if the telemetry data is from an
  internal user.

* Wrap the intercept script in the script to process.

* Update the link and message color.

* Update the survey prompt UI.

* Updated module description

* Revert the version and add copyright.

* Incorporate feedback.

* Incorporate feedback.

* Improve the comment.

* Use a new flag to ignore null value in json serialization.

* Remove the prompt about psreadlineoption.

- It's replaced with cmdlets.

Co-authored-by: Damien Caro <dcaro@microsoft.com>

* [Tools] Fix the issue of CI Pipeline (#14222)

* Fix the issue that cannot fine valid module for Generated module in CI pipeline

* Fix the issue that Target module fails

Co-authored-by: wyunchi-ms <yunwang@microsoft.com>

* Cosmos DB: Update to 2.0.0 and Add support for NetworkAclBypass in Account (#14211)

* Make changes for Network Acl Bypass

* Add help file updates

* Changes with enum not as string

* rerun tests

* Remove extra line

* rerun gremlin test with updated

* Update ChangeLog.md

Co-authored-by: Yabo Hu <yabhu@microsoft.com>

* Fixed invalid ts deployment error message (#14236)

* Fixed invalid ts deployment error message and added support for -TemplateParameterObject in TS deployments

* Update help files for new parameter set

* review fixes

* [AzRecoveryServices.Backup] Adding null check for target storage account (#13681)

* Adding null check for target storage account

* fixing the operations delay

* re-recorded failed tests

* Add support for Python 3 Runbook Type (#14226)

* Add support for Python 3 Runbook Type

* Update change.log

* Updated markdown help files

* Update ChangeLog.md

Co-authored-by: Mahak Jain <mahja@microsoft.com>
Co-authored-by: Yabo Hu <yabhu@microsoft.com>

* Update Add-AzLoadBalancerInboundNatPoolConfig.md (#14231)

with out using the Set-AzLoadBalancer after line 42 the natpool config will not be updated to the LB and the example would be incomplete.

* Log Analytics .md files updates (#14203)

* desc update and results

* changelog

* Update ChangeLog.md

* Update ChangeLog.md

Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>

Co-authored-by: Himanshu Agarwal <hiaga@microsoft.com>
Co-authored-by: Sebastian Olsen <30187002+Spacebjorn@users.noreply.github.com>
Co-authored-by: jiansong-msft <77516279+jiansong-msft@users.noreply.github.com>
Co-authored-by: kceiw <hellomao@outlook.com>
Co-authored-by: erich-wang <eriwan@microsoft.com>
Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>
Co-authored-by: vidyadharijami <57709079+vidyadharijami@users.noreply.github.com>
Co-authored-by: Alexander Schmidt <32797407+devdeer-alex@users.noreply.github.com>
Co-authored-by: Damien Caro <dcaro@microsoft.com>
Co-authored-by: Dingmeng Xue <dixue@microsoft.com>
Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>
Co-authored-by: Yeming Liu <yeliu@microsoft.com>
Co-authored-by: aim-for-better <zhenyu.zhou@microsoft.com>
Co-authored-by: Zhenyu Zhou <zhezhou@microsoft.com>
Co-authored-by: ThejaChoudary <57453616+ThejaChoudary@users.noreply.github.com>
Co-authored-by: Theodore Chang <thchan@microsoft.com>
Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>
Co-authored-by: wyunchi-ms <yunwang@microsoft.com>
Co-authored-by: Adam Sandor <adsandor@microsoft.com>
Co-authored-by: najagasi <49212852+najagasi@users.noreply.github.com>
Co-authored-by: Namrata Jagasia <najagasi@microsoft.com>
Co-authored-by: msJinLei <leijin@microsoft.com>
Co-authored-by: digavino <48699384+digavino@users.noreply.github.com>
Co-authored-by: Yabo Hu <yabhu@microsoft.com>
Co-authored-by: Oleza1972 <63361762+Oleza1972@users.noreply.github.com>
Co-authored-by: Oleg Sternberg <olsternb@microsoft.com>
Co-authored-by: francescanarea <francesca@Narea.com>
Co-authored-by: Robert Lyon <35980532+rolyon@users.noreply.github.com>
Co-authored-by: Cameron Taggart <cameron.taggart@gmail.com>
Co-authored-by: Chris Eggert <pilor@users.noreply.github.com>
Co-authored-by: Youri970410 <62531040+Youri970410@users.noreply.github.com>
Co-authored-by: azurepowershell <azurepowershell@ms.com>
Co-authored-by: Wei Wei <weiwei@microsoft.com>
Co-authored-by: Christoph Bergmeister [MVP] <c.bergmeister@gmail.com>
Co-authored-by: Roman Khotsyn <rokhot@microsoft.com>
Co-authored-by: zesluo <zesluo@microsoft.com>
Co-authored-by: Jan David Narkiewicz <jdnark@gmail.com>
Co-authored-by: Martin Ehrnst <martin@ehrnst.no>
Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com>
Co-authored-by: Daniel Orozco <Daniel.Orozco@microsoft.com>
Co-authored-by: Gokul Premraj <gopremra@microsoft.com>
Co-authored-by: yemohyle <73853907+yemohyle@users.noreply.github.com>
Co-authored-by: Yeming Liu <felix_liu@outlook.com>
Co-authored-by: Jingshu923 <52914166+Jingshu923@users.noreply.github.com>
Co-authored-by: Shivam Tyagi <56990792+shivamT95-msft@users.noreply.github.com>
Co-authored-by: alunmj <alun@texis.com>
Co-authored-by: webguynj <webguynj@users.noreply.github.com>
Co-authored-by: Yannick Dils <62245199+yannickdils@users.noreply.github.com>
Co-authored-by: Filiz Topatan <fitopata@microsoft.com>
Co-authored-by: Ryan K <ryan.k@outlook.com>
Co-authored-by: kristynhamasaki <68716650+kristynhamasaki@users.noreply.github.com>
Co-authored-by: mahakjain314 <50352900+mahakjain314@users.noreply.github.com>
Co-authored-by: Mahak Jain <mahja@microsoft.com>
Co-authored-by: chakra146 <61271207+chakra146@users.noreply.github.com>

* Update CredScanSuppressions.json

* Update Get-AzVpnSiteLinkConnectionIkeSa.md

* Update Get-AzVpnSiteLinkConnectionIkeSa.md

* Revert "Merge branch 'network-november' into vpn-ikesa"

This reverts commit 4ec8542, reversing
changes made to e97b15b.

Co-authored-by: Abhishek Shah <shabhis@microsoft.com>
Co-authored-by: litchiyangMSFT <64560090+litchiyangMSFT@users.noreply.github.com>
Co-authored-by: Himanshu Agarwal <hiaga@microsoft.com>
Co-authored-by: Sebastian Olsen <30187002+Spacebjorn@users.noreply.github.com>
Co-authored-by: jiansong-msft <77516279+jiansong-msft@users.noreply.github.com>
Co-authored-by: kceiw <hellomao@outlook.com>
Co-authored-by: erich-wang <eriwan@microsoft.com>
Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>
Co-authored-by: vidyadharijami <57709079+vidyadharijami@users.noreply.github.com>
Co-authored-by: Alexander Schmidt <32797407+devdeer-alex@users.noreply.github.com>
Co-authored-by: Damien Caro <dcaro@microsoft.com>
Co-authored-by: Dingmeng Xue <dixue@microsoft.com>
Co-authored-by: Jin Lei <54836179+msJinLei@users.noreply.github.com>
Co-authored-by: Yeming Liu <yeliu@microsoft.com>
Co-authored-by: aim-for-better <zhenyu.zhou@microsoft.com>
Co-authored-by: Zhenyu Zhou <zhezhou@microsoft.com>
Co-authored-by: ThejaChoudary <57453616+ThejaChoudary@users.noreply.github.com>
Co-authored-by: Theodore Chang <thchan@microsoft.com>
Co-authored-by: Yunchi Wang <54880216+wyunchi-ms@users.noreply.github.com>
Co-authored-by: wyunchi-ms <yunwang@microsoft.com>
Co-authored-by: Adam Sandor <adsandor@microsoft.com>
Co-authored-by: najagasi <49212852+najagasi@users.noreply.github.com>
Co-authored-by: Namrata Jagasia <najagasi@microsoft.com>
Co-authored-by: msJinLei <leijin@microsoft.com>
Co-authored-by: digavino <48699384+digavino@users.noreply.github.com>
Co-authored-by: Yabo Hu <yabhu@microsoft.com>
Co-authored-by: Oleza1972 <63361762+Oleza1972@users.noreply.github.com>
Co-authored-by: Oleg Sternberg <olsternb@microsoft.com>
Co-authored-by: francescanarea <francesca@Narea.com>
Co-authored-by: Robert Lyon <35980532+rolyon@users.noreply.github.com>
Co-authored-by: Cameron Taggart <cameron.taggart@gmail.com>
Co-authored-by: Chris Eggert <pilor@users.noreply.github.com>
Co-authored-by: Youri970410 <62531040+Youri970410@users.noreply.github.com>
Co-authored-by: azurepowershell <azurepowershell@ms.com>
Co-authored-by: Wei Wei <weiwei@microsoft.com>
Co-authored-by: Christoph Bergmeister [MVP] <c.bergmeister@gmail.com>
Co-authored-by: Roman Khotsyn <rokhot@microsoft.com>
Co-authored-by: zesluo <zesluo@microsoft.com>
Co-authored-by: Jan David Narkiewicz <jdnark@gmail.com>
Co-authored-by: Martin Ehrnst <martin@ehrnst.no>
Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com>
Co-authored-by: Daniel Orozco <Daniel.Orozco@microsoft.com>
Co-authored-by: Gokul Premraj <gopremra@microsoft.com>
Co-authored-by: yemohyle <73853907+yemohyle@users.noreply.github.com>
Co-authored-by: Yeming Liu <felix_liu@outlook.com>
Co-authored-by: Jingshu923 <52914166+Jingshu923@users.noreply.github.com>
Co-authored-by: Shivam Tyagi <56990792+shivamT95-msft@users.noreply.github.com>
Co-authored-by: alunmj <alun@texis.com>
Co-authored-by: webguynj <webguynj@users.noreply.github.com>
Co-authored-by: Yannick Dils <62245199+yannickdils@users.noreply.github.com>
Co-authored-by: Filiz Topatan <fitopata@microsoft.com>
Co-authored-by: Ryan K <ryan.k@outlook.com>
Co-authored-by: kristynhamasaki <68716650+kristynhamasaki@users.noreply.github.com>
Co-authored-by: mahakjain314 <50352900+mahakjain314@users.noreply.github.com>
Co-authored-by: Mahak Jain <mahja@microsoft.com>
Co-authored-by: chakra146 <61271207+chakra146@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 34 changed files with 12,413 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Batch/Batch.Test/Batch.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.Azure.Batch" Version="13.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Batch" Version="11.0.0" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="7.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Compute/Compute.Test/Compute.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="43.0.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.ContainerRegistry" Version="4.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.6.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="5.6.0">
<NoWarn>NU1608</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/CosmosDB/CosmosDB.Test/CosmosDB.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.Test.props" />
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="Microsoft.Azure.Management.CosmosDB" Version="2.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Dns/Dns.Test/Dns.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/HDInsight/HDInsight.Test/HDInsight.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.Azure.Management.HDInsight.Job" Version="2.0.7" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
<PackageReference Include="Microsoft.Azure.Management.ManagedServiceIdentity" Version="0.11.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/HPCCache/HPCCache.Test/HPCCache.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.11.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="14.5.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/KeyVault.Test/KeyVault.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/Monitor.Test/Monitor.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Monitor" Version="0.25.3-preview" />
<PackageReference Include="Microsoft.Azure.Management.ApplicationInsights" Version="0.3.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles.Test/NetAppFiles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.8.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Network/Network.Test/Network.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="201.359.57612" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.1.0-preview.2" />
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
Expand Down
8 changes: 8 additions & 0 deletions src/Network/Network.Test/ScenarioTests/CortexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,13 @@ public void TestVpnConnectionPacketCapture()
{
TestRunner.RunTestScript("Test-VpnConnectionPacketCapture");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
public void TestVpnSiteLinkConnectionGetIkeSa()
{
TestRunner.RunTestScript("Test-VpnSiteLinkConnectionGetIkeSa");
}
}
}
213 changes: 212 additions & 1 deletion src/Network/Network.Test/ScenarioTests/CortexTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1289,4 +1289,215 @@ function Test-VHubRouteTableCRUD

Clean-ResourceGroup $rgname
}
}
}

function Test-VpnSiteLinkConnectionGetIkeSa
{
# Setup
$rgName = Get-ResourceName
$rglocation = Get-ProviderLocation ResourceManagement
$virtualWan1Name = Get-ResourceName
$virtualWan2Name = Get-ResourceName
$virtualHub1Name = Get-ResourceName
$virtualHub2Name = Get-ResourceName
$vpnSiteLink1Name = Get-ResourceName
$vpnSiteLink2Name = Get-ResourceName
$vpnSite1Name = Get-ResourceName
$vpnSite2Name = Get-ResourceName
$vpnGateway1Name = Get-ResourceName
$vpnGateway2Name = Get-ResourceName
$vpnSiteLinkConnection1Name = Get-ResourceName
$vpnSiteLinkConnection2Name = Get-ResourceName
$vpnConnection1Name = Get-ResourceName
$vpnConnection2Name = Get-ResourceName

try
{
# Create Resource Group
$resourceGroup = New-AzResourceGroup -Name $rgName -Location $rglocation

# Create and Get Virtual Wan 1
$createVirtualWan1 = New-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan1Name -Location $rglocation -AllowVnetToVnetTraffic -AllowBranchToBranchTraffic
$virtualWan1 = Get-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan1Name
Assert-AreEqual $rgName $virtualWan1.ResourceGroupName
Assert-AreEqual $virtualWan1Name $virtualWan1.Name

# Create and Get Virtual Hub 1
$createVirtualHub1 = New-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub1Name -Location $rglocation -AddressPrefix "192.168.1.0/24" -VirtualWan $virtualWan1
$virtualHub1 = Get-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub1Name
Assert-AreEqual $rgName $virtualHub1.ResourceGroupName
Assert-AreEqual $virtualHub1Name $virtualHub1.Name
Assert-AreEqual "192.168.1.0/24" $virtualHub1.AddressPrefix

# Create VPN Gateway 1
$createVpnGateway1Job = New-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway1Name -VirtualHub $virtualHub1 -VpnGatewayScaleUnit 3 -AsJob

# Create and Get Virtual Wan 2
$createVirtualWan2 = New-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan2Name -Location $rglocation -AllowVnetToVnetTraffic -AllowBranchToBranchTraffic
$virtualWan2 = Get-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan2Name
Assert-AreEqual $rgName $virtualWan2.ResourceGroupName
Assert-AreEqual $virtualWan2Name $virtualWan2.Name

# Create and Get Virtual Hub 2
$createVirtualHub2 = New-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub2Name -Location $rglocation -AddressPrefix "192.169.1.0/24" -VirtualWan $virtualWan2
$virtualHub2 = Get-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub2Name
Assert-AreEqual $rgName $virtualHub2.ResourceGroupName
Assert-AreEqual $virtualHub2Name $virtualHub2.Name
Assert-AreEqual "192.169.1.0/24" $virtualHub2.AddressPrefix

# Create VPN Gateway 2
$createVpnGateway2Job = New-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway2Name -VirtualHub $virtualHub2 -VpnGatewayScaleUnit 3 -AsJob

# Create and Get VPN Site 1 with Links
$vpnSite1AddressSpaces = New-Object string[] 1
$vpnSite1AddressSpaces[0] = "192.168.2.0/24"
$vpnSiteLink1 = New-AzVpnSiteLink -Name $vpnSiteLink1Name -IpAddress "5.5.5.5" -LinkProviderName "SomeTelecomProvider1" -LinkSpeedInMbps "10"

$createVpnSite1 = New-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite1Name -Location $rglocation -VirtualWan $virtualWan1 -AddressSpace $vpnSite1AddressSpaces -DeviceModel "SomeDevice1" -DeviceVendor "SomeDeviceVendor1" -VpnSiteLink @($vpnSiteLink1)
$vpnSite1 = Get-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite1Name
Assert-AreEqual $rgName $vpnSite1.ResourceGroupName
Assert-AreEqual $vpnSite1Name $vpnSite1.Name
Assert-AreEqual 1 $vpnSite1.VpnSiteLinks.Count

# Get VPN Gateway 1
$createVpnGateway1Job | Wait-Job
$gw1 = $createVpnGateway1Job | Receive-Job
$vpnGateway1 = Get-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway1Name
Assert-AreEqual $rgName $vpnGateway1.ResourceGroupName
Assert-AreEqual $vpnGateway1Name $vpnGateway1.Name
Assert-AreEqual 3 $vpnGateway1.VpnGatewayScaleUnit

# Create and Get VPN Connection 1 and VPN Site Link Connection 1
$sharedKeySecureString = ConvertTo-SecureString -String "abcd" -AsPlainText -Force

$vpnSiteLinkConnection1 = New-AzVpnSiteLinkConnection -Name $vpnSiteLinkConnection1Name -VpnSiteLink $vpnSite1.VpnSiteLinks[0] -SharedKey $sharedKeySecureString -ConnectionBandwidth 100
$createVpnConnection1 = New-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway1Name -Name $vpnConnection1Name -VpnSite $vpnSite1 -VpnSiteLinkConnection @($vpnSiteLinkConnection1)
$vpnConnection1 = Get-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway1Name -Name $vpnConnection1Name
Assert-AreEqual $vpnConnection1Name $vpnConnection1.Name
Assert-AreEqual 1 $vpnConnection1.VpnLinkConnections.Count

# Get IP Address of an Instance of VPN Gateway 1
$instanceIp1 = "0.0.0.0"
if ((Get-NetworkTestMode) -ne 'Playback')
{
$storetype = 'Standard_GRS'
$containerName = "cont1$($rgName)"
$storeName = "blob1" + $rgName
New-AzStorageAccount -ResourceGroupName $rgName -Name $storeName -Location $rglocation -Type $storetype
$key = Get-AzStorageAccountKey -ResourceGroupName $rgName -Name $storeName
$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value
New-AzStorageContainer -Name $containerName -Context $context
$container = Get-AzStorageContainer -Name $containerName -Context $context
$now = Get-Date
$vpnSite1ConfigFileName = "vpnSite1Config.json"
$blobSasUrl1 = New-AzStorageBlobSASToken -Container $containerName -Blob $vpnSite1ConfigFileName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
$sasUrl1 = Get-AzVirtualWanVpnConfiguration -VirtualWan $virtualWan1 -StorageSasUrl $blobSasUrl1 -VpnSite $vpnSite1

$configFile1 = Get-AzStorageBlobContent -Blob $vpnSite1ConfigFileName -Container $containerName -Context $context
$configFile1Data = (Get-Content $vpnSite1ConfigFileName -Raw) | ConvertFrom-Json
$instanceIp1 = $configFile1Data.vpnSiteConnections.gatewayConfiguration.IpAddresses.Instance0
}
Assert-NotNull $instanceIp1

# Create and Get VPN Site 2 with Links
$vpnSite2AddressSpaces = New-Object string[] 1
$vpnSite2AddressSpaces[0] = "192.169.2.0/24"
$vpnSiteLink2 = New-AzVpnSiteLink -Name $vpnSiteLink2Name -IpAddress $instanceIp1 -LinkProviderName "SomeTelecomProvider2" -LinkSpeedInMbps "10"

$createVpnSite2 = New-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite2Name -Location $rglocation -VirtualWan $virtualWan2 -AddressSpace $vpnSite2AddressSpaces -DeviceModel "SomeDevice2" -DeviceVendor "SomeDeviceVendor2" -VpnSiteLink @($vpnSiteLink2)
$vpnSite2 = Get-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite2Name
Assert-AreEqual $rgName $vpnSite2.ResourceGroupName
Assert-AreEqual $vpnSite2Name $vpnSite2.Name
Assert-AreEqual 1 $vpnSite2.VpnSiteLinks.Count

# Get VPN Gateway 1
$createVpnGateway2Job | Wait-Job
$gw2 = $createVpnGateway2Job | Receive-Job
$vpnGateway2 = Get-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway2Name
Assert-AreEqual $rgName $vpnGateway2.ResourceGroupName
Assert-AreEqual $vpnGateway2Name $vpnGateway2.Name
Assert-AreEqual 3 $vpnGateway2.VpnGatewayScaleUnit

# Create and Get VPN Connection 2 to Site with Links
$vpnSiteLinkConnection2 = New-AzVpnSiteLinkConnection -Name $vpnSiteLinkConnection2Name -VpnSiteLink $vpnSite2.VpnSiteLinks[0] -SharedKey $sharedKeySecureString -ConnectionBandwidth 100
$createVpnConnection2 = New-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway2Name -Name $vpnConnection2Name -VpnSite $vpnSite2 -VpnSiteLinkConnection @($vpnSiteLinkConnection2)
$vpnConnection2 = Get-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway2Name -Name $vpnConnection2Name
Assert-AreEqual $vpnConnection2Name $vpnConnection2.Name
Assert-AreEqual 1 $vpnConnection2.VpnLinkConnections.Count

# Get IP Address of an Instance of VPN Gateway 2
$instanceIp2 = "0.0.0.1"
if ((Get-NetworkTestMode) -ne 'Playback')
{
$storetype = 'Standard_GRS'
$containerName = "cont2$($rgName)"
$storeName = "blob2" + $rgName
New-AzStorageAccount -ResourceGroupName $rgName -Name $storeName -Location $rglocation -Type $storetype
$key = Get-AzStorageAccountKey -ResourceGroupName $rgName -Name $storeName
$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value
New-AzStorageContainer -Name $containerName -Context $context
$container = Get-AzStorageContainer -Name $containerName -Context $context
$now = Get-Date

$vpnSite2ConfigFileName = "vpnSite2Config.json"
$blobSasUrl2 = New-AzStorageBlobSASToken -Container $containerName -Blob $vpnSite2ConfigFileName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
$sasUrl2 = Get-AzVirtualWanVpnConfiguration -VirtualWan $virtualWan2 -StorageSasUrl $blobSasUrl2 -VpnSite $vpnSite2

$configFile2 = Get-AzStorageBlobContent -Blob $vpnSite2ConfigFileName -Container $containerName -Context $context
$configFile2Data = (Get-Content $vpnSite2ConfigFileName -Raw) | ConvertFrom-Json
$instanceIp2 = $configFile2Data.vpnSiteConnections.gatewayConfiguration.IpAddresses.Instance0
}
Assert-NotNull $instanceIp2

# Update IP Address of VPN Site Link 1
$vpnSiteLink1.IpAddress = $instanceIp2
Update-AzVpnSite -InputObject $vpnSite1 -VpnSiteLink $vpnSiteLink1
$vpnSite1 = Get-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite1Name

Start-Sleep -Seconds 350

# Get IKE Security Associations for VPN Site Link Connections
$ikesa1 = Get-AzVpnSiteLinkConnectionIkeSa -ResourceGroupName $rgName -VpnGatewayName $vpnGateway1Name -VpnConnectionName $vpnConnection1Name -Name $vpnSiteLinkConnection1Name
Assert-NotNull $ikesa1

$ikesa2 = Get-AzVpnSiteLinkConnectionIkeSa -InputObject $vpnConnection2.VpnLinkConnections[0]
Assert-NotNull $ikesa2

# Clean Resources
<#
$delete = Remove-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway1Name -Name $vpnConnection1Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVpnConnection -ResourceGroupName $rgName -ParentResourceName $vpnGateway2Name -Name $vpnConnection2Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway1Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVpnGateway -ResourceGroupName $rgName -Name $vpnGateway2Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite1Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVpnSite -ResourceGroupName $rgName -Name $vpnSite2Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub1Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVirtualHub -ResourceGroupName $rgName -Name $virtualHub2Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan1Name -Force -PassThru
Assert-AreEqual $True $delete
$delete = Remove-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWan2Name -Force -PassThru
Assert-AreEqual $True $delete
#>
}
finally
{
Clean-ResourceGroup $rgname
}
}
Loading

0 comments on commit 5816106

Please sign in to comment.