community
community copied to clipboard
Implement `update` functionality for `Subnet` resource
Is your feature request related to a problem?
ec2-controller supports Create/Delete functionality for Subnet resource, but not Update.
Describe the solution you'd like
I should be able to modify/update an ACK-managed Subnet resource using its controller
Describe alternatives you've considered
Updating resource myself using aws-sdk, cli, or console
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/close
@ack-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen. Provide feedback via https://github.com/aws-controllers-k8s/community. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/reopen
@brycahta: Reopened this issue.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Will prioritize update functionality related to Edit subnet settings in the Console. Note, for fields backed by modify-subnet-attribute You can only modify one attribute at a time.
Update: We are blocked on aligning Update functionality with Console due to older version of aws-sdk-go
The AWS Console 'Edit subnet settings' contains functionality (resource-based naming, DNS settings) that is not yet supported by the version of aws-sdk-go being used in code-generator, v1.42.0.
ModifySubnetAttribute input shape in aws-sdk-go v1.42.0:
"ModifySubnetAttributeRequest":{
"type":"structure",
"required":["SubnetId"],
"members":{
"AssignIpv6AddressOnCreation":{"shape":"AttributeBooleanValue"},
"MapPublicIpOnLaunch":{"shape":"AttributeBooleanValue"},
"SubnetId":{
"shape":"SubnetId",
"locationName":"subnetId"
},
"MapCustomerOwnedIpOnLaunch":{"shape":"AttributeBooleanValue"},
"CustomerOwnedIpv4Pool":{"shape":"CoipPoolId"}
}
}
latest ModifySubnetAttribute input shape:
"ModifySubnetAttributeRequest":{
"type":"structure",
"required":["SubnetId"],
"members":{
"AssignIpv6AddressOnCreation":{"shape":"AttributeBooleanValue"},
"MapPublicIpOnLaunch":{"shape":"AttributeBooleanValue"},
"SubnetId":{
"shape":"SubnetId",
"locationName":"subnetId"
},
"MapCustomerOwnedIpOnLaunch":{"shape":"AttributeBooleanValue"},
"CustomerOwnedIpv4Pool":{"shape":"CoipPoolId"},
"EnableDns64":{"shape":"AttributeBooleanValue"},
"PrivateDnsHostnameTypeOnLaunch":{"shape":"HostnameType"},
"EnableResourceNameDnsARecordOnLaunch":{"shape":"AttributeBooleanValue"},
"EnableResourceNameDnsAAAARecordOnLaunch":{"shape":"AttributeBooleanValue"},
"EnableLniAtDeviceIndex":{"shape":"Integer"},
"DisableLniAtDeviceIndex":{"shape":"AttributeBooleanValue"}
}
},
I can see some of these fields were added in v1.42.11:
service/ec2: Updates service API and documentation This release adds a new parameter ipv6Native to the allow creation of IPv6-only subnets using the CreateSubnet operation, and the operation ModifySubnetAttribute includes new parameters to modify subnet attributes to use resource-based naming and enable DNS resolutions for Private DNS name.
as well as in v1.42.16:
service/ec2: Updates service API and documentation This release adds support for Is4gen and Im4gn instances. This release also adds a new subnet attribute, enableLniAtDeviceIndex, to support local network interfaces, which are logical networking components that connect an EC2 instance to your on-premises network.
For now, I'll proceed with implementing Update for the current fields in ModifySubnetAttributeRequest v1.42.0. Feel free to chime in with feedback and/or plans to update aws-sdk-go in the future
per SIG meeting: will update to aws-sdk-go v1.44.93 (latest release) prior to this work.
- https://github.com/aws-controllers-k8s/code-generator/pull/362
- https://github.com/aws-controllers-k8s/runtime/pull/102
Closing as completed.