Skip to content

Commit e115e6f

Browse files
authored
Merge pull request #643 from amplify-education/hotfix/remove-random-string-from-sls-service
Remove RANDOM_STRING to reduce SLS credits usage
2 parents ef35af9 + 029261b commit e115e6f

File tree

24 files changed

+53
-53
lines changed

24 files changed

+53
-53
lines changed

test/integration-tests/basic/apigateway-with-export/serverless.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# APIGateway with export outputs
2-
service: ${env:PLUGIN_IDENTIFIER}-apigateway-with-export-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-apigateway-with-export
33

44
frameworkVersion: "4.2.5"
55

@@ -27,23 +27,23 @@ resources:
2727
Value:
2828
Ref: ApiGatewayRestApi # Logical ID
2929
Export:
30-
Name: api-${self:provider.stage}-${env:RANDOM_STRING}-restApiId
30+
Name: api-${self:provider.stage}-restApiId
3131
RootResource:
3232
Description: Main service's API Gateway Root Resource ID
3333
Value:
3434
Fn::GetAtt:
3535
- ApiGatewayRestApi # Logical ID
3636
- RootResourceId # Logical ID
3737
Export:
38-
Name: api-${self:provider.stage}-${env:RANDOM_STRING}-RootResourceId
38+
Name: api-${self:provider.stage}-RootResourceId
3939

4040
plugins:
4141
- serverless-domain-manager
4242

4343
custom:
4444
customDomain:
4545
stage: ${self:provider.stage}
46-
domainName: ${env:PLUGIN_IDENTIFIER}-apigateway-with-export-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
46+
domainName: ${env:PLUGIN_IDENTIFIER}-apigateway-with-export.${env:TEST_DOMAIN}
4747
autoDomain: true
4848
basePath: hello-world
4949
endpointType: REGIONAL

test/integration-tests/basic/apigateway-with-import/serverless.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# APIGateway with import other CloudFormation stack outputs
2-
service: ${env:PLUGIN_IDENTIFIER}-apigateway-with-import-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-apigateway-with-import
33

44
frameworkVersion: "4.2.5"
55

@@ -12,9 +12,9 @@ provider:
1212
stage: test
1313
apiGateway:
1414
restApiId:
15-
Fn::ImportValue: api-${self:provider.stage}-${env:RANDOM_STRING}-restApiId
15+
Fn::ImportValue: api-${self:provider.stage}-restApiId
1616
restApiRootResourceId:
17-
Fn::ImportValue: api-${self:provider.stage}-${env:RANDOM_STRING}-RootResourceId
17+
Fn::ImportValue: api-${self:provider.stage}-RootResourceId
1818
functions:
1919
helloWorld:
2020
handler: handler.helloWorld

test/integration-tests/basic/basepath-mapping/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled and testing basepath mapping
2-
service: ${env:PLUGIN_IDENTIFIER}-basepath-mapping-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-basepath-mapping
33

44
frameworkVersion: "4.2.5"
55

@@ -27,7 +27,7 @@ plugins:
2727
- serverless-domain-manager
2828
custom:
2929
customDomain:
30-
domainName: ${env:PLUGIN_IDENTIFIER}-basepath-mapping-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
30+
domainName: ${env:PLUGIN_IDENTIFIER}-basepath-mapping.${env:TEST_DOMAIN}
3131
basePath: 'api'
3232

3333
package:

test/integration-tests/basic/create-domain-idempotent/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Creating a domain should be idempotent
2-
service: ${env:PLUGIN_IDENTIFIER}-create-domain-idempotent-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-create-domain-idempotent
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-create-domain-idempotent-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-create-domain-idempotent.${env:TEST_DOMAIN}
2626
basePath: ''
2727

2828
package:

test/integration-tests/basic/deploy-idempotent/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Deploying should be idempotent
2-
service: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent.${env:TEST_DOMAIN}
2626
basePath: ''
2727

2828
package:

test/integration-tests/basic/deploy-idempotent2/serverless.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Deploying should be idempotent for the same domain and different paths
2-
service: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2
33

44
frameworkVersion: "4.2.5"
55

@@ -25,11 +25,11 @@ custom:
2525
- rest:
2626
autoDomain: true
2727
basePath: "path1"
28-
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
28+
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2.${env:TEST_DOMAIN}
2929
allowPathMatching: true
3030
- rest:
3131
basePath: "path2"
32-
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
32+
domainName: ${env:PLUGIN_IDENTIFIER}-deploy-idempotent2.${env:TEST_DOMAIN}
3333
allowPathMatching: true
3434

3535
package:

test/integration-tests/basic/http-api-multiple/serverless.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-http-api-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-http-api
22

33
frameworkVersion: "4.2.5"
44

@@ -26,12 +26,12 @@ plugins:
2626
custom:
2727
customDomains:
2828
- http:
29-
domainName: ${env:PLUGIN_IDENTIFIER}-http-api-multi-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
29+
domainName: ${env:PLUGIN_IDENTIFIER}-http-api-multi.${env:TEST_DOMAIN}
3030
basePath: ''
3131
endpointType: REGIONAL
3232
autoDomain: true
3333
- http:
34-
domainName: ${env:PLUGIN_IDENTIFIER}-http-api-milti2-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
34+
domainName: ${env:PLUGIN_IDENTIFIER}-http-api-milti2.${env:TEST_DOMAIN}
3535
basePath: ''
3636
endpointType: REGIONAL
3737
autoDomain: true

test/integration-tests/basic/mutual-tls/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-mutual-tls-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-mutual-tls
22

33
frameworkVersion: "4.2.5"
44

@@ -22,7 +22,7 @@ plugins:
2222

2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-mutual-tls-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-mutual-tls.${env:TEST_DOMAIN}
2626
autoDomain: true
2727
endpointType: REGIONAL
2828
tlsTruststoreUri: ${env:TLS_TRUSTSTORE_URI}

test/integration-tests/basic/null-basepath-mapping/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled and testing basepath mapping
2-
service: ${env:PLUGIN_IDENTIFIER}-null-basepath-mapping-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-null-basepath-mapping
33

44
frameworkVersion: "4.2.5"
55

@@ -27,7 +27,7 @@ plugins:
2727
- serverless-domain-manager
2828
custom:
2929
customDomain:
30-
domainName: ${env:PLUGIN_IDENTIFIER}-null-basepath-mapping-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
30+
domainName: ${env:PLUGIN_IDENTIFIER}-null-basepath-mapping.${env:TEST_DOMAIN}
3131
basePath: ''
3232

3333
package:

test/integration-tests/basic/route53-profile/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Creating a domain should be idempotent
2-
service: ${env:PLUGIN_IDENTIFIER}-route53-profile-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-route53-profile
33

44
frameworkVersion: "4.2.5"
55

@@ -23,7 +23,7 @@ plugins:
2323

2424
custom:
2525
customDomain:
26-
domainName: ${env:PLUGIN_IDENTIFIER}-route53-profile-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
26+
domainName: ${env:PLUGIN_IDENTIFIER}-route53-profile.${env:TEST_DOMAIN}
2727
route53Profile: ${env:ROUTE53_PROFILE}
2828

2929
package:

test/integration-tests/deploy/auto-domain/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# create_domain should be run as part of deployment
2-
service: ${env:PLUGIN_IDENTIFIER}-auto-domain-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-auto-domain
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-auto-domain-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-auto-domain.${env:TEST_DOMAIN}
2626
basePath: ''
2727
autoDomain: true
2828
autoDomainWaitFor: 120

test/integration-tests/deploy/basepath-nested-stack/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with custom basepath
2-
service: ${env:PLUGIN_IDENTIFIER}-basepath-nested-stack-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-basepath-nested-stack
33

44
frameworkVersion: "4.2.5"
55

@@ -23,7 +23,7 @@ plugins:
2323
- serverless-plugin-split-stacks
2424
custom:
2525
customDomain:
26-
domainName: ${env:PLUGIN_IDENTIFIER}-basepath-nested-stack-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
26+
domainName: ${env:PLUGIN_IDENTIFIER}-basepath-nested-stack.${env:TEST_DOMAIN}
2727
basePath: 'api'
2828
stage: ${self:provider.stage}
2929
createRoute53Record: true

test/integration-tests/deploy/basepath/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with custom basepath
2-
service: ${env:PLUGIN_IDENTIFIER}-basepath-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-basepath
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-basepath-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-basepath.${env:TEST_DOMAIN}
2626
basePath: 'api'
2727

2828
package:

test/integration-tests/deploy/custom-apigateway/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with default values
2-
service: ${env:PLUGIN_IDENTIFIER}-custom-apigateway-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-custom-apigateway
33

44
frameworkVersion: "4.2.5"
55

@@ -27,7 +27,7 @@ plugins:
2727
- serverless-domain-manager
2828
custom:
2929
customDomain:
30-
domainName: ${env:PLUGIN_IDENTIFIER}-custom-apigateway-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
30+
domainName: ${env:PLUGIN_IDENTIFIER}-custom-apigateway.${env:TEST_DOMAIN}
3131

3232
package:
3333
patterns:

test/integration-tests/deploy/default/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with default values
2-
service: ${env:PLUGIN_IDENTIFIER}-default-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-default
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-default-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-default.${env:TEST_DOMAIN}
2626

2727
package:
2828
patterns:

test/integration-tests/deploy/http-api/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-http-api-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-http-api
22

33
frameworkVersion: "4.2.5"
44

@@ -20,7 +20,7 @@ plugins:
2020
- serverless-domain-manager
2121
custom:
2222
customDomain:
23-
domainName: ${env:PLUGIN_IDENTIFIER}-http-api-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
23+
domainName: ${env:PLUGIN_IDENTIFIER}-http-api.${env:TEST_DOMAIN}
2424
endpointType: REGIONAL
2525
apiType: http
2626
# the stage should be set to $default for the base path (none)

test/integration-tests/deploy/regional-basepath/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with regional endpoint, custom basePath
2-
service: ${env:PLUGIN_IDENTIFIER}-regional-basepath-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-regional-basepath
33

44
frameworkVersion: "4.2.5"
55

@@ -23,7 +23,7 @@ plugins:
2323
- serverless-domain-manager
2424
custom:
2525
customDomain:
26-
domainName: ${env:PLUGIN_IDENTIFIER}-regional-basepath-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
26+
domainName: ${env:PLUGIN_IDENTIFIER}-regional-basepath.${env:TEST_DOMAIN}
2727
basePath: 'api'
2828
endpointType: REGIONAL
2929

test/integration-tests/deploy/regional-stage-basepath/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with regional endpoint, custom stage, empty basepath
2-
service: ${env:PLUGIN_IDENTIFIER}-regional-stage-basepath-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-regional-stage-basepath
33

44
frameworkVersion: "4.2.5"
55

@@ -23,7 +23,7 @@ plugins:
2323
- serverless-domain-manager
2424
custom:
2525
customDomain:
26-
domainName: ${env:PLUGIN_IDENTIFIER}-regional-stage-basepath-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
26+
domainName: ${env:PLUGIN_IDENTIFIER}-regional-stage-basepath.${env:TEST_DOMAIN}
2727
stage: test
2828
basePath: ''
2929
endpointType: REGIONAL

test/integration-tests/deploy/regional-tls-1-0/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Test regional domains with TLS 1.0
2-
service: ${env:PLUGIN_IDENTIFIER}-regional-tls-1-0-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-regional-tls-1-0
33

44
frameworkVersion: "4.2.5"
55

@@ -24,7 +24,7 @@ plugins:
2424
- serverless-domain-manager
2525
custom:
2626
customDomain:
27-
domainName: ${env:PLUGIN_IDENTIFIER}-regional-tls-1-0-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
27+
domainName: ${env:PLUGIN_IDENTIFIER}-regional-tls-1-0.${env:TEST_DOMAIN}
2828
securityPolicy: tls_1_0
2929
endpointType: REGIONAL
3030

test/integration-tests/deploy/route-53-latency-routing/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-route-53-latency-routing-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-route-53-latency-routing
22

33
frameworkVersion: "4.2.5"
44

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-route-53-latency-routing-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-route-53-latency-routing.${env:TEST_DOMAIN}
2626
endpointType: REGIONAL
2727
route53Params:
2828
routingPolicy: latency

test/integration-tests/deploy/route-53-weighted-routing/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-route-53-weighted-routing-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-route-53-weighted-routing
22

33
frameworkVersion: "4.2.5"
44

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-route-53-weighted-routing-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-route-53-weighted-routing.${env:TEST_DOMAIN}
2626
endpointType: REGIONAL
2727
route53Params:
2828
routingPolicy: weighted

test/integration-tests/deploy/split-horizon-dns/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
service: ${env:PLUGIN_IDENTIFIER}-split-horizon-dns-${env:RANDOM_STRING}
1+
service: ${env:PLUGIN_IDENTIFIER}-split-horizon-dns
22

33
frameworkVersion: "4.2.5"
44

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-split-horizon-dns-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-split-horizon-dns.${env:TEST_DOMAIN}
2626
endpointType: REGIONAL
2727
splitHorizonDns: true
2828
package:

test/integration-tests/deploy/stage-basepath/serverless.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enabled with custom stage and empty basepath
2-
service: ${env:PLUGIN_IDENTIFIER}-stage-basepath-${env:RANDOM_STRING}
2+
service: ${env:PLUGIN_IDENTIFIER}-stage-basepath
33

44
frameworkVersion: "4.2.5"
55

@@ -22,7 +22,7 @@ plugins:
2222
- serverless-domain-manager
2323
custom:
2424
customDomain:
25-
domainName: ${env:PLUGIN_IDENTIFIER}-stage-basepath-${env:RANDOM_STRING}.${env:TEST_DOMAIN}
25+
domainName: ${env:PLUGIN_IDENTIFIER}-stage-basepath.${env:TEST_DOMAIN}
2626
stage: test
2727
basePath: ''
2828

0 commit comments

Comments
 (0)