Skip to content

Commit

Permalink
fix(cli): revert "fix(cli): format of tags in cdk.json is not validat…
Browse files Browse the repository at this point in the history
…ed" (#21092)

Reverts #21050

It breaks the CLI integ tests that get run on our internal pipelines. The error message is `Error: tags must be an array of { Tag: string, Value: string } objects`, which comes from the `validateTags` method in #21050. The test runs `cdk deploy --tag key=value` which I was able to test on my own account to verify that that is a valid way of adding tags to a stack.
  • Loading branch information
kaizencc authored Jul 11, 2022
1 parent 8fe43d6 commit dd9f5c5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
5 changes: 2 additions & 3 deletions packages/aws-cdk/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { data, debug, error, print, setLogLevel, setCI } from '../lib/logging';
import { displayNotices, refreshNotices } from '../lib/notices';
import { Command, Configuration, Settings } from '../lib/settings';
import * as version from '../lib/version';
import { validateTags } from './util/tags';

// https://github.com/yargs/yargs/issues/1929
// https://github.com/evanw/esbuild/issues/1492
Expand Down Expand Up @@ -435,7 +434,7 @@ async function initCommandLine() {
force: argv.force,
toolkitStackName: toolkitStackName,
execute: args.execute,
tags: validateTags(configuration.settings.get(['tags'])),
tags: configuration.settings.get(['tags']),
terminationProtection: args.terminationProtection,
parameters: {
bucketName: configuration.settings.get(['toolkitBucket', 'bucketName']),
Expand Down Expand Up @@ -465,7 +464,7 @@ async function initCommandLine() {
notificationArns: args.notificationArns,
requireApproval: configuration.settings.get(['requireApproval']),
reuseAssets: args['build-exclude'],
tags: validateTags(configuration.settings.get(['tags'])),
tags: configuration.settings.get(['tags']),
execute: args.execute,
changeSetName: args.changeSetName,
force: args.force,
Expand Down
20 changes: 0 additions & 20 deletions packages/aws-cdk/lib/util/tags.ts

This file was deleted.

31 changes: 0 additions & 31 deletions packages/aws-cdk/test/util/tags.test.ts

This file was deleted.

0 comments on commit dd9f5c5

Please sign in to comment.