Skip to content

Commit

Permalink
Merge pull request fluidattacks#1400 from dsalaza4/main
Browse files Browse the repository at this point in the history
refac(back): fluidattacks#1378 deprecate tf workspaces
  • Loading branch information
jandresh authored Dec 12, 2024
2 parents 5f14384 + d7928af commit c269afe
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 166 deletions.
57 changes: 0 additions & 57 deletions docs/src/api/builtins/utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,60 +76,3 @@ m github:fluidattacks/[email protected] /utils/makeSopsEncryptedFile \

- `kms_key_arn` is the arn of the key you will use for encrypting the file.
- `output` is the path for your resulting encrypted file.

## workspaceForTerraformFromEnv

Sets a [Terraform Workspace](https://developer.hashicorp.com/terraform/language/state/workspaces)
specified via environment variable.

Types:

- workspaceForTerraformFromEnv:
- modules (`attrsOf moduleType`): Optional.
Terraform modules to switch workspace.
Defaults to `{ }`.
- moduleType (`submodule`):
- setup (`listOf package`): Optional.
[Makes Environment](./environment.md)
or [Makes Secrets](./secrets.md)
to `source` (as in Bash's `source`)
before anything else.
Defaults to `[ ]`.
- src (`str`):
Path to the Terraform module.
- variable (`str`): Optional.
Name of the environment variable that contains
the name of the workspace you want to use.
Defaults to `""`.
When `""` provided, workspace is `default`.
- version (`enum [ "0.14" "0.15" "1.0" ]`):
Terraform version your module is built with.

Example:

=== "makes.nix"

```nix
{
testTerraform = {
modules = {
module1 = {
setup = [
outputs."/workspaceForTerraformFromEnv/module1"
];
src = "/my/module1";
version = "0.14";
};
};
};
workspaceForTerraformFromEnv = {
modules = {
module1 = {
src = "/my/module1";
variable = "CI_COMMIT_REF_NAME";
version = "0.14";
};
};
};
}
```
2 changes: 0 additions & 2 deletions src/args/agnostic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ let
import ./make-terraform-environment/default.nix self;
makeSslCertificate = import ./make-ssl-certificate/default.nix self;
makeTemplate = import ./make-template/default.nix self;
makeWorkspaceForTerraformFromEnv =
import ./make-workspace-for-terraform-from-env/default.nix self;
managePorts = import ./manage-ports/default.nix self;
patchShebangs = import ./patch-shebangs/default.nix self;
pythonOverrideUtils = import ./python-override-utils/default.nix;
Expand Down
14 changes: 0 additions & 14 deletions src/args/make-workspace-for-terraform-from-env/default.nix

This file was deleted.

50 changes: 0 additions & 50 deletions src/args/make-workspace-for-terraform-from-env/template.sh

This file was deleted.

1 change: 0 additions & 1 deletion src/evaluator/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
(import ./secrets-for-terraform-from-env/default.nix args)
(import ./test-license/default.nix args)
(import ./test-terraform/default.nix args)
(import ./workspace-for-terraform-from-env args)
];
options = {
globalStateDir = lib.mkOption {
Expand Down
42 changes: 0 additions & 42 deletions src/evaluator/modules/workspace-for-terraform-from-env/default.nix

This file was deleted.

0 comments on commit c269afe

Please sign in to comment.