Skip to content

Commit

Permalink
Merge pull request #28 from kolomiets/spm-support
Browse files Browse the repository at this point in the history
Delete unnecessary AvailabilityZones parameter
  • Loading branch information
kolomiets authored May 19, 2022
2 parents 6040e12 + 040fe66 commit 32201ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
8 changes: 5 additions & 3 deletions .taskcat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ project:
shorten_stack_name: true
template: templates/jaeger-entry-new-vpc.template.yaml
parameters:
NumberOfAZs: 2
AvailabilityZones: $[taskcat_genaz_2]
QSS3BucketName: $[taskcat_autobucket]
QSS3BucketRegion: us-east-1
QSS3KeyPrefix: quickstart-jaeger/
Expand Down Expand Up @@ -64,9 +62,13 @@ tests:
regions:
- us-east-1

elasticsearch-with-defaults:
elasticsearch-with-spm:
parameters:
EnvironmentName: es
StorageBackend: Elasticsearch
ExportMetrics: 'CreateNewWorkspace'
OpenTelemetryCollector: 'Yes'
EnableZPages: 'Yes'
EnableSPM: 'Yes'
regions:
- eu-west-1
21 changes: 8 additions & 13 deletions templates/jaeger-entry-new-vpc.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Metadata:
default: VPC network configuration
Parameters:
- NumberOfAZs
- AvailabilityZones
- VPCCIDR
- PrivateSubnet1CIDR
- PrivateSubnet2CIDR
Expand Down Expand Up @@ -112,8 +111,6 @@ Metadata:
# VPC network configuration
NumberOfAZs:
default: Number of Availability Zones
AvailabilityZones:
default: Availability Zones
VPCCIDR:
default: VPC CIDR
PrivateSubnet1CIDR:
Expand Down Expand Up @@ -240,9 +237,6 @@ Parameters:
Description: Number of Availability Zones to use in the VPC. This must match your
selections in the list of Availability Zones parameter.
Type: String
AvailabilityZones:
Description: List of Availability Zones to use for the subnets in the VPC. Pick only as many as match what was selected for Number of Availability Zones (NumberofAZs).
Type: List<AWS::EC2::AvailabilityZone::Name>
VPCCIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
Expand Down Expand Up @@ -271,22 +265,19 @@ Parameters:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
Default: 10.0.128.0/20
Description: CIDR block for the public (DMZ) subnet 1 located in Availability
Zone 1.
Description: CIDR block for the public (DMZ) subnet 1 located in Availability Zone 1.
Type: String
PublicSubnet2CIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
Default: 10.0.144.0/20
Description: CIDR block for the public (DMZ) subnet 2 located in Availability
Zone 2.
Description: CIDR block for the public (DMZ) subnet 2 located in Availability Zone 2.
Type: String
PublicSubnet3CIDR:
AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16–28
Default: 10.0.160.0/20
Description: CIDR block for the public (DMZ) subnet 3, located in Availability
Zone 3.
Description: CIDR block for the public (DMZ) subnet 3, located in Availability Zone 3.
Type: String
CreateVpcEndpoints:
Type: String
Expand Down Expand Up @@ -530,8 +521,12 @@ Resources:
- S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion]
S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
Parameters:
AvailabilityZones: !Join [ ',', !Ref AvailabilityZones ]
NumberOfAZs: !Ref NumberOfAZs
AvailabilityZones: !Join
- ','
- - !Select [0, !GetAZs '']
- !Select [1, !GetAZs '']
- !If [Using3AvailabilityZones, !Select [2, !GetAZs ''], !Ref 'AWS::NoValue']
PublicSubnet1CIDR: !Ref PublicSubnet1CIDR
PublicSubnet2CIDR: !Ref PublicSubnet2CIDR
PublicSubnet3CIDR: !If [Using3AvailabilityZones, !Ref PublicSubnet3CIDR, !Ref 'AWS::NoValue']
Expand Down

0 comments on commit 32201ac

Please sign in to comment.