Skip to content

Commit

Permalink
Update Subnet/SubnetSet API for DHCP changes (vmware-tanzu#878)
Browse files Browse the repository at this point in the history
The PR supports DHCP changes in NSX subnet.

Testing done:

Create Subnet with DHCPServer/DHCPDeactivated mode and create a vm on it
Create SubnetSet with DHCPServer/DHCPDeactivated mode and create a vm on it
Create a Subnet with DHCPServer and create a vm on it, switch from DHCPServer to DHCPDeactivated
Create a SubnetSet with DHCPServer and create a vm on it, switch from DHCPServer to DHCPDeactivated

Signed-off-by: Yanjun Zhou <[email protected]>
  • Loading branch information
yanjunz97 authored Nov 15, 2024
1 parent 828b8d8 commit 7b273b5
Show file tree
Hide file tree
Showing 15 changed files with 257 additions and 46 deletions.
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ github.com/vmware-tanzu/vm-operator/api v1.8.2/go.mod h1:vauVboD3sQxP+pb28TnI9wf
github.com/vmware/govmomi v0.27.4 h1:5kY8TAkhB20lsjzrjE073eRb8+HixBI29PVMG5lxq6I=
github.com/vmware/govmomi v0.27.4/go.mod h1:daTuJEcQosNMXYJOeku0qdBJP9SOLLWB3Mqz8THtv6o=
github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0 h1:pT+oqJ8FD5eUBQkl+e7LZwwtbwPvW5kDyyGXvt66gOM=
github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0/go.mod h1:f3+6YVZpNcK2pYyiQ94BoHWmjMj9BnYav0vNFuTiDVM=
github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0 h1:pSBxa9Agh6bgW8Hr0A1eQxuwnxGTnuAVox8iQb023hg=
Expand All @@ -155,6 +153,8 @@ github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20241113023437-
github.com/vmware/vsphere-automation-sdk-go/services/nsxt v0.0.0-20241113023437-5938c535c194/go.mod h1:M+J1qwzF4o7sAb/2VRu/edl1HLCdC++C4SNUrgiuGlQ=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20241113023437-5938c535c194 h1:m0ZD9SXLwI4Q+nljYfmNrOpveUGud0wKefGVHkPJTW8=
github.com/vmware/vsphere-automation-sdk-go/services/nsxt-mp v0.0.0-20241113023437-5938c535c194/go.mod h1:ugk9I4YM62SSAox57l5NAVBCRIkPQ1RNLb3URxyTADc=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/common/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestAllocateSubnetFromSubnetSet(t *testing.T) {
Return([]*model.VpcSubnet{})
ssp.(*pkg_mock.MockSubnetServiceProvider).On("GenerateSubnetNSTags", mock.Anything)
vsp.(*pkg_mock.MockVPCServiceProvider).On("ListVPCInfo", mock.Anything).Return([]servicecommon.VPCResourceInfo{{}})
ssp.(*pkg_mock.MockSubnetServiceProvider).On("CreateOrUpdateSubnet", mock.Anything, mock.Anything, mock.Anything).Return(expectedSubnetPath, nil)
ssp.(*pkg_mock.MockSubnetServiceProvider).On("CreateOrUpdateSubnet", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(expectedSubnetPath, nil)
},
expectedResult: expectedSubnetPath,
},
Expand Down
18 changes: 12 additions & 6 deletions pkg/controllers/subnet/subnet_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,14 @@ func (r *SubnetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
}
// Create or update the subnet in NSX
if _, err := r.SubnetService.CreateOrUpdateSubnet(subnetCR, vpcInfoList[0], tags); err != nil {
if errors.As(err, &nsxutil.ExceedTagsError{}) {
r.StatusUpdater.UpdateFail(ctx, subnetCR, err, "Tags limit exceeded", setSubnetReadyStatusFalse)
return ResultNormal, nil
if err != nil {
if errors.As(err, &nsxutil.ExceedTagsError{}) {
r.StatusUpdater.UpdateFail(ctx, subnetCR, err, "Tags limit exceeded", setSubnetReadyStatusFalse)
return ResultNormal, nil
}
r.StatusUpdater.UpdateFail(ctx, subnetCR, err, "Failed to create/update Subnet", setSubnetReadyStatusFalse)
return ResultRequeue, err
}
r.StatusUpdater.UpdateFail(ctx, subnetCR, err, "Failed to create/update Subnet", setSubnetReadyStatusFalse)
return ResultRequeue, err
}
// Update status
if err := r.updateSubnetStatus(subnetCR); err != nil {
Expand Down Expand Up @@ -213,11 +215,15 @@ func (r *SubnetReconciler) updateSubnetStatus(obj *v1alpha1.Subnet) error {

func setSubnetReadyStatusTrue(client client.Client, ctx context.Context, obj client.Object, transitionTime metav1.Time, _ ...interface{}) {
subnet := obj.(*v1alpha1.Subnet)
dhcpMode := subnet.Spec.SubnetDHCPConfig.Mode
if dhcpMode == "" {
dhcpMode = v1alpha1.DHCPConfigMode(v1alpha1.DHCPConfigModeDeactivated)
}
newConditions := []v1alpha1.Condition{
{
Type: v1alpha1.Ready,
Status: v1.ConditionTrue,
Message: "NSX Subnet has been successfully created/updated",
Message: fmt.Sprintf("NSX Subnet with %s has been successfully created/updated", dhcpMode),
Reason: "SubnetReady",
LastTransitionTime: transitionTime,
},
Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/subnetset/subnetset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func (r *SubnetSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}
}

// update SubnetSet tags if labels of namespace changed
nsxSubnets := r.SubnetService.SubnetStore.GetByIndex(servicecommon.TagScopeSubnetSetCRUID, string(subnetsetCR.UID))
if len(nsxSubnets) > 0 {
// update SubnetSet tags if labels of namespace changed
tags := r.SubnetService.GenerateSubnetNSTags(subnetsetCR)
if tags == nil {
log.Error(nil, "Failed to generate SubnetSet tags", "SubnetSet", req.NamespacedName)
Expand All @@ -125,8 +125,8 @@ func (r *SubnetSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
r.StatusUpdater.UpdateFail(ctx, subnetsetCR, err, "Exceed tags limit", setSubnetSetReadyStatusFalse)
return ResultNormal, nil
}
if err := r.SubnetService.UpdateSubnetSetTags(subnetsetCR.Namespace, nsxSubnets, tags); err != nil {
r.StatusUpdater.UpdateFail(ctx, subnetsetCR, err, "Failed to update SubnetSet tags", setSubnetSetReadyStatusFalse)
if err := r.SubnetService.UpdateSubnetSet(subnetsetCR.Namespace, nsxSubnets, tags, string(subnetsetCR.Spec.SubnetDHCPConfig.Mode)); err != nil {
r.StatusUpdater.UpdateFail(ctx, subnetsetCR, err, "Failed to update SubnetSet", setSubnetSetReadyStatusFalse)
return ResultRequeue, nil
}
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/subnetset/subnetset_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ func TestReconcile(t *testing.T) {
},
},
{
// return nil and not requeue when UpdateSubnetSetTags failed
name: "Create a SubnetSet failed to UpdateSubnetSetTags",
// return nil and requeue when UpdateSubnetSet failed
name: "Create a SubnetSet failed to UpdateSubnetSet",
expectRes: ResultRequeue,
expectErrStr: "",
patches: func(r *SubnetSetReconciler) *gomonkey.Patches {
Expand Down Expand Up @@ -226,8 +226,8 @@ func TestReconcile(t *testing.T) {
return tags
})

// UpdateSubnetSetTags
patches.ApplyMethod(reflect.TypeOf(r.SubnetService), "UpdateSubnetSetTags", func(_ *subnet.SubnetService, ns string, vpcSubnets []*model.VpcSubnet, tags []model.Tag) error {
// UpdateSubnetSet
patches.ApplyMethod(reflect.TypeOf(r.SubnetService), "UpdateSubnetSet", func(_ *subnet.SubnetService, ns string, vpcSubnets []*model.VpcSubnet, tags []model.Tag, dhcpMode string) error {
return nil
})
return patches
Expand Down
40 changes: 33 additions & 7 deletions pkg/nsx/services/subnet/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package subnet

import (
"fmt"
"strings"

"github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -53,35 +54,49 @@ func convertAccessMode(accessMode string) string {
return accessMode
}

func (service *SubnetService) buildSubnet(obj client.Object, tags []model.Tag) (*model.VpcSubnet, error) {
func (service *SubnetService) buildSubnet(obj client.Object, tags []model.Tag, useLegacyAPI bool) (*model.VpcSubnet, error) {
tags = append(service.buildBasicTags(obj), tags...)
var nsxSubnet *model.VpcSubnet
var staticIpAllocation bool
switch o := obj.(type) {
case *v1alpha1.Subnet:
enableDhcp := (o.Spec.SubnetDHCPConfig.Mode != "" && o.Spec.SubnetDHCPConfig.Mode != v1alpha1.DHCPConfigMode(v1alpha1.DHCPConfigModeDeactivated))
staticIpAllocation = (o.Spec.SubnetDHCPConfig.Mode == "" || o.Spec.SubnetDHCPConfig.Mode == v1alpha1.DHCPConfigMode(v1alpha1.DHCPConfigModeDeactivated))
nsxSubnet = &model.VpcSubnet{
Id: String(service.BuildSubnetID(o)),
AccessMode: String(convertAccessMode(util.Capitalize(string(o.Spec.AccessMode)))),
Ipv4SubnetSize: Int64(int64(o.Spec.IPv4SubnetSize)),
DhcpConfig: service.buildDHCPConfig(enableDhcp),
DisplayName: String(service.buildSubnetName(o)),
}
staticIpAllocation = !enableDhcp
dhcpMode := string(o.Spec.SubnetDHCPConfig.Mode)
if dhcpMode == "" {
dhcpMode = v1alpha1.DHCPConfigModeDeactivated
}
if useLegacyAPI {
nsxSubnet.DhcpConfig = service.buildDHCPConfig(dhcpMode != v1alpha1.DHCPConfigModeDeactivated)
} else {
nsxSubnet.SubnetDhcpConfig = service.buildSubnetDHCPConfig(dhcpMode)
}
nsxSubnet.IpAddresses = o.Spec.IPAddresses
case *v1alpha1.SubnetSet:
// The index is a random string with the length of 8 chars. It is the first 8 chars of the hash
// value on a random UUID string.
enableDhcp := (o.Spec.SubnetDHCPConfig.Mode != "" && o.Spec.SubnetDHCPConfig.Mode != v1alpha1.DHCPConfigMode(v1alpha1.DHCPConfigModeDeactivated))
staticIpAllocation = (o.Spec.SubnetDHCPConfig.Mode == "" || o.Spec.SubnetDHCPConfig.Mode == v1alpha1.DHCPConfigMode(v1alpha1.DHCPConfigModeDeactivated))
index := util.GetRandomIndexString()
nsxSubnet = &model.VpcSubnet{
Id: String(service.buildSubnetSetID(o, index)),
AccessMode: String(convertAccessMode(util.Capitalize(string(o.Spec.AccessMode)))),
Ipv4SubnetSize: Int64(int64(o.Spec.IPv4SubnetSize)),
DhcpConfig: service.buildDHCPConfig(enableDhcp),
DisplayName: String(service.buildSubnetSetName(o, index)),
}
staticIpAllocation = !enableDhcp
dhcpMode := string(o.Spec.SubnetDHCPConfig.Mode)
if dhcpMode == "" {
dhcpMode = v1alpha1.DHCPConfigModeDeactivated
}
if useLegacyAPI {
nsxSubnet.DhcpConfig = service.buildDHCPConfig(dhcpMode != v1alpha1.DHCPConfigModeDeactivated)
} else {
nsxSubnet.SubnetDhcpConfig = service.buildSubnetDHCPConfig(dhcpMode)
}
default:
return nil, SubnetTypeError
}
Expand All @@ -108,6 +123,17 @@ func (service *SubnetService) buildDHCPConfig(enableDHCP bool) *model.VpcSubnetD
return dhcpConfig
}

func (service *SubnetService) buildSubnetDHCPConfig(mode string) *model.SubnetDhcpConfig {
// Trasfer DHCPDeactivated to DHCP_DEACTIVATED
nsxMode := strings.ToUpper(mode)
nsxMode = nsxMode[:4] + "_" + nsxMode[4:]

subnetDhcpConfig := &model.SubnetDhcpConfig{
Mode: &nsxMode,
}
return subnetDhcpConfig
}

func (service *SubnetService) buildBasicTags(obj client.Object) []model.Tag {
return util.BuildBasicTags(getCluster(service), obj, "")
}
48 changes: 48 additions & 0 deletions pkg/nsx/services/subnet/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ package subnet
import (
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/vmware/vsphere-automation-sdk-go/services/nsxt/model"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"

"github.com/vmware-tanzu/nsx-operator/pkg/apis/vpc/v1alpha1"
"github.com/vmware-tanzu/nsx-operator/pkg/config"
mock_client "github.com/vmware-tanzu/nsx-operator/pkg/mock/controller-runtime/client"
"github.com/vmware-tanzu/nsx-operator/pkg/nsx/services/common"
)

Expand Down Expand Up @@ -60,3 +64,47 @@ func TestBuildSubnetSetName(t *testing.T) {
expId := "pod-default_28e85c0b-21e4-4cab-b1c3-597639dfe752_0c5d588b"
assert.Equal(t, expId, id)
}

func TestBuildSubnetForSubnetSet(t *testing.T) {
mockCtl := gomock.NewController(t)
k8sClient := mock_client.NewMockClient(mockCtl)
defer mockCtl.Finish()
service := &SubnetService{
Service: common.Service{
Client: k8sClient,
NSXConfig: &config.NSXOperatorConfig{
CoeConfig: &config.CoeConfig{
Cluster: "k8scl-one:test",
},
},
},
SubnetStore: &SubnetStore{
ResourceStore: common.ResourceStore{
Indexer: cache.NewIndexer(keyFunc, cache.Indexers{
common.TagScopeSubnetCRUID: subnetIndexFunc,
common.TagScopeSubnetSetCRUID: subnetSetIndexFunc,
common.TagScopeVMNamespace: subnetIndexVMNamespaceFunc,
common.TagScopeNamespace: subnetIndexNamespaceFunc,
}),
BindingType: model.VpcSubnetBindingType(),
},
},
}
tags := []model.Tag{
{
Scope: common.String("nsx-op/namespace"),
Tag: common.String("ns-1"),
},
}
subnetSet := &v1alpha1.SubnetSet{
ObjectMeta: v1.ObjectMeta{
Name: "subnetset-1",
Namespace: "ns-1",
},
}
subnet, err := service.buildSubnet(subnetSet, tags, true)
assert.Nil(t, err)
assert.Equal(t, false, *subnet.DhcpConfig.EnableDhcp)
assert.Nil(t, subnet.SubnetDhcpConfig)
assert.Equal(t, true, *subnet.AdvancedConfig.StaticIpAllocation.Enabled)
}
7 changes: 4 additions & 3 deletions pkg/nsx/services/subnet/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ func (subnet *Subnet) Key() string {
}

func (subnet *Subnet) Value() data.DataValue {
// IPv4SubnetSize/AccessMode/IPAddresses/DHCPConfig are immutable field,
// Only changes of tags are considered as changed.
// IPv4SubnetSize/AccessMode/IPAddresses are immutable field,
// Changes of tags and subnetDHCPConfig are considered as changed.
// TODO AccessMode may also need to be compared in future.
s := &Subnet{
Tags: subnet.Tags,
Tags: subnet.Tags,
SubnetDhcpConfig: subnet.SubnetDhcpConfig,
}
dataValue, _ := (*model.VpcSubnet)(s).GetDataValue__()
return dataValue
Expand Down
61 changes: 51 additions & 10 deletions pkg/nsx/services/subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ var (
ResourceTypeSubnet = common.ResourceTypeSubnet
NewConverter = common.NewConverter
// Default static ip-pool under Subnet.
SubnetTypeError = errors.New("unsupported type")
SubnetTypeError = errors.New("unsupported type")
ErrorCodeUnrecognizedField = int64(287)
)

type SubnetService struct {
common.Service
SubnetStore *SubnetStore
SubnetStore *SubnetStore
useLegacyAPI bool
}

// SubnetParameters stores parameters to CRUD Subnet object
Expand Down Expand Up @@ -81,9 +83,22 @@ func InitializeSubnetService(service common.Service) (*SubnetService, error) {
return subnetService, nil
}

func (service *SubnetService) CreateOrUpdateSubnet(obj client.Object, vpcInfo common.VPCResourceInfo, tags []model.Tag) (string, error) {
func (service *SubnetService) CreateOrUpdateSubnet(obj client.Object, vpcInfo common.VPCResourceInfo, tags []model.Tag) (subnetPath string, err error) {
if subnetPath, err = service.createOrUpdateSubnetWithAPI(obj, vpcInfo, tags, service.useLegacyAPI); err != nil {
if nsxErr, ok := err.(*nsxutil.NSXApiError); ok {
if *nsxErr.ErrorCode == ErrorCodeUnrecognizedField {
log.Info("NSX does not support subnet_dhcp_config, using old API", "error", err)
service.useLegacyAPI = true
subnetPath, err = service.createOrUpdateSubnetWithAPI(obj, vpcInfo, tags, service.useLegacyAPI)
}
}
}
return subnetPath, err
}

func (service *SubnetService) createOrUpdateSubnetWithAPI(obj client.Object, vpcInfo common.VPCResourceInfo, tags []model.Tag, useLegacyAPI bool) (string, error) {
uid := string(obj.GetUID())
nsxSubnet, err := service.buildSubnet(obj, tags)
nsxSubnet, err := service.buildSubnet(obj, tags, useLegacyAPI)
if err != nil {
log.Error(err, "Failed to build Subnet")
return "", err
Expand All @@ -97,9 +112,13 @@ func (service *SubnetService) CreateOrUpdateSubnet(obj client.Object, vpcInfo co
} else {
changed = common.CompareResource(SubnetToComparable(existingSubnet), SubnetToComparable(nsxSubnet))
if changed {
// Only tags are expected to be updated
// Only tags and dhcp are expected to be updated
// inherit other fields from the existing Subnet
existingSubnet.Tags = nsxSubnet.Tags
if existingSubnet.SubnetDhcpConfig != nil {
existingSubnet.SubnetDhcpConfig = nsxSubnet.SubnetDhcpConfig
existingSubnet.AdvancedConfig.StaticIpAllocation.Enabled = nsxSubnet.AdvancedConfig.StaticIpAllocation.Enabled
}
nsxSubnet = existingSubnet
}
}
Expand Down Expand Up @@ -388,11 +407,15 @@ func (service *SubnetService) GenerateSubnetNSTags(obj client.Object) []model.Ta
return tags
}

func (service *SubnetService) UpdateSubnetSetTags(ns string, vpcSubnets []*model.VpcSubnet, tags []model.Tag) error {
func (service *SubnetService) UpdateSubnetSet(ns string, vpcSubnets []*model.VpcSubnet, tags []model.Tag, dhcpMode string) error {
if dhcpMode == "" {
dhcpMode = v1alpha1.DHCPConfigModeDeactivated
}
staticIpAllocation := (dhcpMode == v1alpha1.DHCPConfigModeDeactivated)
for i, vpcSubnet := range vpcSubnets {
subnetSet := &v1alpha1.SubnetSet{}
var name string

// Generate new Subnet tags
matchNamespace := false
for _, t := range vpcSubnets[i].Tags {
tag := t
Expand All @@ -417,12 +440,30 @@ func (service *SubnetService) UpdateSubnetSetTags(ns string, vpcSubnets []*model
return fmt.Errorf("failed to get SubnetSet %s in Namespace %s: %w", name, ns, err)
}
newTags := append(service.buildBasicTags(subnetSet), tags...)
changed := common.CompareResource(SubnetToComparable(vpcSubnets[i]), SubnetToComparable(&model.VpcSubnet{Tags: newTags}))

var updatedSubnet *model.VpcSubnet
if vpcSubnets[i].SubnetDhcpConfig == nil {
updatedSubnet = &model.VpcSubnet{
Tags: newTags,
}
} else {
updatedSubnet = &model.VpcSubnet{
Tags: newTags,
SubnetDhcpConfig: service.buildSubnetDHCPConfig(dhcpMode),
}
}
changed := common.CompareResource(SubnetToComparable(vpcSubnets[i]), SubnetToComparable(updatedSubnet))
if !changed {
log.Info("NSX Subnet tags unchanged, skipping update", "subnet", *vpcSubnet.Id)
log.Info("NSX Subnet unchanged, skipping update", "Subnet", *vpcSubnet.Id)
continue
}

vpcSubnets[i].Tags = newTags
// Update the SubnetSet DHCP Config
if vpcSubnets[i].SubnetDhcpConfig != nil {
vpcSubnets[i].SubnetDhcpConfig = service.buildSubnetDHCPConfig(dhcpMode)
vpcSubnets[i].AdvancedConfig.StaticIpAllocation.Enabled = &staticIpAllocation
}

vpcInfo, err := common.ParseVPCResourcePath(*vpcSubnets[i].Path)
if err != nil {
Expand All @@ -432,7 +473,7 @@ func (service *SubnetService) UpdateSubnetSetTags(ns string, vpcSubnets []*model
if _, err := service.createOrUpdateSubnet(subnetSet, vpcSubnets[i], &vpcInfo); err != nil {
return fmt.Errorf("failed to update Subnet %s in SubnetSet %s: %w", *vpcSubnet.Id, subnetSet.Name, err)
}
log.Info("Successfully updated SubnetSet tags", "subnetSet", subnetSet, "Subnet", *vpcSubnet.Id)
log.Info("Successfully updated SubnetSet", "subnetSet", subnetSet, "Subnet", *vpcSubnet.Id)
}
return nil
}
Expand Down
Loading

0 comments on commit 7b273b5

Please sign in to comment.