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
18
18
19
19
import (
20
20
"context"
21
+ "strings"
21
22
22
23
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4"
23
24
"github.com/pkg/errors"
@@ -151,6 +152,12 @@ func (s *Service) Delete(ctx context.Context) error {
151
152
// isIPManaged returns true if the IP has an owned tag with the cluster name as value,
152
153
// meaning that the IP's lifecycle is managed.
153
154
func (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
+
154
161
scope := azure .PublicIPID (s .Scope .SubscriptionID (), spec .ResourceGroupName (), spec .ResourceName ())
155
162
result , err := s .TagsGetter .GetAtScope (ctx , scope )
156
163
if err != nil {
You can’t perform that action at this time.
0 commit comments