Skip to content

Commit

Permalink
Merge pull request #19 from nekrassov01/feature#17
Browse files Browse the repository at this point in the history
Overwrite `ResourceId` with literal string after cleanup (#17)
  • Loading branch information
nekrassov01 authored Nov 9, 2021
2 parents 65c6d6c + e0106f0 commit f6cc67d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Functions/Invoke-PasmCleanUp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function Invoke-PasmCleanUp {
}
if ((!$eni) -or ($eni -and $eni.RequesterManaged -notcontains $true)) {
Remove-EC2SecurityGroup -GroupId $target.GroupId -Confirm:$false | Out-Null
$sg.ResourceId = 'cleaned'
}

$ret.Add(
Expand Down Expand Up @@ -118,6 +119,7 @@ function Invoke-PasmCleanUp {
}
}
Remove-EC2NetworkAcl -NetworkAclId $target.NetworkAclId -Confirm:$false | Out-Null
$nacl.ResourceId = 'cleaned'

$ret.Add(
[PSCustomObject]@{
Expand Down Expand Up @@ -169,6 +171,7 @@ function Invoke-PasmCleanUp {
}
}
Remove-EC2ManagedPrefixList -PrefixListId $pl.ResourceId -Confirm:$false | Out-Null
$pl.ResourceId = 'cleaned'

$ret.Add(
[PSCustomObject]@{
Expand Down

0 comments on commit f6cc67d

Please sign in to comment.