File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package publicips
1818
1919import (
2020 "context"
21+ "strings"
2122
2223 "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4"
2324 "github.com/pkg/errors"
@@ -151,6 +152,12 @@ func (s *Service) Delete(ctx context.Context) error {
151152// isIPManaged returns true if the IP has an owned tag with the cluster name as value,
152153// meaning that the IP's lifecycle is managed.
153154func (s * Service ) isIPManaged (ctx context.Context , spec azure.ResourceSpecGetter ) (bool , error ) {
155+ if strings .EqualFold (s .Scope .CloudEnvironment (), azure .StackCloudName ) {
156+ // Azure Stack does not yet support getting tags with scope,
157+ // so assume IPs are managed.
158+ return true , nil
159+ }
160+
154161 scope := azure .PublicIPID (s .Scope .SubscriptionID (), spec .ResourceGroupName (), spec .ResourceName ())
155162 result , err := s .TagsGetter .GetAtScope (ctx , scope )
156163 if err != nil {
You can’t perform that action at this time.
0 commit comments