-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform cleanups #459
Terraform cleanups #459
Changes from all commits
c41fa15
7adb39f
311bb2f
247d6d3
bd8e546
c183e6d
952f53d
cd9350e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use flake | ||
use flake .#terraform | ||
|
||
export AWS_CONFIG_FILE=$PWD/aws-config | ||
export AWS_PROFILE=nixos-prod | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
cd "$(dirname "$0")" | ||
rm -f .terraform.lock.hcl | ||
tofu init | ||
tofu "$@" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use flake | ||
use flake .#terraform | ||
|
||
export AWS_CONFIG_FILE=$PWD/aws-config | ||
export AWS_PROFILE=nixos-prod | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
let | ||
convert2Tofu = | ||
provider: | ||
provider.override (prev: { | ||
homepage = builtins.replaceStrings [ "registry.terraform.io/providers" ] [ | ||
"registry.opentofu.org" | ||
] prev.homepage; | ||
}); | ||
in | ||
{ | ||
perSystem = | ||
{ pkgs, ... }: | ||
{ | ||
devShells.terraform = pkgs.mkShellNoCC { | ||
packages = [ | ||
pkgs.awscli2 | ||
(pkgs.opentofu.withPlugins ( | ||
p: | ||
builtins.map convert2Tofu [ | ||
p.aws | ||
p.fastly | ||
p.netlify | ||
p.secret | ||
] | ||
++ [ | ||
# FIXME: for our `terraform` target our state file still uses the old registry prefix | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to patch the state after this pull request is merged to not break the existing setup. |
||
p.aws | ||
p.fastly | ||
p.netlify | ||
p.secret | ||
] | ||
)) | ||
]; | ||
}; | ||
}; | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
cd "$(dirname "$0")" | ||
rm -f .terraform.lock.hcl | ||
tofu init | ||
tofu "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this slow down each terraform invocation?