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

[MM-61113] Allow multiple customizable subnets #833

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

fmartingr
Copy link
Contributor

@fmartingr fmartingr commented Oct 16, 2024

Summary

  • deployer config changes:
    • ClusterSubnetID -> ClusterSubnetIDs
    • ElasticsearchSettings.VPCID removed in favor of ClusterVpcId
  • All resources are now matched with the selected VPC, following this logic:
    • If ClusterVPCIDs is not set, we use the first ubnet filtered from the aws_subnet.selected resource.
    • If ClusterVPCIDs is set, we use aws_subne.manual and manually pick an index from the resulting list for each resource that require a subnet to try and balance things out. RDS databases are sent all subnets. Check out this
  • Using aws_subnet.manual to get the subnet list to prevent terraform trying to destroy the subnets or (if used with random_shuffle) recreate all resources when there has been no changes.
  • Fixed a bug where we wouldn't wait for terraform stdout resulting in incomplete output from commands. 61f26c2

Ticket Link

https://mattermost.atlassian.net/browse/MM-61113

@fmartingr fmartingr marked this pull request as ready for review October 17, 2024 14:56
Copy link
Contributor

@streamer45 streamer45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! A couple of high-level comments.

  • deployer config changes:
    • ClusterVpcId -> ClusterVPCIDs

I don't see this change in here. I guess you meant ClusterSubnetID to ClusterSubnetIDs.

Also, is the implicit indexing driven by certain constraints or just simpler/quicker to implement? I am wondering whether a more structured setting could be easier/digestible (and potentially less error-prone) on the user side.

@fmartingr
Copy link
Contributor Author

Cool! A couple of high-level comments.

  • deployer config changes:

    • ClusterVpcId -> ClusterVPCIDs

I don't see this change in here. I guess you meant ClusterSubnetID to ClusterSubnetIDs.

Yeah, sorry. Edited.

Also, is the implicit indexing driven by certain constraints or just simpler/quicker to implement? I am wondering whether a more structured setting could be easier/digestible (and potentially less error-prone) on the user side.

What do you mean by this?

@streamer45
Copy link
Contributor

Also, is the implicit indexing driven by certain constraints or just simpler/quicker to implement? I am wondering whether a more structured setting could be easier/digestible (and potentially less error-prone) on the user side.

What do you mean by this?

Having the specific index of ClusterSubnetIDs refer to a resource type feels perhaps a bit overengineered. Why not define an object with N named fields (one per resource type)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants