mirror of
https://github.com/actions/runner-images.git
synced 2025-12-28 20:58:32 +08:00
Add deprecation warning to GenerateResourcesAndImage helper (#8958)
This commit is contained in:
committed by
GitHub
parent
5bd6a16cab
commit
b0fc01efc6
@@ -97,8 +97,10 @@ Function GenerateResourcesAndImage {
|
||||
This parameter cannot be used in combination with the virtual_network_name packer parameter.
|
||||
.PARAMETER Force
|
||||
Delete the resource group if it exists without user confirmation.
|
||||
This parameter is deprecated and will be removed in a future release.
|
||||
.PARAMETER ReuseResourceGroup
|
||||
Reuse the resource group if it exists without user confirmation.
|
||||
This parameter is deprecated and will be removed in a future release.
|
||||
.PARAMETER OnError
|
||||
Specify how packer handles an error during image creation.
|
||||
Options:
|
||||
@@ -146,6 +148,10 @@ Function GenerateResourcesAndImage {
|
||||
[hashtable] $Tags = @{}
|
||||
)
|
||||
|
||||
if ($Force -or $ReuseResourceGroup) {
|
||||
Write-Warning "The `ReuseResourceGroup` and `Force` parameters are deprecated and will be removed in a future release. The resource group will be reused when it already exists and an error will be thrown when it doesn't. If you want to delete the resource group, please delete it manually."
|
||||
}
|
||||
|
||||
if ($Force -and $ReuseResourceGroup) {
|
||||
throw "Force and ReuseResourceGroup cannot be used together."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user