Skip to content

Commit

Permalink
Set Instance Type on CLI in createami command
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Smith <seaam@amazon.com>
  • Loading branch information
sean-smith committed Jun 27, 2019
1 parent a021ffd commit 732d628
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cli/pcluster/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ def _get_parser():
help="Specifies the OS of the base AMI. "
"Valid options are: alinux, ubuntu1404, ubuntu1604, centos6, centos7.",
)
pami.add_argument(
"-i",
"--instance-type",
dest="instance_type",
default="t2.xlarge",
help="Sets instance type to build the ami on. Defaults to t2.xlarge.",
)
pami.add_argument(
"-ap",
"--ami-name-prefix",
Expand Down
2 changes: 1 addition & 1 deletion cli/pcluster/pcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ def create_ami(args):
LOGGER.debug("Building AMI based on args %s", str(args))
results = {}

instance_type = "t2.large"
instance_type = args.instance_type
try:
config = cfnconfig.ParallelClusterConfig(args)

Expand Down

0 comments on commit 732d628

Please sign in to comment.