Skip to content

Commit 5484890

Browse files
committed
Add stackName to deploy plugin methods and link to CloudFormation docs.
1 parent 9f1e134 commit 5484890

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/views/docs/en/guides/developer-experience/custom-cloudformation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Architect [`@plugins`](/docs/en/guides/plugins/overview) are implemented as a No
1616
```javascript
1717
// Do something only for staging deployments
1818
module.exports = { deploy: {
19-
start: async ({ arc, cloudformation, dryRun, inventory, stage }) => {
19+
start: async ({ arc, cloudformation, dryRun, inventory, stackName, stage }) => {
2020
if (stage !== 'staging') return
2121

2222
let config = await getSomeConfig()

src/views/docs/en/guides/plugins/deploy.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ category: Plugins
44
description: '<code>deploy</code> lifecycle hook plugins'
55
---
66

7-
`deploy` lifecycle hook plugins expose functionality to extend the capabilities of Architect deployments.
7+
`deploy` lifecycle hook plugins expose functionality to extend the capabilities of [Architect deployments](../../../cli/reference/deploy).
88

99

1010
## Plugin parameters
@@ -14,9 +14,10 @@ All `deploy` methods accept async or synchronous functions, and receive a single
1414
| Property | Type | Description |
1515
|-------------------|---------|---------------------------------------------------|
1616
| `arc` | object | Raw Architect project object |
17-
| `cloudformation` | object | CloudFormation deployment |
17+
| `cloudformation` | object | [CloudFormation template][cfn-json] in JSON |
1818
| `dryRun` | boolean | `true` if `--dry-run` or `--eject` flags are used |
1919
| `inventory` | object | [Inventory](./inventory) object |
20+
| `stackName` | string | [CloudFormation stack][cfn-stack] name |
2021
| `stage` | string | `testing`, `staging` or `production` |
2122

2223

@@ -29,7 +30,7 @@ Example:
2930
```javascript
3031
// Do something only for staging deployments
3132
module.exports = { deploy: {
32-
start: async ({ arc, cloudformation, dryRun, inventory, stage }) => {
33+
start: async ({ arc, cloudformation, dryRun, inventory, stackName, stage }) => {
3334
if (stage !== 'staging') return
3435

3536
let config = await getSomeConfig()
@@ -50,7 +51,7 @@ Examples:
5051
```javascript
5152
// Create some identifiers associated with custom S3 bucket credentials
5253
module.exports = { deploy: {
53-
services: async ({ arc, cloudformation, dryRun, inventory, stage }) => {
54+
services: async ({ arc, cloudformation, dryRun, inventory, stackName, stage }) => {
5455
// If the user isn't using this plugin, you can just return
5556
if (!arc['myS3Bucket']) return
5657

@@ -89,7 +90,7 @@ Example:
8990

9091
```javascript
9192
module.exports = { deploy: {
92-
target: async ({ arc, cloudformation, dryRun, inventory, stage }) => {
93+
target: async ({ arc, cloudformation, dryRun, inventory, stackName, stage }) => {
9394
if (dryRun) return
9495

9596
deployToAnotherService({ inventory, stage })
@@ -107,8 +108,11 @@ Example:
107108
```javascript
108109
const { rm } = require('fs/promises')
109110
module.exports = { deploy: {
110-
end: async ({ arc, cloudformation, dryRun, inventory, stage }) => {
111+
end: async ({ arc, cloudformation, dryRun, inventory, stackName, stage }) => {
111112
await rm(someBuildArtifact)
112113
}
113114
} }
114115
```
116+
117+
[cfn-json]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-overview.html#cfn-concepts-templates
118+
[cfn-stack]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-overview.html#cfn-concepts-stacks

0 commit comments

Comments
 (0)