-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from remind101/remove_test_depend_on_stacker_…
…blueprints Remove dependency on stacker_blueprints
- Loading branch information
Showing
6 changed files
with
98 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
from stacker.blueprints.base import Blueprint | ||
|
||
|
||
class VPC(Blueprint): | ||
LOCAL_PARAMETERS = { | ||
"AZCount": { | ||
"type": int, | ||
"default": 2, | ||
} | ||
} | ||
|
||
PARAMETERS = { | ||
"PrivateSubnets": { | ||
"type": "CommaDelimitedList", | ||
"description": "Comma separated list of subnets to use for " | ||
"non-public hosts. NOTE: Must have as many subnets " | ||
"as AZCount"}, | ||
"PublicSubnets": { | ||
"type": "CommaDelimitedList", | ||
"description": "Comma separated list of subnets to use for " | ||
"public hosts. NOTE: Must have as many subnets " | ||
"as AZCount"}, | ||
"InstanceType": { | ||
"type": "String", | ||
"description": "NAT EC2 instance type.", | ||
"default": "m3.medium"}, | ||
"SshKeyName": { | ||
"type": "AWS::EC2::KeyPair::KeyName"}, | ||
"BaseDomain": { | ||
"type": "String", | ||
"default": "", | ||
"description": "Base domain for the stack."}, | ||
"InternalDomain": { | ||
"type": "String", | ||
"default": "", | ||
"description": "Internal domain name, if you have one."}, | ||
"CidrBlock": { | ||
"type": "String", | ||
"description": "Base CIDR block for subnets.", | ||
"default": "10.128.0.0/16"}, | ||
"ImageName": { | ||
"type": "String", | ||
"description": "The image name to use from the AMIMap (usually " | ||
"found in the config file.)", | ||
"default": "NAT"}, | ||
"UseNatGateway": { | ||
"type": "String", | ||
"allowed_values": ["true", "false"], | ||
"description": "If set to true, will configure a NAT Gateway" | ||
"instead of NAT instances.", | ||
"default": "false"}, | ||
} | ||
|
||
def create_template(self): | ||
return | ||
|
||
|
||
class Bastion(Blueprint): | ||
PARAMETERS = { | ||
"VpcId": {"type": "AWS::EC2::VPC::Id", "description": "Vpc Id"}, | ||
"DefaultSG": {"type": "AWS::EC2::SecurityGroup::Id", | ||
"description": "Top level security group."}, | ||
"PublicSubnets": {"type": "List<AWS::EC2::Subnet::Id>", | ||
"description": "Subnets to deploy public " | ||
"instances in."}, | ||
"PrivateSubnets": {"type": "List<AWS::EC2::Subnet::Id>", | ||
"description": "Subnets to deploy private " | ||
"instances in."}, | ||
"AvailabilityZones": {"type": "CommaDelimitedList", | ||
"description": "Availability Zones to deploy " | ||
"instances in."}, | ||
"InstanceType": {"type": "String", | ||
"description": "EC2 Instance Type", | ||
"default": "m3.medium"}, | ||
"MinSize": {"type": "Number", | ||
"description": "Minimum # of instances.", | ||
"default": "1"}, | ||
"MaxSize": {"type": "Number", | ||
"description": "Maximum # of instances.", | ||
"default": "5"}, | ||
"SshKeyName": {"type": "AWS::EC2::KeyPair::KeyName"}, | ||
"OfficeNetwork": { | ||
"type": "String", | ||
"description": "CIDR block allowed to connect to bastion hosts."}, | ||
"ImageName": { | ||
"type": "String", | ||
"description": "The image name to use from the AMIMap (usually " | ||
"found in the config file.)", | ||
"default": "bastion"}, | ||
} | ||
|
||
def create_template(self): | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import unittest | ||
|
||
import mock | ||
|
||
from stacker.context import Context | ||
|