Skip to content

Commit

Permalink
Only require account ID when git refs are used
Browse files Browse the repository at this point in the history
When --json-regions and --json-template are used (and the git ref args
are not) the account ID argument is unused.

Signed-off-by: Tim Lane <[email protected]>
  • Loading branch information
Tim Lane authored and rexcsn committed Mar 1, 2021
1 parent c7df59d commit 7149af0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions util/generate-ami-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,18 @@ def parse_args():
parser.add_argument(
"--partition", type=str, help="commercial | china | govcloud", required=True, choices=PARTITIONS
)
parser.add_argument("--account-id", type=str, help="AWS account id owning the AMIs", required=True)
parser.add_argument("--account-id", type=str, help="AWS account id owning the AMIs", required=False)
parser.add_argument(
"--cloudformation-template",
type=str,
help="path to output cloudfomation template",
required=False,
default="cloudformation/aws-parallelcluster.cfn.json",
)
return parser.parse_args()
args = parser.parse_args()
if args.cookbook_git_ref and args.node_git_ref and not args.account_id:
raise Exception("Must specify value for --account-id when using --cookbook-git-ref and --node-git-ref.")
return args


def main():
Expand Down

0 comments on commit 7149af0

Please sign in to comment.