From d0ff579778fd214048564d5594149fe00bc1fefb Mon Sep 17 00:00:00 2001 From: matmertz25 <40722304+matmertz25@users.noreply.github.com> Date: Wed, 26 Aug 2020 20:22:03 -0400 Subject: [PATCH 1/3] Add AdvancedSecurityOptions property to ElasticSearch Domain --- troposphere/elasticsearch.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/troposphere/elasticsearch.py b/troposphere/elasticsearch.py index eee481979..755549090 100644 --- a/troposphere/elasticsearch.py +++ b/troposphere/elasticsearch.py @@ -81,8 +81,24 @@ class SnapshotOptions(AWSProperty): class VPCOptions(AWSProperty): props = { - "SecurityGroupIds": ([basestring], False), - "SubnetIds": ([basestring], False) + 'SecurityGroupIds': ([basestring], False), + 'SubnetIds': ([basestring], False) + } + + +class MasterUserOptions(AWSProperty): + props = { + 'MasterUserARN': (basestring, False), + 'MasterUserName': (basestring, False), + 'MasterUserPassword': (basestring, False), + } + + +class AdvancedSecurityOptionsInput(AWSProperty): + props = { + 'Enabled': (boolean, False), + 'InternalUserDatabaseEnabled': (boolean, False), + 'MasterUserOptions': MasterUserOptions, } @@ -92,6 +108,7 @@ class Domain(AWSObject): props = { 'AccessPolicies': (policytypes, False), 'AdvancedOptions': (dict, False), + 'AdvancedSecurityOptions': (AdvancedSecurityOptionsInput, False), 'CognitoOptions': (CognitoOptions, False), 'DomainName': (basestring, False), 'EBSOptions': (EBSOptions, False), From cdbc49285056f9545382f6fa90c933681942f7a5 Mon Sep 17 00:00:00 2001 From: matmertz25 <40722304+matmertz25@users.noreply.github.com> Date: Sat, 29 Aug 2020 19:21:26 -0400 Subject: [PATCH 2/3] Update troposphere/elasticsearch.py Make MasterUserOptions property optional for AdvancedSecurityOptions Co-authored-by: Pat Myron --- troposphere/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troposphere/elasticsearch.py b/troposphere/elasticsearch.py index 755549090..892cfc5e6 100644 --- a/troposphere/elasticsearch.py +++ b/troposphere/elasticsearch.py @@ -98,7 +98,7 @@ class AdvancedSecurityOptionsInput(AWSProperty): props = { 'Enabled': (boolean, False), 'InternalUserDatabaseEnabled': (boolean, False), - 'MasterUserOptions': MasterUserOptions, + 'MasterUserOptions': (MasterUserOptions, false), } From 2b25f338c348ffc84b1f4608645d58801916b2c0 Mon Sep 17 00:00:00 2001 From: matmertz25 <40722304+matmertz25@users.noreply.github.com> Date: Sat, 29 Aug 2020 19:23:27 -0400 Subject: [PATCH 3/3] Correct boolean format for optional property Co-authored-by: Pat Myron --- troposphere/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troposphere/elasticsearch.py b/troposphere/elasticsearch.py index 892cfc5e6..dcb090454 100644 --- a/troposphere/elasticsearch.py +++ b/troposphere/elasticsearch.py @@ -98,7 +98,7 @@ class AdvancedSecurityOptionsInput(AWSProperty): props = { 'Enabled': (boolean, False), 'InternalUserDatabaseEnabled': (boolean, False), - 'MasterUserOptions': (MasterUserOptions, false), + 'MasterUserOptions': (MasterUserOptions, False), }