ioos / Cloud-Sandbox

IOOS' Coastal Modeling Cloud Sandbox provides a framework for developing, modifying and running models in the cloud. It provides repeatable configurations, model code and required libraries, input data and analysis of model outputs. The Sandbox supports not only the development of services and models, but also Cloud HPC to run and validate models.
https://www-sandbox.ioos.us/
BSD 3-Clause "New" or "Revised" License
15 stars 12 forks source link

Allow creation of a new subnet within existing VPC #54

Closed mwengren closed 1 year ago

mwengren commented 1 year ago

This simplifies main.tf, and also allows the option to auto-create a new subnet within an existing empty VPC.

The head_node_ip variable is a WIP and isn't currently used.

mwengren commented 1 year ago

This is the version of the terraform I was able to run to deploy the currently running head_node instance last week.

I don't think there's anything regressive in here. If we could merge this and work from here to update the code to properly map an existing IP address from the designated VPC range to the head_node instance, that would be great.

mwengren commented 1 year ago

I'm going to go ahead and merge this based on discussion during today's meeting. This shouldn't break anything AFAICT - possible exception of eliminating the dual aws_network_interfaces, although having an EFA and non-EFA equivalent doesn't seem necessary when only one is used for the head node.

Note: these changes also automatically create the aws_internet_gateway, aws_route_table, and aws_route_table_association even if using an existing VPC, as these were needed to successfully deploy on the NOAA AWS environment as provided and set up the proper networking to log on to the instance.