Skip to content

Commit fdc535b

Browse files
authored
Merge pull request #11 from y-temp4/fix-template
ALIS-3187: Fix template
2 parents 9c4aa84 + ddfe412 commit fdc535b

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,5 @@ $ aws cloudformation update-stack --stack-name <スタック名> --template-url
108108
APIをデプロイ後にdns-templateのスタックをデプロイすることでドメインが割り当てられます
109109

110110
```
111-
aws cloudformation deploy --stack-name <スタック名> --template /path/to/dns-template.yml --capabilities '["CAPABILITY_AUTO_EXPAND"]' --parameter-overrides Doamin=<ネイキッドドメイン> SubDomain=<サブドメイン> HostedZoneId=<Route53のゾーンID> RestApiId=<割り当てたいAPIのID> CertificateArn=<ACMで発行した証明書のARN>
111+
aws cloudformation deploy --stack-name <スタック名> --template /path/to/dns-template.yml --capabilities '["CAPABILITY_AUTO_EXPAND"]' --parameter-overrides AlisAppId=$ALIS_APP_ID Doamin=<ネイキッドドメイン> SubDomain=<サブドメイン> HostedZoneId=<Route53のゾーンID> RestApiId=<割り当てたいAPIのID> CertificateArn=<ACMで発行した証明書のARN>
112112
```

dns-template.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ AWSTemplateFormatVersion: '2010-09-09'
22
Description: OAuth API Domain
33

44
Parameters:
5+
AlisAppId:
6+
Type: String
57
Doamin:
68
Type: String
79
Default: alis.to
@@ -27,18 +29,15 @@ Resources:
2729
TTL: 60
2830
Type: CNAME
2931
ResourceRecords:
30-
- !GetAtt RestApiDomain.RegionalDomainName
32+
- !GetAtt RestApiDomain.DistributionDomainName
3133
RestApiDomain:
3234
Type: AWS::ApiGateway::DomainName
3335
Properties:
3436
DomainName: !Sub
3537
- ${SubDomain}.${Domain}
3638
- SubDomain: !Ref SubDomain
3739
Domain: !Ref Doamin
38-
EndpointConfiguration:
39-
Types:
40-
- REGIONAL
41-
RegionalCertificateArn: !Ref CertificateArn
40+
CertificateArn: !Ref CertificateArn
4241
ApiBasePathMapping:
4342
Type: AWS::ApiGateway::BasePathMapping
4443
Properties:
@@ -47,7 +46,7 @@ Resources:
4746
- SubDomain: !Ref SubDomain
4847
Domain: !Ref Doamin
4948
RestApiId: !Ref RestApiId
50-
Stage: production
49+
Stage: !Ref AlisAppId
5150
DependsOn:
5251
- RestApiRecordSet
5352
- RestApiDomain

serverless.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ provider:
88
endpointType: regional
99
memorySize: 256
1010
environment:
11-
AUTHLETE_API_KEY: ${ssm:${env:ALIS_APP_ID}ssmAutlteleApiKey}
12-
AUTHLETE_API_SECRET: ${ssm:${env:ALIS_APP_ID}ssmAutlteleApiSecret}
11+
AUTHLETE_API_KEY: ${ssm:${env:ALIS_APP_ID}ssmAuthleteApiKey}
12+
AUTHLETE_API_SECRET: ${ssm:${env:ALIS_APP_ID}ssmAuthleteApiSecret}
1313
COGNITO_USER_POOL_ID: ${ssm:${env:ALIS_APP_ID}ssmCognitoUserPoolId}
1414
iamRoleStatements:
1515
- Effect: "Allow"

tests/integration/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ def __init__(self, client_id, client_secret=None):
5555

5656
ssm = boto3.client('ssm')
5757
param = ssm.get_parameter(
58-
Name=os.environ['ALIS_APP_ID'] + 'ssmAutlteleApiKey'
58+
Name=os.environ['ALIS_APP_ID'] + 'ssmAuthleteApiKey'
5959
)
6060
self.authlete_api_key = param['Parameter']['Value']
6161
param = ssm.get_parameter(
62-
Name=os.environ['ALIS_APP_ID'] + 'ssmAutlteleApiSecret'
62+
Name=os.environ['ALIS_APP_ID'] + 'ssmAuthleteApiSecret'
6363
)
6464
self.authlete_api_secret = param['Parameter']['Value']
6565

0 commit comments

Comments
 (0)