Skip to content

Commit

Permalink
docs: note that Apps outdir property should not be used (aws#16670)
Browse files Browse the repository at this point in the history
If this property is passed it has to agree with the CLI's `--output` flag.

If this property is not passed, it will default to the CLI's `--output`
flag.

In either case, it's better to just use `--output` and not pass this
property at all; the property only has value inside tests.

I tried to add validation (by using `Annotations.of(app).addWarning()` but they are
useless anyway: in the CX protocol, metadata can only be attached to `StackArtifacts`,
so metadata attached to the `App` will not be rendered.

Adding a full framework feature to move metadata to a different place feels like too much
risk and work for this small note, so turned it into a documentation fix.

Fixes aws#3717.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored and TikiTDO committed Feb 21, 2022
1 parent 2689102 commit 5c0f242
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@aws-cdk/core/lib/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export interface AppProps {
/**
* The output directory into which to emit synthesized artifacts.
*
* You should never need to set this value. By default, the value you pass to
* the CLI's `--output` flag will be used, and if you change it to a different
* directory the CLI will fail to pick up the generated Cloud Assembly.
*
* This property is intended for internal and testing use.
*
* @default - If this value is _not_ set, considers the environment variable `CDK_OUTDIR`.
* If `CDK_OUTDIR` is not defined, uses a temp directory.
*/
Expand Down

0 comments on commit 5c0f242

Please sign in to comment.