Skip to content

Commit

Permalink
chore(docs): tweaks to awscdk platform docs (#6517)
Browse files Browse the repository at this point in the history
* Remove the `output` from `cdk.json`
* Move environment variables to `.env`

## Checklist

- [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [x] Description explains motivation and solution
- [x] Tests added (always)
- [x] Docs updated (only required for features)
- [x] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
eladb authored May 18, 2024
1 parent 305def8 commit f6d1493
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/docs/055-platforms/awscdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ and the `output` fields:

```json
{
"app": "CDK_STACK_NAME='MyStack' CDK_AWS_ACCOUNT='111111555555' CDK_AWS_REGION='us-east-1' wing compile --platform @winglang/platform-awscdk main.w",
"output": "target/main.awscdk",
"app": "wing compile --output cdk.out --platform @winglang/platform-awscdk main.w",
// ... rest of cdk.json
}
```

The `awscdk` platform uses the following environment variables as configuration options:
You will also need to set the following environment variables. You can define them in your shell or in a `.env` file:

* `CDK_STACK_NAME` (required) - sets the CloudFormation stack name to use.
- `CDK_AWS_ACCOUNT` and `CDK_AWS_REGION` (optional) - the AWS environment for deployment and context
lookups (e.g. VPC lookups). The default is to use the AWS account region defined in the CLI
environment.
```dotenv
# (required) sets the CloudFormation stack name to use.
CDK_STACK_NAME=MyStack
# AWS account to deploy to (required if you are using context lookups, optional otherwise)
CDK_AWS_ACCOUNT=111111555555
# AWS region to deploy to (required if you are using context lookups, optional otherwise)
CDK_AWS_REGION=us-east-1
```

Now, the AWS CDK CLI will work as normal:

Expand Down

0 comments on commit f6d1493

Please sign in to comment.