<commit_before>require 'vpc_description'
require 'vpc_cfn_generator'
require 'cfn_executor'

describe 'manual test driver'  do
  it 'creates a default vpc', :three_az do
    vpc_description = VpcDescription.new(cidr_block: '192.168.0.0/16',
                                         azs_to_distribute_across: %w{us-east-1b us-east-1c us-east-1d})

    vpc_description.public_subnets = [
      { cidr_block: '192.168.10.0/24'},
      { cidr_block: '192.168.11.0/24'},
      { cidr_block: '192.168.12.0/24'}
    ]

    vpc_description.add_nat(nat_key_pair_name: 'nat_keypair',
                            nat_instance_type: 't2.small',
                            natted_subnets:[
                              { cidr_block: '192.168.20.0/24'},
                              { cidr_block: '192.168.21.0/24'},
                              { cidr_block: '192.168.22.0/24'}
                            ])

    vpc_description.add_bastion(bastion_key_pair_name: 'bastion_keypair',
                                bastion_instance_type: 't2.small',
                                bastion_ami: 'ami-b66ed3de',
                                allowed_ssh_source_ips: %w{172.16.17.32})


    vpc_cfn_generator = VpcCfnGenerator.new
    output = StringIO.new
    vpc_cfn_generator.emit vpc_description, output
    output.rewind

    CloudFormationExecutor.new.execute '3az-vpc', output
  end
end<commit_msg>make stack name meet cfn validation criteria<commit_after>require 'vpc_description'
require 'vpc_cfn_generator'
require 'cfn_executor'

describe 'manual test driver'  do
  it 'creates a default vpc', :three_az do
    vpc_description = VpcDescription.new(cidr_block: '192.168.0.0/16',
                                         azs_to_distribute_across: %w{us-east-1b us-east-1c us-east-1d})

    vpc_description.public_subnets = [
      { cidr_block: '192.168.10.0/24'},
      { cidr_block: '192.168.11.0/24'},
      { cidr_block: '192.168.12.0/24'}
    ]

    vpc_description.add_nat(nat_key_pair_name: 'nat_keypair',
                            nat_instance_type: 't2.small',
                            natted_subnets:[
                              { cidr_block: '192.168.20.0/24'},
                              { cidr_block: '192.168.21.0/24'},
                              { cidr_block: '192.168.22.0/24'}
                            ])

    vpc_description.add_bastion(bastion_key_pair_name: 'bastion_keypair',
                                bastion_instance_type: 't2.small',
                                bastion_ami: 'ami-b66ed3de',
                                allowed_ssh_source_ips: %w{172.16.17.32})


    vpc_cfn_generator = VpcCfnGenerator.new
    output = StringIO.new
    vpc_cfn_generator.emit vpc_description, output
    output.rewind

    CloudFormationExecutor.new.execute 'three-az-vpc', output
  end
end
{'fraction_non_alphanumeric': 0.10706713780918728, 'fraction_numerical': 0.06607773851590105, 'mean_word_length': 1.7646484375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 16, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4806679', 'n_tokens_mistral': 1077, 'n_tokens_neox': 950, 'n_words': 133}