Skip to content

Commit e6ad44a

Browse files
chore: add deprecation notice for managed drift detection (#4744)
1 parent f29c5e6 commit e6ad44a

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/lib/iac/drift/driftctl.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,24 @@ export const runDriftCTL = async ({
239239
}): Promise<DriftctlExecutionResult> => {
240240
const path = await findOrDownload();
241241
await validateArgs(options);
242+
243+
if (options.kind === 'describe') {
244+
const descOptions = options as DescribeOptions;
245+
246+
if (
247+
descOptions.deep ||
248+
descOptions.all ||
249+
descOptions['only-managed'] ||
250+
descOptions.drift
251+
) {
252+
process.stderr.write(
253+
`DEPRECATION NOTICE: Drift detection of managed resources,\n` +
254+
`including --only-managed and --drift has been deprecated.\n` +
255+
`The end-of-life date for drift detection of managed resources is September 30. 2023.\n\n`,
256+
);
257+
}
258+
}
259+
242260
const args = await generateArgs(options, driftIgnore);
243261

244262
if (!stdio) {

test/jest/acceptance/iac/describe.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('iac describe', () => {
172172
);
173173

174174
expect(stdout).toBe('');
175-
expect(stderr).toBe('');
175+
expect(stderr).toContain('DEPRECATION NOTICE');
176176
expect(exitCode).toBe(0);
177177

178178
const output = fs.readFileSync(outputFile).toString();

0 commit comments

Comments
 (0)