Skip to content

Commit 011616c

Browse files
himani2411Himani Deshpande
andauthored
[Isolated] Not using same Subnet again while creating Storage mount t… (#6171)
* [Isolated] Not using same Subnet again while creating Storage mount targets * [Isolated] Adding Disable Sudo Test in isolated_regions.yaml --------- Co-authored-by: Himani Deshpande <himanidp@amazon.com>
1 parent ac13df8 commit 011616c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

cloudformation/storage/storage-stack.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ Conditions:
118118
CreateFsxOntap: !Equals [!Ref CreateFsxOntap, 'true']
119119
CreateFsxOpenZfs: !Equals [!Ref CreateFsxOpenZfs, 'true']
120120
CreateFileCache: !Equals [!Ref CreateFileCache, 'true']
121+
UniqueSubnetThree: !Or
122+
- !Equals [!Ref SubnetOne, !Ref SubnetThree]
123+
- !Equals [!Ref SubnetTwo, !Ref SubnetThree]
124+
CreateMountTargetSubnetThree: !And
125+
- !Condition CreateEfs
126+
- !Not [!Condition UniqueSubnetThree]
121127
NoStorage: !And
122128
- !Not [!Equals [!Ref CreateEbs, 'true']]
123129
- !Not [!Equals [!Ref CreateEfs, 'true']]
@@ -161,7 +167,7 @@ Resources:
161167
SubnetId: !Ref SubnetTwo
162168
MountTargetResourceEfs0SubnetThree:
163169
Type: 'AWS::EFS::MountTarget'
164-
Condition: CreateEfs
170+
Condition: CreateMountTargetSubnetThree
165171
Properties:
166172
FileSystemId: !Ref EfsFileSystem
167173
SecurityGroups:
@@ -363,7 +369,7 @@ Resources:
363369
ToPort: 20003
364370
VpcId: !Ref Vpc
365371
Type: 'AWS::EC2::SecurityGroup'
366-
372+
367373
# File Cache
368374
FileCacheSecurityGroup:
369375
Type: AWS::EC2::SecurityGroup

tests/integration-tests/configs/isolated_regions.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ test-suites:
104104
instances: {{ INSTANCES }}
105105
oss: {{ OSS }}
106106
schedulers: {{ SCHEDULERS }}
107+
test_create.py::test_create_disable_sudo_access_for_default_user:
108+
dimensions:
109+
- regions: {{ REGIONS }}
110+
instances: {{ INSTANCES }}
111+
oss: {{ OSS }}
112+
schedulers: {{ SCHEDULERS }}
107113
test_create.py::test_create_imds_secured:
108114
dimensions:
109115
- regions: {{ REGIONS }}

0 commit comments

Comments
 (0)