Skip to content

Commit

Permalink
fix(dev costs): Run 1 node OS clusters in dev environments (#161)
Browse files Browse the repository at this point in the history
* if dev run skinny

* test

* test

* test

* test

* test

* test
  • Loading branch information
mdial89f authored Oct 11, 2023
1 parent 5f6f79e commit b70b584
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions src/services/data/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,22 @@ resources:
VolumeSize: 10
ClusterConfig:
InstanceType: ${param:osInstanceType}
InstanceCount: 3
InstanceCount:
Fn::If:
- isDev
- 1
- 3
DedicatedMasterEnabled: false
ZoneAwarenessEnabled: true
ZoneAwarenessEnabled:
Fn::If:
- isDev
- false
- true
ZoneAwarenessConfig:
AvailabilityZoneCount: 3
Fn::If:
- isDev
- !Ref AWS::NoValue
- AvailabilityZoneCount: 3
EncryptionAtRestOptions:
Enabled: true
NodeToNodeEncryptionOptions:
Expand Down Expand Up @@ -573,8 +584,13 @@ resources:
VPCOptions:
SecurityGroupIds:
- !Ref OpenSearchSecurityGroup
SubnetIds: >-
${self:custom.vpc.privateSubnets}
SubnetIds:
Fn::If:
- isDev
- - ${self:custom.vpc.privateSubnets.0}
- >-
${self:custom.vpc.privateSubnets}
OpenSearchRole:
Type: AWS::IAM::Role
Properties:
Expand Down

0 comments on commit b70b584

Please sign in to comment.