def get_args(): ap = argparse.ArgumentParser(description='Query a CloudFormation stack for build and template parameters', add_help=False) ap.add_argument('stack_name', help='Name of the stack to query') arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Scale all ASGs in a stack back to their stack defaults', add_help=False) ap.add_argument('stack_name', help='Name of the stack') ap.add_argument('asg_names', nargs='*', help='Specific ASGs to turn off. If omitted, all ASGs in the stack will be turned off') arguments.add_security_control_group(ap) return ap.parse_args()
def parse_args(): ap = argparse.ArgumentParser(description='Update IAM elements: users, groups, roles, policies', add_help=False) ap.add_argument('basedir', help='Directory containing IAM elements files. See security/README for details') ap.add_argument('--iam-stack', default=None, help='Name of the IAM Cloudformation stack, if any.') arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Rotate access keys. Optionally save the new key and secret to your aws credentials file.', add_help=False) km = ap.add_argument_group('Key management') km.add_argument('--user', help='Rotate keys for specific user. Defaults to current user.') km.add_argument('--credentials', default=default_creds_file, help=arguments.generate_help('Location of the credentials file to modify.', default_creds_file)) km.add_argument('--no-persist', default=False, action='store_true', help='Do not persist key and secret to credentials file. Instead, print key and secret to stdout.') arguments.add_security_control_group(ap) # TODO: no dry-run option return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser( description="Updates an existing CloudFormation stack hosting a tiny ELK stack: 1 server for Logstash/Elasticsearch, 1 server for Kibana", add_help=False, ) req = ap.add_argument_group("Required") req.add_argument("stack_name", help="Name of the ELK stack to update`") req.add_argument("network_stack_name", help="Name of the network stack") st = ap.add_argument_group("Stack definitions") st.add_argument("--desc", help="Stack description.") st.add_argument("--server-key", help="Name of the key pair used to access the ELK server instances.") st.add_argument("--es-instance-type", help="Instance type for the Elasticsearch server.") st.add_argument("--kibana-instance-type", help="Instance type for the Kibana server.") arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Update a CloudFormation stack for logging IAM activity and API calls to an S3 bucket', add_help=False) req = ap.add_argument_group('Required arguments') req.add_argument("stack_name", help='Name of the iam stack to update') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', default=default_desc, help=arguments.generate_help('Stack description.', default_desc)) st.add_argument('--bucket', default=default_bucket, help=arguments.generate_help('Bucket name', default_bucket)) st.add_argument('--enable', type=bool, default=False, help='Enable API logging. Defaults to False') arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='''Update a CloudFormation stack created with 'create_service_stack'.''', add_help=False) req = ap.add_argument_group('Required') req.add_argument("stack_name", help='Name of the stack to update') req.add_argument('--bastion-key', required=True, help='Name of the key pair to access the bastion server.') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', help='Stack description.') st.add_argument('--bastion-type', help='Instance type of the Bastion server.') st.add_argument('--nat-type', help='Instance type of the NAT server.') arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Create a CloudFormation stack hosting a tiny ELK stack: 1 server for Logstash/Elasticsearch, 1 server for Kibana', add_help=False) req = ap.add_argument_group('Required') req.add_argument('stack_name', help='Name of the ELK stack to create') req.add_argument('network_stack_name', help='Name of the network stack') req.add_argument('--server-key', required=True, help='Name of the key pair used to access the ELK server instances.') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', default=default_desc, help=arguments.generate_help('Stack description.', default_desc)) st.add_argument('--es-instance-type', default=default_es_instance_type, help=arguments.generate_help('Instance type for the Elasticsearch server.', default_es_instance_type)) st.add_argument('--kibana-instance-type', default=default_kibana_instance_type, help=arguments.generate_help('Instance type for the Kibana server.', default_kibana_instance_type)) arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='''Update a CloudFormation stack created with 'create_vpc'.''', add_help=False) req = ap.add_argument_group('Required arguments') req.add_argument("stack_name", help='Name of the network stack to update') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', help='Stack description.') st.add_argument('--cidr', help='CIDR block of the VPC.') st.add_argument('--availability-zones', nargs='+', metavar='AZ', help='Space-separated list of availability zones to use. Will determine the number of subnets.') st.add_argument('--pub-size', type=int, metavar='SIZE', help='Size of the public subnets.') st.add_argument('--priv-size', type=int, metavar='SIZE', help='Size of the private subnets.') arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Create a CloudFormation stack hosting a Consul cluster', add_help=False) req = ap.add_argument_group('Required') req.add_argument('stack_name', help='Name of the Consul stack to create') req.add_argument('network_stack_name', help='Name of the Network stack') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', help='Stack description.') st.add_argument('--consul-key', help='Name of the key pair used to access the Consul cluster instances.') st.add_argument('--instance-type', help='Instance type for the Consul servers.') st.add_argument('--ui-instance-type', help='Instance type for the Consul UI servers.') st.add_argument('--cluster_size', help='Number of instances in the Consul cluster. Should be an odd number > 1.') arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Create a VPC CloudFormation stack with N public and private subnets', add_help=False) req = ap.add_argument_group('Required arguments') req.add_argument("stack_name", help='Name of the network stack to create') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', default=default_desc, help=arguments.generate_help('Stack description.', default_desc)) st.add_argument('--cidr', default=default_cidr, help=arguments.generate_help('CIDR block of the VPC.', default_cidr)) st.add_argument('--availability-zones', default=default_azs, nargs='+', metavar='AZ', help=arguments.generate_help('Space-separated list of availability zones to use. Will determine the number of subnets.', default_azs)) st.add_argument('--pub-size', default=default_pub_size, type=int, metavar='SIZE', help=arguments.generate_help('Size of the public subnets.', default_pub_size)) st.add_argument('--priv-size', default=default_priv_size, type=int, metavar='SIZE', help=arguments.generate_help('Size of the private subnets.', default_priv_size)) arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Create a stack containing a NAT and Bastion server', add_help=False) req = ap.add_argument_group('Required') req.add_argument('stack_name', help='Name of the stack to create') req.add_argument('network_stack_name', help='Name of the network stack') req.add_argument('--bastion-key', required=True, help='Name of the key pair to access the bastion server.') st = ap.add_argument_group('Stack definitions') st.add_argument('--desc', default=default_desc, help=arguments.generate_help('Stack description.', default_desc)) st.add_argument('--bastion-type', default=default_bastion_type, help=arguments.generate_help('Instance type of the Bastion server.', default_bastion_type)) st.add_argument('--nat-type', default=default_nat_type, help=arguments.generate_help('Instance type of the NAT server.', default_nat_type)) arguments.add_deployment_group(ap) arguments.add_security_control_group(ap) return ap.parse_args()
def get_args(): ap = argparse.ArgumentParser(description='Delete a CloudFormation stack', add_help=False) ap.add_argument('stack_name', help='Name of the stack to delete') arguments.add_security_control_group(ap) return ap.parse_args()