Commit Graph

524 Commits

Author SHA1 Message Date
James Light
73b7fcce26
Fix security group filters (#4079) 2021-09-30 15:28:13 +00:00
Jonathan Piché
2db85d0e54
#4298 // fix warning when image id from template if specified (#4356) 2021-09-27 20:00:29 +00:00
Bert Blommers
939b800e96
Rewrite deprecated EC2 tests (#3881) 2021-09-25 11:13:07 +00:00
kbalk
3a203d35c9
Implement EC2 describe_vpc_endpoint_services() (#4322) 2021-09-24 16:01:09 +00:00
Steven Davidovitz
d56a3989eb
EC2 - instance lifecycle defaults to None when not using spot (#4321) 2021-09-22 16:32:30 +00:00
Macwan Nevil
cb43134d44
fixed route-table vpc-endpoint integration (#4285) 2021-09-16 21:49:49 +00:00
Mohit Alonja
f84ba7d6ec
Fix NetworkInterface PrivateIP support and EIP association (#4288) 2021-09-16 21:07:18 +00:00
Bert Blommers
a147eeac67
EC2 - Additional unit tests (#4291) 2021-09-15 21:07:04 +00:00
Mohit Alonja
002f9979ef
Fix Nat Gateway (#4281) 2021-09-14 20:40:17 +00:00
Mohit Alonja
99c661781e
Fix VPN gateway (#4279) 2021-09-11 08:21:01 +01:00
Mohit Alonja
e061d371c9
Basic requirements VPN GW (#4276) 2021-09-10 18:21:29 +01:00
Macwan Nevil
3885e20298
added support for prefix-list; improved support for replace route (#4273) 2021-09-10 07:09:47 +01:00
Mohit Alonja
eef21767f8
Fix SecuirtyGroupRules and added default Ec2-VPC support for SG. (#4267) 2021-09-09 13:39:48 +01:00
Bert Blommers
4e7153c655
EC2 - DryRun-requests should return 412 status code (#4270) 2021-09-07 17:10:01 +01:00
Mohit Alonja
2f26e870b8
SecurityGroup Improvements (#4239) 2021-09-04 17:08:18 +01:00
mello7tre
69cc92f780
Add describe_spot_price_history (#4261) 2021-09-04 16:57:01 +01:00
mello7tre
6d9abe1111
Add instance lifecycle property to detect spot instances (#4260) 2021-09-02 14:12:17 +01:00
Bert Blommers
0659ac6192
EC2 - Verify we can filter by owner-alias (#4255) 2021-09-01 13:23:24 +01:00
Brian Pandola
a1e415ec03
Support alternate EC2:ModifyInstanceAttribute request syntax (#4234) 2021-08-28 07:04:15 +01:00
Bert Blommers
8b7df4da44
EC2:DescribeVpcPeeringConnection() - use VpcPeeringConnectionIds-parameter if provided (#4230) 2021-08-27 14:56:31 +01:00
Bert Blommers
020257904e
Tech Debt - improve test coverage (#4229) 2021-08-27 11:28:10 +01:00
Mohit Alonja
11a37c357b
SecurityGroup Improvements (#4183) 2021-08-26 19:57:07 +01:00
Bert Blommers
6a644850f6
EC2 - Return custom error response for DescribeRouteTable/DescribeVPC (#4225) 2021-08-26 18:53:26 +01:00
Bert Blommers
fbd93efdb7
EC2 - Add tests for egress_only_internet_gateway (#4206) 2021-08-22 10:35:04 +01:00
Bert Blommers
7acdfe4feb
Introduce Pylint to check for duplicate test method names (#3684) 2021-08-21 16:33:15 +01:00
Brian Pandola
1db3e0e9b9
Raise error when attempting to terminate protected ec2 instance (#4199) 2021-08-19 06:47:05 +01:00
Brian Pandola
27c9b31d3a
Fix ec2 wildcard tag filters (#4189) 2021-08-18 06:02:19 +01:00
Bert Blommers
547a1844ed
Tech debt - improve test coverage EC2/ELBv2/Events (#4181) 2021-08-16 15:13:50 +01:00
Anton Grübel
4df099c724
Add cloudwatch tags (#4179)
* Update cloudwatch.put_metric_alarm to accept TreatMissingData and Tags parameter
* Add parameter ExtendedStatistic and EvaluateLowSampleCountPercentile to cloudwatch.put_metric_alarm
* Add parameter ThresholdMetricId to cloudwatch.put_metric_alarm
2021-08-16 08:52:19 +01:00
Macwan Nevil
d2c9e85ed3
Enhanced support for ami filtering (#4175) 2021-08-15 10:09:50 +01:00
Macwan Nevil
f2b8318211
fixed owner id and delete rt (#4161) 2021-08-11 21:23:04 +01:00
Bert Blommers
574053cb27
EC2 - Improve/Extend RouteTable unit tests (#4165) 2021-08-11 18:50:15 +01:00
Bert Blommers
69e865dd1e
EC2 - Add unit tests for Route Tables (#4135) 2021-08-04 14:22:26 +01:00
Bert Blommers
0388b778dd
EC2/RDS2 - New tests (#4127) 2021-08-03 15:06:06 +01:00
Waldemar Hummer
6eeb4b4b32
Add support for EC2 transit gateway associations (#4089)
Co-authored-by: Nevil Macwan <macnev2013@gmail.com>
Co-authored-by: monty16597 <alonjamohit77@gmail.com>
2021-07-31 16:18:19 +01:00
Bert Blommers
a1905ad584
Improve test coverage (#4098) 2021-07-28 11:17:15 +01:00
Waldemar Hummer
f4f8527955
Merge LocalStack changes into upstream moto (#4082)
* fix OPTIONS requests on non-existing API GW integrations

* add cloudformation models for API Gateway deployments

* bump version

* add backdoor to return CloudWatch metrics

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* bump version

* minor fixes

* fix Number data_type for SQS message attribute

* fix handling of encoding errors

* bump version

* make CF stack queryable before starting to initialize its resources

* bump version

* fix integration_method for API GW method integrations

* fix undefined status in CF FakeStack

* Fix apigateway issues with terraform v0.12.21
* resource_methods -> add handle for "DELETE" method
* integrations -> fix issue that "httpMethod" wasn't included in body request (this value was set as the value from refer method resource)

* bump version

* Fix setting http method for API gateway integrations (#6)

* bump version

* remove duplicate methods

* add storage class to S3 Key when completing multipart upload (#7)

* fix SQS performance issues; bump version

* add pagination to SecretsManager list-secrets (#9)

* fix default parameter groups in RDS

* fix adding S3 metadata headers with names containing dots (#13)

* Updating implementation coverage

* Updating implementation coverage

* add cloudformation models for API Gateway deployments

* Updating implementation coverage

* Updating implementation coverage

* Implemented get-caller-identity returning real data depending on the access key used.

* make CF stack queryable before starting to initialize its resources

* bump version

* remove duplicate methods

* fix adding S3 metadata headers with names containing dots (#13)

* Update amis.json to support EKS AMI mocks (#15)

* fix PascalCase for boolean value in ListMultipartUploads response (#17); fix _get_multi_param to parse nested list/dict query params

* determine non-zero container exit code in Batch API

* support filtering by dimensions in CW get_metric_statistics

* fix storing attributes for ELBv2 Route entities; API GW refactorings for TF tests

* add missing fields for API GW resources

* fix error messages for Route53 (TF-compat)

* various fixes for IAM resources (tf-compat)

* minor fixes for API GW models (tf-compat)

* minor fixes for API GW responses (tf-compat)

* add s3 exception for bucket notification filter rule validation

* change the way RESTErrors generate the response body and content-type header

* fix lint errors and disable "black" syntax enforcement

* remove return type hint in RESTError.get_body

* add RESTError XML template for IAM exceptions

* add support for API GW minimumCompressionSize

* fix casing getting PrivateDnsEnabled API GW attribute

* minor fixes for error responses

* fix escaping special chars for IAM role descriptions (tf-compat)

* minor fixes and tagging support for API GW and ELB v2 (tf-compat)

* Merge branch 'master' into localstack

* add "AlarmRule" attribute to enable support for composite CloudWatch metrics

* fix recursive parsing of complex/nested query params

* bump version

* add API to delete S3 website configurations (#18)

* use dict copy to allow parallelism and avoid concurrent modification exceptions in S3

* fix precondition check for etags in S3 (#19)

* minor fix for user filtering in Cognito

* fix API Gateway error response; avoid returning empty response templates (tf-compat)

* support tags and tracingEnabled attribute for API GW stages

* fix boolean value in S3 encryption response (#20)

* fix connection arn structure

* fix api destination arn structure

* black format

* release 2.0.3.37

* fix s3 exception tests

see botocore/parsers.py:1002 where RequestId is removed from parsed

* remove python 2 from build action

* add test failure annotations in build action

* fix events test arn comparisons

* fix s3 encryption response test

* return default value "0" if EC2 availableIpAddressCount is empty

* fix extracting SecurityGroupIds for EC2 VPC endpoints

* support deleting/updating API Gateway DomainNames

* fix(events): Return empty string instead of null when no pattern is specified in EventPattern (tf-compat) (#22)

* fix logic and revert CF changes to get tests running again (#21)

* add support for EC2 customer gateway API (#25)

* add support for EC2 Transit Gateway APIs (#24)

* feat(logs): add `kmsKeyId` into `LogGroup` entity (#23)

* minor change in ELBv2 logic to fix tests

* feat(events): add APIs to describe and delete CloudWatch Events connections (#26)

* add support for EC2 transit gateway route tables (#27)

* pass transit gateway route table ID in Describe API, minor refactoring (#29)

* add support for EC2 Transit Gateway Routes (#28)

* fix region on ACM certificate import (#31)

* add support for EC2 transit gateway attachments (#30)

* add support for EC2 Transit Gateway VPN attachments (#32)

* fix account ID for logs API

* add support for DeleteOrganization API

* feat(events): store raw filter representation for CloudWatch events patterns (tf-compat) (#36)

* feat(events): add support to describe/update/delete CloudWatch API destinations (#35)

* add Cognito UpdateIdentityPool, CW Logs PutResourcePolicy

* feat(events): add support for tags in EventBus API (#38)

* fix parameter validation for Batch compute environments (tf-compat)

* revert merge conflicts in IMPLEMENTATION_COVERAGE.md

* format code using black

* restore original README; re-enable and fix CloudFormation tests

* restore tests and old logic for CF stack parameters from SSM

* parameterize RequestId/RequestID in response messages and revert related test changes

* undo LocalStack-specific adaptations

* minor fix

* Update CodeCov config to reflect removal of Py2

* undo change related to CW metric filtering; add additional test for CW metric statistics with dimensions

* Terraform - Extend whitelist of running tests

Co-authored-by: acsbendi <acsbendi28@gmail.com>
Co-authored-by: Phan Duong <duongpv@outlook.com>
Co-authored-by: Thomas Rausch <thomas@thrau.at>
Co-authored-by: Macwan Nevil <macnev2013@gmail.com>
Co-authored-by: Dominik Schubert <dominik.schubert91@gmail.com>
Co-authored-by: Gonzalo Saad <saad.gonzalo.ale@gmail.com>
Co-authored-by: Mohit Alonja <monty16597@users.noreply.github.com>
Co-authored-by: Miguel Gagliardo <migag9@gmail.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2021-07-26 15:21:17 +01:00
Bert Blommers
7693d77333
Remove Py2 support (#3915) 2021-07-26 07:40:39 +01:00
Brian Pandola
05cdcbcedc
Add support for DescribeNetworkInterfaces tag filters (#4057) 2021-07-04 07:44:58 +01:00
Bert Blommers
cbeeefbec9
Prep release 2.0.9 (#4007)
* Update implementation coverage

* EC2 - Update instance type offerings

* IAM - update list of managed policies

* Changelog for release 2.0.9

* Instance Type Offerings - fix number of available offerings
2021-06-12 13:57:29 +01:00
Brian Pandola
16f4dc87dc
Add support for tagging Volumes in ec2:RunInstances (#3946) 2021-05-21 06:35:34 +01:00
Brian Pandola
752b508738
Add support for KmsKeyId in ec2:RunInstances (#3943) 2021-05-20 07:11:50 +01:00
Josh McCullen
12b409e0de
Set multiple Security Groups when calling modify_network_interface_attribute (#3911) 2021-05-07 13:50:26 +01:00
khneal
e5b3f4181d
EC2 describe_network_acls: add support for owner-id filter (#3898)
* add test that fails with FilterNotImplementedError

* describe_network_acls: add support for owner-id filter

Co-authored-by: Kevin Neal <Kevin_Neal@intuit.com>
2021-05-05 13:15:43 +01:00
Brian Pandola
463472c2b2
Make security rules consistent between direct (backend) and indirect (api) boundaries (#3817)
* Make security rules consistent between direct (backend) and indirect (api) boundaries

Security rules added directly via the backend were unable to be revoked via the API
because the port values were being stored as strings but were always coerced back
to integers by the botocore model.  `"0" != 0`, so the rules would never match,
raising an `InvalidPermissionNotFoundError`.

This change ensures that the port values for a security group rule are always of type
`Union[int, None]`.

No tests needed to be modified as a result of this change.  A new test was added that
explicitly covers the behavior that had been failing.

* Skip test in server mode
2021-03-31 19:33:36 +01:00
Brian Pandola
1761be46e3
Return error when trying to add rules to a non-existent security group (#3802)
Behavior and error code/message confirmed against real AWS backend.
2021-03-26 13:00:51 +00:00
Brian Pandola
2bae7e4e0d
Raise error when adding duplicate egress rule to ec2:SecurityGroup (#3801)
The `InvalidPermission.Duplicate` error was already implemented for inbound rules,
but AWS also returns this error for duplicate outbound rules.

Very minor changes were needed on existing tests that were adding duplicate
outbound rules (when testing the RulesPerSecurityGroupLimitExceeded error).
2021-03-26 11:23:07 +00:00
tony-dot-sh
5fe3a707ed
fix route table association by internet gateway (#3773)
* fix route table association by internet gateway per https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateRouteTable.html

* Route53

 - Add test for route table association by internet gateway
 - Minor test tweak for Main route table values

TODO: explicitly set the route table main route association

* Route53

 - forgot subnet id association test

Co-authored-by: Tony Greising-Murschel <tony@platform.sh>
2021-03-16 14:15:58 +00:00
Bert Blommers
d3ad9d6686
Update integration test to use Pytest (#3703)
* Refactor int test to use pytest

* Add comments to int test script
2021-02-17 15:06:31 +00:00
tony-dot-sh
9feabf5479
Enhancement: implement EC2 instance filtering by subnet-id (#3694)
Co-authored-by: Tony Greising-Murschel <tony@platform.sh>
2021-02-15 16:38:40 +00:00