Commit Graph

68 Commits

Author SHA1 Message Date
Bendegúz Ács
f408709ef9 VPC IPv4 validation (#2026)
* Implemented throwing invalid subnet range error and fixed breaking tests.

* Implemented throwing invalid CIDR block parameter error for vpcs and subnets.

* Implemented throwing invalid destination CIDR block error.

* IPv6 addresses not accepted, strict checking disabled.

* Implemented throwing invalid subnet conflict error and fixed breaking tests.

* Implemented throwing invalid VPC range error and fixed breaking tests.

* Fixed accidentally removed ).

* Fixed test case trying to create two subnets with the same CIDR range.
2019-05-25 18:35:07 +01:00
Koudai Aono
a61124f774 support to create dynamodb resource by cloudformation (#2219)
* support to create dynamodb resource by cloudformation
2019-05-25 10:16:33 +01:00
Jacob Grismo
4f7d6e15c9 adds failing test case for lambda cfm env vars
Adds a failing test case that shows that a Lambda function resource in a CloudFormation template ignores
the Environment variable mapping.
2018-12-28 22:16:07 -05:00
Hugo Lopes Tavares
5f61950096 Make SpotPrice optional when requesting a spot fleet
When price is omitted, AWS will default to the on-demand price
2018-02-01 18:07:35 -05:00
Gordon Irving
e9b81bb325 add test for vpc tags 2017-12-28 19:27:53 +00:00
William Richard
df7a7958c1 Path is an optional property of instance profile cloudformation resource (#1382)
* Path is an optional property of instance profile cloudformation resource

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html

* Path is also optional for iam role clouformation resources

Based on http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html

* Use `properities.get` with a default instead of doing default handling myself
2017-12-14 12:06:04 +00:00
Hugo Lopes Tavares
aa6a0765c1 Move target group default values to model FakeTargetGroup (#1343)
Before this commit everything that needs to create target groups
had to handle the default values (i.e., cloudformation call & ELBV2Response call)
2017-11-15 19:36:53 +00:00
Hugo Lopes Tavares
7b1ec157b8 Add proper CFN attribute handling to elbv2.FakeLoadBalancer (#1341) 2017-11-15 15:11:11 +00:00
Terry Cain
bd8c1e4567
adding owner id to amis v2 (#1331)
* Adding owner-id/OwnerId to the AMI classes to allow the value to be specified to test filtering images based on owner.

* Added default AMIs and filtering by owner-id

* Fixed some tests

* Fixed more random tests

* Updated MANIFEST

* .
2017-11-12 11:18:25 +00:00
Hugo Lopes Tavares
63c33211ee Add GetAtt support to elbv2 LoadBalancer 2017-10-27 15:32:16 -04:00
Hugo Lopes Tavares
7b074b50a9 Add CloudFormation support to AWS::ElasticLoadBalancingV2::Listener 2017-10-27 14:38:40 -04:00
Hugo Lopes Tavares
dfd41d8c00 Add CloudFormation support to AWS::ElasticLoadBalancingV2::TargetGroup 2017-10-27 14:24:11 -04:00
Hugo Lopes Tavares
8786c2df05 Add CloudFormation support to AWS::ElasticLoadBalancingV2::LoadBalancer 2017-10-27 11:54:55 -04:00
William Richard
c5ce2848be
Boto3 and cloudformation have different keys for auto scaling tags - handle that gracefully 2017-06-21 15:59:03 -04:00
Hugo Lopes Tavares
bfa8b4552c Fix CloudFormation Lambda ZipFile implementation to be plain text
The AWS CloudFormation documentation[1] states the following about the ZipFile property:

> For nodejs4.3, nodejs6.10, python2.7, and python3.6 runtime environments, the source code of your Lambda function.
> You can't use this property with other runtime environments.

[1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile
2017-05-17 18:48:54 -04:00
Steve Pulec
e3bff8b926 Fix cloudformation NoValue parsing to not add attribute. Closes #870 2017-03-16 21:20:01 -04:00
Steve Pulec
3b4ef2cf15 Merge in master. 2017-03-05 09:58:39 -05:00
William Richard
f46a24180f Cast desired capacity for cloudformation asg to int (#846)
Cloudformation passes MaxSize, MinSize and DesiredCapacity as strings, but
we want to store them as ints.  Also includes tests of this fix, to help
avoid regression.
2017-03-04 22:51:01 -05:00
Andy Freeland
783242b696 Elastic IP PhysicalResourceId should always be its public IP (#841)
According to the [CloudFormation `Ref` docs][docs], the `Ref` return
value (and physical ID of the resource) for an Elastic IP is its public
IP address.

[docs]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html
2017-03-04 22:40:43 -05:00
Andy Freeland
a30ba2b597 EC2 tags specified in CloudFormation should be applied to the instances (#840)
Fixes #839.
2017-03-04 22:37:53 -05:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
81836b6981 Get standalone server mode working for all tests. 2017-02-23 19:43:48 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
Akhter Ali
2bf85fe25d Fix Route53 response and tests (#804)
* Fix route53 response \n Fix route53 tests

* Fixing index

* fix zone ID on test_route53_with_update
2017-01-18 21:40:04 -05:00
Michael Nussbaum
74bbd9c8e5 Various RDS, RDS/Cloudformation, RDS/KMS improvements. (#789)
We need to mock out deploying RDS instances with full disk encryption
and detailed tagging. We also need to be able do deploy these instances
with Cloudformation, and then access them with both boto and boto3.

* Join RDS and RDS2 backends - this makes RDS resources created via
  either of the two boto RDS APIs visible to both, more closely
  mirroring how AWS works
* Fix RDS responses that were returning JSON but should be returning XML
* Add mocking of RDS Cloudformation calls
* Add mocking of RDS full disk encryption with KMS
* Add mocking of RDS DBParameterGroups
* Fix mocking of RDS DBSecurityGroupIngress rules
* Make mocking of RDS OptionGroupOptions more accurate
* Fix mocking of RDS cross-region DB replication
* Add RDS tag support to:
  * DBs
  * DBSubnetGroups
  * DBSecurityGroups

Signed-off-by: Andrew Garrett <andrew.garrett@getbraintree.com>
2017-01-11 21:02:51 -05:00
Taro Sato
02324ad708 Add more availability regions and implement default VPC (#773)
Fix filter name for availability zone

Fix bug assuming dict keys are ordered

Fix tests

Fix tests

Fix bug
2017-01-11 20:37:57 -05:00
Steve Pulec
5c3d9b4ae1 Have spot requests launch instances. 2016-11-07 23:08:30 -05:00
Steve Pulec
5371044b6f Spot fleet (#760)
* initial spot fleet.

* Add cloudformation spot fleet support.

* If no spot fleet ids, return all.
2016-11-07 09:53:44 -05:00
rocky4570fft
dc98cf6f64 argh 2 days trying to work python3 into working python2 :( 2016-10-10 01:13:52 +10:00
rocky4570fft
6c577091da lambderize the moto lambda 2016-10-06 19:52:23 +10:00
Steve Pulec
d4895d588a Merge pull request #616 from mnussbaum/cloudformation_kms
Adds KMS support to mock_cloudformation
2016-05-17 21:01:12 -04:00
mnussbaum
01e5c3a384 Adds KMS support to mock_cloudformation 2016-05-13 21:36:24 +00:00
Steve Pulec
a600deb96a Fix merge conflicts and add EC2 Instance delete. Closes #576. 2016-04-28 09:22:31 -04:00
Lars Fronius
519b8e59aa Propagate stack-level tags to resources
According to
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
"All stack-level tags, including automatically created tags, are
propagated to resources that AWS CloudFormation supports. Currently,
tags are not propagated to Amazon EBS volumes that are created from
block device mappings."
2016-03-15 15:36:02 +01:00
Hugo Lopes Tavares
c689816337 Add CloudFormation support to NatGateway model 2016-03-01 12:02:57 -05:00
Hugo Lopes Tavares
576b9f683c [lambda] Add CloudFormation support for AWS::Lambda::Function 2016-02-17 16:13:57 -05:00
Steve Pulec
44f0377cc4 Fix root volume to show up in other EC2 volume API calls. Closes 470 2015-11-28 09:19:45 -05:00
Hugo Lopes Tavares
dafddb094b Implement CloudFormation's physical_resource_id for Data Pipeline 2015-09-17 15:29:14 -04:00
Hugo Lopes Tavares
8623483c0f Change data pipeline responses to start with lowercase characters 2015-09-17 15:26:35 -04:00
Steve Pulec
66dce44214 Update cloudformation test for previous commit. 2015-09-16 18:17:20 -04:00
Hugo Lopes Tavares
25f9e8b588 Change CloudFormation to support Data Pipelines 2015-09-16 17:49:13 -04:00
Steve Pulec
73f03d1ccf Add redshift support for cloudformation. 2015-08-08 13:29:37 -04:00
Steve Pulec
53fff2eb84 Add UpdateStack functionality for Cloudformation. 2015-07-13 13:56:46 -04:00
Steve Pulec
7f73d7e26d Add cloudformation list_stack_resources. 2015-07-13 11:05:36 -04:00
Hugo Lopes Tavares
5160fac9b7 Add availability zone support to Subnets created via CloudFormation 2015-04-08 16:48:02 -04:00
Steve Pulec
c0d19ab178 General cleanup. 2015-03-14 18:55:44 -04:00
Steve Pulec
6c9bba2ca1 Cleanup EC2 classic default security group. 2015-03-14 18:50:41 -04:00
Hugo Lopes Tavares
4beda26007 Change SecurityGroupBackend.{authorize,revoke}_security_group_ingress() methods to receive group name or id, never both 2015-02-25 18:11:00 -05:00
Hugo Lopes Tavares
dc351dfc9e Add support to AWS::EC2::SecurityGroupIngress creation 2015-02-25 12:20:25 -05:00
Konstantinos Koukopoulos
04b86fe362 add missing decorator to cloudformation test 2015-02-20 17:28:49 +02:00