Skip to content

Commit eae6cbd

Browse files
committed
chore: Update output command to also allow skipping provider lock
1 parent 4af72e3 commit eae6cbd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/cdktf-cli/src/bin/cmds/output.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ class Command extends BaseCommand {
4848
required: false,
4949
desc: "Skip synthesis of the application, assume the synthesized Terraform code is already present and up to date",
5050
})
51+
.option("skip-provider-lock", {
52+
type: "boolean",
53+
default: false,
54+
required: false,
55+
desc: "Block `terraform provider lock` from being run for any reason. Warning: This may cause issues when used with HCP Terraform",
56+
})
5157
.showHelpOnFail(true);
5258

5359
public async handleCommand(argv: any) {

packages/cdktf-cli/src/bin/cmds/ui/output.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type OutputConfig = {
1616
onOutputsRetrieved: (outputs: NestedTerraformOutputs) => void;
1717
outputsPath?: string;
1818
skipSynth?: boolean;
19+
skipProviderLock?: boolean;
1920
};
2021

2122
export const Output = ({
@@ -25,13 +26,15 @@ export const Output = ({
2526
onOutputsRetrieved,
2627
outputsPath,
2728
skipSynth,
29+
skipProviderLock,
2830
}: OutputConfig): React.ReactElement => {
2931
const { status, logEntries, returnValue } = useCdktfProject(
3032
{ outDir, synthCommand },
3133
async (project) => {
3234
const outputs = await project.fetchOutputs({
3335
stackNames: targetStacks,
3436
skipSynth,
37+
skipProviderLock,
3538
});
3639
onOutputsRetrieved(outputs);
3740
return outputs;

0 commit comments

Comments
 (0)