Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RouteTable Subnet Assocation Selector support for multiple subnets #586

Closed
enderv opened this issue Mar 9, 2021 · 3 comments
Closed

RouteTable Subnet Assocation Selector support for multiple subnets #586

enderv opened this issue Mar 9, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@enderv
Copy link
Contributor

enderv commented Mar 9, 2021

What problem are you facing?

For RouteTables if you are using the subnetIdSelector in associations you must list multiple associations to get multiple subnets. Ideally you would be able to get all matches in one reference instead of having to make each subnet with unique labels so you can reference them.

Current example from composition I am building:

kind: RouteTable
spec:
  forProvider:
    tags:
      - key: Name
    vpcIdSelector:
      matchControllerRef: true
    routes:
      - destinationCidrBlock: 0.0.0.0/0
        gatewayIdSelector:
          matchControllerRef: true
    associations:
      - subnetIdSelector:
          matchLabels:
            visibility: public
            zone: zoneA
      - subnetIdSelector:
          matchLabels:
            visibility: public
            zone: zoneB
  deletionPolicy: Delete

Ideally it would be something like this and for this example get all public labeled subnets in the composition.

apiVersion: ec2.aws.crossplane.io/v1beta1
kind: RouteTable
spec:
  forProvider:
    tags:
      - key: Name
    vpcIdSelector:
      matchControllerRef: true
    routes:
      - destinationCidrBlock: 0.0.0.0/0
        gatewayIdSelector:
          matchControllerRef: true
    associations:
      - subnetIdSelector:
          matchControllerRef: true
          matchLabels:
            visibility: public

How could Crossplane help solve your problem?

@enderv enderv added the enhancement New feature or request label Mar 9, 2021
@MisterMX
Copy link
Collaborator

MisterMX commented Aug 4, 2023

This will be difficult to implement as every item in spec.forProvider.associations stores only a single subnetId which makes it difficult to track multiple subnets without altering the whole array and risking an update loop with existing MRs.

Closing this now since I highly doubt that this will be implemented.

@MisterMX MisterMX closed this as completed Aug 4, 2023
@pjanouse
Copy link

I'm coming here because I've been dealing with the same issue... My idea was that Subnet selection based on its label(s) works like a filter and each Subnet which qualifies will have attached this RouteTable instead of implicit one.

In current form this doesn't make sense - the deployment can be a dynamic and more subnets can be attached to VPC over the time... in that case I need a simple mechanism how to say Crossplane which Subnet should have which RouteTable (with proper Policy) - currently matching by unique label(s) or unique name is equivalent way without any additional value... In both cases I need one matching block per Subnet currently.

tektondeploy pushed a commit to gtn3010/provider-aws that referenced this issue Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants