sassoftware / viya4-iac-aws

This project contains Terraform configuration files to provision infrastructure components required to deploy SAS Viya platform products products on Amazon AWS.
Apache License 2.0
39 stars 45 forks source link

Question: deploying IaC while reusing same subnet for multiple purposes #291

Open miaeyg opened 6 months ago

miaeyg commented 6 months ago

Terraform Version Details

No response

Terraform Variable File Details

No response

Steps to Reproduce

I am working with a customer on deploying using this IaC tool using BYON scenario #2 however the customer wants to have two "private" subnets with "/18" CIDRs (each in one AZ) and no additional subnets. So question is whether it is possible to point the "control_panel" + "database" Terraform variables subnets to the "private" subnets or must they have their own dedicated subnets?

Expected Behavior

That this will work

Actual Behavior

Not tested but not sure whether this is supposed to work or not

Additional Context

No response

References

No response

Code of Conduct

dhoucgitter commented 3 months ago

Hi @miaeyg, While it is possible to configure IaC to use two private subnets for the EKS cluster in the manner that your described, Viya does not officially support execution with that configuration. I removed the bug tag since this is a scenario question, not a bug.

miaeyg commented 3 months ago

Hi @dhoucgitter

Thanks for replying. That was not the question :) I will explain again the question: let's say customer wants to deploy SAS into just one single "private" subnet so no separate "control plane" or "database" subnets - everything in one single subnet. Now, I know the control plane and database require two subnets in two different AZs and it is agreed with the customer that we can create an additional subnet in another AZ but this additional subnet will just to satisfy this requirement and no more than that. Is this supported by IaC?

The practical meaning is that in the "subnet_ids" definition all subnets will point to a single subnet-id and some like control-plane will have this additional subnet in the other AZ like this (note how all definitions point to the same "subnet-id-az1"):

subnet_ids = {
  "private" : ["subnet-id-az1"],
  "control_plane" : ["subnet-id-az1", "subnet-id-az2"]
  "database" : ["subnet-id-az1", "subnet-id-az2"]
}