From f6d149392d23820ca5cf25565583ec1abc65f0a2 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Sat, 18 May 2024 14:15:16 -0400 Subject: [PATCH] chore(docs): tweaks to awscdk platform docs (#6517) * 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)*. --- docs/docs/055-platforms/awscdk.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/docs/055-platforms/awscdk.md b/docs/docs/055-platforms/awscdk.md index fa4dc4f1ec9..8806e31fd4f 100644 --- a/docs/docs/055-platforms/awscdk.md +++ b/docs/docs/055-platforms/awscdk.md @@ -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: