Skip to content

The ACK EC2 Controller modifies the object spec #2639

@stefanescualexandrumihai

Description

Describe the bug
I encountered an issue while adopting a TGW Attachment.
Initially, after the adoption process, the spec looked like this:

spec:
  options:
    applianceModeSupport: disable
    dnsSupport: enable
    ipv6Support: disable
    securityGroupReferencingSupport: enable
  subnetIDs:
  - subnet-1234
  - subnet-4321
  tags:
  - key: Name
    value: dummy-tgw-attach2
  transitGatewayID: tgw-1234
  vpcID: vpc-12345

Afterwards, I've tried to apply my spec:

spec:
  options:
    applianceModeSupport: disable
    dnsSupport: enable
    ipv6Support: disable
    securityGroupReferencingSupport: enable
  subnetRefs:
    - from:
        name: dummy-subnet
    - from:
        name: dummy-subnet2
  tags:
  - key: Name
    value: dummy-tgw-attach2
  transitGatewayID: tgw-1234
  vpcID: vpc-12345

Almost same spec, except that I changed the subnetIDs field with subnetRefs.
The EC2 controller tried to apply both.

spec:
  options:
    applianceModeSupport: disable
    dnsSupport: enable
    ipv6Support: disable
    securityGroupReferencingSupport: enable
  subnetIDs:
  - subnet-1234
  - subnet-4321
  subnetRefs:
  - from:
      name: dummy-subnet
  - from:
      name: dummy-subnet2
  tags:
  - key: Name
    value: dummy-tgw-attach2
  transitGatewayID: tgw-1234
  vpcID: vpc-12345
status:
  ackResourceMetadata:
    ownerAccountID: "1234567890"
    region: us-east-1
  conditions:
  - lastTransitionTime: "2025-09-23T12:18:52Z"
    message: Reference resolution failed
    reason: 'both resource reference wrapper and ID cannot be used together: SubnetIDs,SubnetRefs'
    status: Unknown
    type: ACK.ReferencesResolved
  creationTime: "2025-09-23T08:52:46Z"
  id: tgw-attach-052e6c9f9052b13db
  state: available
  vpcOwnerID: "1234567890"

Expected outcome

The ACK EC2 Controller accepts both subnetRefs and subnetIDs / do not add additional fields.

Environment

  • Kubernetes version 1.31
  • Using EKS (yes/no), if so version? 1.31
  • AWS service targeted (S3, RDS, etc.) lambda-controller:1.6.2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions