Skip to content

Commit 286771e

Browse files
authored
Add check for non-empty IPv6 CIDR block before updating state (#1683)
1 parent 586a8f9 commit 286771e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pkg/controller/infrastructure/infraflow/reconcile.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ func (c *FlowContext) ensureManagedVpc(ctx context.Context) error {
232232

233233
if current != nil {
234234
c.state.Set(IdentifierVPC, current.VpcId)
235-
c.state.Set(IdentifierVpcIPv6CidrBlock, current.IPv6CidrBlock)
235+
if current.IPv6CidrBlock != "" {
236+
c.state.Set(IdentifierVpcIPv6CidrBlock, current.IPv6CidrBlock)
237+
}
236238
_, err := c.updater.UpdateVpc(ctx, desired, current)
237239
if err != nil {
238240
return err

0 commit comments

Comments
 (0)