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()