Skip to content

Commit

Permalink
Add warning about VPC usage charges in automation (#5170)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreambeyondorange committed Apr 7, 2023
1 parent b2d9274 commit 0780514
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cli/src/pcluster/cli/commands/configure/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,18 @@ def _create_vpc_parameters(scheduler, head_node_instance_type, compute_instance_
vpc_list = vpc_and_subnets["vpc_list"]
if not vpc_list:
print("There are no VPC for the given region. Starting automatic creation of VPC and subnets...")
if not vpc_list or prompt("Automate VPC creation? (y/n)", lambda x: x in ("y", "n"), default_value="n") == "y":
if (
not vpc_list
or prompt(
"The creation of the VPC will result in minimal charges for NAT gateway \n"
"creation using a public subnet that are not covered under the free tier.\n"
"Please refer to https://aws.amazon.com/vpc/pricing/ for more details.\n"
"Automate VPC creation? (y/n)",
lambda x: x in ("y", "n"),
default_value="n",
)
== "y"
):
vpc_parameters.update(
automate_vpc_with_subnet_creation(
_choose_network_configuration(scheduler, head_node_instance_type, compute_instance_types),
Expand Down

0 comments on commit 0780514

Please sign in to comment.