Created
February 26, 2020 11:05
-
-
Save heitorlessa/3ff97e5b5fabefcda9f3e1cde7497b0b to your computer and use it in GitHub Desktop.
Amplify-Console-Simon-AWS-Blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Parameters: | |
| Repository: | |
| Type: String | |
| Description: GitHub Repository URL | |
| OauthToken: | |
| Type: String | |
| Description: GitHub Repository URL | |
| NoEcho: true | |
| Domain: | |
| Type: String | |
| Description: Domain name to host application | |
| Resources: | |
| AmplifyRole: | |
| Type: AWS::IAM::Role | |
| Properties: | |
| AssumeRolePolicyDocument: | |
| Version: 2012-10-17 | |
| Statement: | |
| - Effect: Allow | |
| Principal: | |
| Service: | |
| - amplify.amazonaws.com | |
| Action: | |
| - sts:AssumeRole | |
| Policies: | |
| - PolicyName: Amplify | |
| PolicyDocument: | |
| Version: 2012-10-17 | |
| Statement: | |
| - Effect: Allow | |
| Action: "amplify:*" | |
| Resource: "*" | |
| AmplifyApp: | |
| Type: "AWS::Amplify::App" | |
| Properties: | |
| Name: TodoApp | |
| Repository: !Ref Repository | |
| Description: VueJS Todo example app | |
| OauthToken: !Ref OauthToken | |
| BuildSpec: |- | |
| version: 0.1 | |
| frontend: | |
| phases: | |
| build: | |
| commands: | |
| - cp dist/vue.min.js examples/todomvc/ | |
| artifacts: | |
| baseDirectory: examples/todomvc/ | |
| files: | |
| - '*' | |
| CustomRules: | |
| - Source: /dist/vue.min.js | |
| Target: /vue.min.js | |
| Status: '200' | |
| Tags: | |
| - Key: Name | |
| Value: Todo | |
| IAMServiceRole: !GetAtt AmplifyRole.Arn | |
| AmplifyBranch: | |
| Type: AWS::Amplify::Branch | |
| Properties: | |
| BranchName: master | |
| AppId: !GetAtt AmplifyApp.AppId | |
| Description: Master Branch | |
| EnableAutoBuild: true | |
| Tags: | |
| - Key: Name | |
| Value: todo-master | |
| - Key: Branch | |
| Value: master | |
| AmplifyDomain: | |
| Type: AWS::Amplify::Domain | |
| Properties: | |
| DomainName: !Ref Domain | |
| AppId: !GetAtt AmplifyApp.AppId | |
| SubDomainSettings: | |
| - Prefix: master | |
| BranchName: !GetAtt AmplifyBranch.BranchName | |
| Outputs: | |
| DefaultDomain: | |
| Value: !GetAtt AmplifyApp.DefaultDomain | |
| MasterBranchUrl: | |
| Value: !Join [ ".", [ !GetAtt AmplifyBranch.BranchName, !GetAtt AmplifyDomain.DomainName ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment