-
Notifications
You must be signed in to change notification settings - Fork 19
added custom domain route53 provider to dstack ingress #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
52b8f0f
f12b93f
4e4c9b4
6fbd100
4fe361e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| AWSTemplateFormatVersion: '2010-09-09' | ||
|
|
||
| Parameters: | ||
| HostedZoneId: | ||
| Type: String | ||
| Default: | ||
|
Check failure on line 6 in custom-domain/dstack-ingress/CLOUDFORMATION_EXAMPLE.yaml
|
||
| Description: Route53 Hosted Zone ID | ||
| UserName: | ||
| Type: String | ||
| Description: IAM user that can only assume the Route53 role | ||
|
|
||
| Resources: | ||
| User: | ||
| Type: AWS::IAM::User | ||
| Properties: | ||
| UserName: !Ref UserName | ||
|
|
||
| AccessKey: | ||
| Type: AWS::IAM::AccessKey | ||
| Properties: | ||
| UserName: !Ref User | ||
| Status: Active | ||
|
|
||
| Route53Role: | ||
| Type: AWS::IAM::Role | ||
| Properties: | ||
| RoleName: !Sub '${UserName}-route53-role' | ||
| AssumeRolePolicyDocument: | ||
| Version: '2012-10-17' | ||
| Statement: | ||
| - Effect: Allow | ||
| # The *account root* as trusted principal. | ||
| # This avoids invalid-principal errors while remaining safe, | ||
| # because the USER policy enforces the actual restriction. | ||
| Principal: | ||
| AWS: !Sub arn:aws:iam::${AWS::AccountId}:root | ||
| Action: sts:AssumeRole | ||
| Policies: | ||
| - PolicyName: Route53DnsChallenges | ||
| PolicyDocument: | ||
| Version: '2012-10-17' | ||
| Statement: | ||
| - Sid: AllowDnsChallengeChanges | ||
| Effect: Allow | ||
| Action: | ||
| - route53:ChangeResourceRecordSets | ||
| Resource: !Sub arn:aws:route53:::hostedzone/${HostedZoneId} | ||
| - Sid: AllowListingForDnsChallenge | ||
| Effect: Allow | ||
| Action: | ||
| - route53:ListHostedZonesByName | ||
| - route53:ListHostedZones | ||
| - route53:GetChange | ||
| - route53:ListResourceRecordSets | ||
| Resource: "*" | ||
|
|
||
| UserAssumeRolePolicy: | ||
| Type: AWS::IAM::Policy | ||
| Properties: | ||
| PolicyName: !Sub '${UserName}-assume-route53-role' | ||
| Users: | ||
| - !Ref User | ||
| PolicyDocument: | ||
| Version: '2012-10-17' | ||
| Statement: | ||
| - Effect: Allow | ||
| Action: | ||
| - sts:AssumeRole | ||
| Resource: !Sub arn:aws:iam::${AWS::AccountId}:role/${UserName}-route53-role | ||
|
|
||
| Outputs: | ||
| AWSAccessKeyId: | ||
| Description: Access key ID for the IAM user | ||
| Value: !Ref AccessKey | ||
|
|
||
| AWSSecretAccessKey: | ||
| Description: Secret access key for the IAM user | ||
| Value: !GetAtt AccessKey.SecretAccessKey | ||
|
|
||
| AWSUserArn: | ||
| Description: IAM User ARN | ||
| Value: !Sub arn:aws:iam::${AWS::AccountId}:user/${UserName} | ||
|
|
||
| Route53RoleArn: | ||
| Description: ARN of the Route53 role used by Certbot | ||
| Value: !Sub arn:aws:iam::${AWS::AccountId}:role/${UserName}-route53-role | ||
Uh oh!
There was an error while loading. Please reload this page.