-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws/sam: add username SAM and example
- Loading branch information
Showing
6 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,45 @@ See the [AWS Security Credentials](https://docs.aws.amazon.com/general/latest/gr | |
|
||
- `AWS_DEFAULT_REGION`- **Optional** The AWS region name, defaults to `us-east-1` ([more info](https://docs.aws.amazon.com/general/latest/gr/rande.html)) | ||
- `AWS_DEFAULT_OUTPUT`- **Optional** The CLI's output output format, defaults to `json` ([more info](https://docs.aws.amazon.com/cli/latest/userguide/cli-environment.html)) | ||
|
||
## Example | ||
|
||
Package and deploy AWS SAM application with Slack notifications: | ||
|
||
```hcl | ||
workflow "Deployment" { | ||
on = "push" | ||
resolves = ["Deploy Notification"] | ||
} | ||
action "Build" { | ||
uses = "apex/actions/aws/sam@master" | ||
secrets = ["AWS_SECRET_ACCESS_KEY", "AWS_ACCESS_KEY_ID"] | ||
args = "package --template-file template.yml --output-template-file out.yml --s3-bucket my-bucket-name" | ||
} | ||
action "Build Notification" { | ||
needs = "Build" | ||
uses = "apex/actions/[email protected]" | ||
secrets = ["SLACK_WEBHOOK_URL"] | ||
} | ||
action "Deploy" { | ||
needs = "Build Notification" | ||
uses = "apex/actions/aws/sam@master" | ||
secrets = ["AWS_SECRET_ACCESS_KEY", "AWS_ACCESS_KEY_ID"] | ||
args = "deploy --stack-name myapp --capabilities CAPABILITY_IAM --template-file out.yml" | ||
env = { | ||
AWS_DEFAULT_REGION = "us-west-2" | ||
} | ||
} | ||
action "Deploy Notification" { | ||
needs = "Deploy" | ||
uses = "apex/actions/[email protected]" | ||
} | ||
``` | ||
|
||
## Notes | ||
|
||
This action generates a Slack message upon deployment. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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