-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cross account trust rule for ES and OpenSearch domains (#200)
* upgrade to pycfmodel 0.13.0 in order to have ES and OpenSearch domains * add cross account trust rules for ES and OpenSearch domains * add tests and test files * bump version and update changelog Co-authored-by: Ramon <[email protected]>
- Loading branch information
Showing
13 changed files
with
371 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
VERSION = (1, 2, 2) | ||
VERSION = (1, 3, 0) | ||
|
||
__version__ = ".".join(map(str, VERSION)) |
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
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
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
21 changes: 21 additions & 0 deletions
21
tests/test_templates/rules/CrossAccountTrustRule/es_domain_basic.yml
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,21 @@ | ||
AWSTemplateFormatVersion: "2010-09-09" | ||
Description: Testing ES Domain | ||
|
||
Parameters: | ||
Principal: | ||
Type: String | ||
|
||
Resources: | ||
TestDomain: | ||
Type: AWS::Elasticsearch::Domain | ||
Properties: | ||
DomainName: "test" | ||
AccessPolicies: | ||
Version: "2012-10-17" | ||
Statement: | ||
- Sid: "Allow full access of the domain" | ||
Effect: "Allow" | ||
Principal: | ||
AWS: !Ref Principal | ||
Action: "es:*" | ||
Resource: "arn:aws:es:*:123456789012:domain/test/*" |
19 changes: 19 additions & 0 deletions
19
tests/test_templates/rules/CrossAccountTrustRule/invalid_with_sts_es_domain.yml
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,19 @@ | ||
AWSTemplateFormatVersion: "2010-09-09" | ||
Description: Testing ES Domain | ||
|
||
Resources: | ||
TestDomain: | ||
Type: AWS::Elasticsearch::Domain | ||
Properties: | ||
DomainName: "test" | ||
AccessPolicies: | ||
Version: "2012-10-17" | ||
Statement: | ||
- Sid: "Allow full access of the domain" | ||
Effect: "Allow" | ||
Principal: | ||
AWS: | ||
- "arn:aws:iam::123456789:role/test-role" | ||
- "arn:aws:sts::999999999:assumed-role/test-role/session" | ||
Action: "es:*" | ||
Resource: "arn:aws:es:*:123456789012:domain/test/*" |
Oops, something went wrong.