diff --git a/atmos.py b/atmos.py index 37359d7..b63ad82 100755 --- a/atmos.py +++ b/atmos.py @@ -8,7 +8,7 @@ def main(argv): g.add_argument("command", help="Send commands to terraform with workspace variable context", nargs='?', default=False) parser.add_argument("-e", help="Gather shared-creds from environment variables (Dont use this flag if you dont want your ~/.aws/credentials replaced. This is for CI/CD", action='store_true', default=False) parser.add_argument("-m", help="Prevents workspace from changing with git branches automatically", action='store_true', default=False) - parser.add_argument("-p", help="Atmos will not add -var-file or -var args to terraform", action='store_true', default=False) + parser.add_argument("-n", help="Atmos will not add -var-file or -var args to terraform", action='store_true', default=False) args, params = parser.parse_known_args() if args.command: determine_actions(args, params) @@ -23,7 +23,7 @@ def determine_actions(args, params): env_actions = ["plan", "apply", "destroy"] # Commands that require env context cmd = 'terraform {args}'.format(args=args.command) - if (args.command in env_actions) and not (args.p): # Append with env context + if (args.command in env_actions) and not (args.n): # Append with env context cmd = cmd + ' -var-file=vars/{env}.tfvars -var "workspace={env}" -var "shared_credentials_file={aws_creds_file}"'.format(env=workspace, aws_creds_file=aws_creds_file) for param in params: # Pass terraform params directly through