Skip to content

Commit

Permalink
feat: remove the collie kit compile command
Browse files Browse the repository at this point in the history
We figured out this use case is better served by tools like pre-commit-terraform
https://github.com/antonbabenko/pre-commit-terraform?tab=readme-ov-file#terraform_validate
which includes more robust handling of terraform's quirks. Given that
there are better solutions out there, we think it's best to remove this
feature from collie and focus our resources on unique features.

Additionally, using "terraform validate" is a bad fit for validating
kit modules as it has big problems with configuration_aliases
hashicorp/terraform#28490
It seems that it is much better suited to validating platform modules instead.
  • Loading branch information
JohannesRudolph committed Aug 28, 2024
1 parent db88e1a commit b6de319
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 126 deletions.
15 changes: 0 additions & 15 deletions src/api/CliApiFacadeFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ export class CliApiFacadeFactory {
return azure;
}

// buildCustom() {
// }

public buildGit() {
const detectorRunner = this.buildQuietLoggingProcessRunner();
const detector = new GitCliDetector(detectorRunner);
Expand Down Expand Up @@ -166,18 +163,6 @@ export class CliApiFacadeFactory {
return new TerraformDocsCliFacade(repo, processRunner);
}

public buildTerraform() {
const quietRunner = this.buildQuietLoggingProcessRunner();
const detector = new TerraformCliDetector(quietRunner);

const processRunner = this.wrapFacadeProcessRunner(
quietRunner,
new ProcessRunnerErrorResultHandler(detector),
);

return new TerraformCliFacade(processRunner);
}

// DESIGN: we need to build up the ProcessRunner behavior in the following order (from outer to inner)
// - DefaultsProcessRunnerDecorator -> customise the command that gets run
// - ResultHandlerProcessRunnerDecorator -> retry/print error on what actually ran
Expand Down
22 changes: 0 additions & 22 deletions src/api/terraform/TerraformCliFacade.ts

This file was deleted.

87 changes: 0 additions & 87 deletions src/commands/kit/compile.command.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/commands/kit/kit.command.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { makeTopLevelCommand, TopLevelCommand } from "../TopLevelCommand.ts";
import { registerApplyCmd } from "./apply.command.ts";
import { registerCompileCmd } from "./compile.command.ts";
import { registerImportCmd } from "./import.command.ts";
import { registerNewCmd } from "./new.command.ts";
import { registerTreeCmd } from "./tree.command.ts";
Expand All @@ -11,7 +10,6 @@ export function registerKitCommand(program: TopLevelCommand) {
registerApplyCmd(kitCommands);
registerImportCmd(kitCommands);
registerTreeCmd(kitCommands);
registerCompileCmd(kitCommands);

program
.command("kit", kitCommands)
Expand Down

0 comments on commit b6de319

Please sign in to comment.