-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #459 from NixOS/terraform-iam-cleanups
Terraform cleanups
- Loading branch information
Showing
14 changed files
with
71 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
p.aws | ||
p.fastly | ||
p.netlify | ||
p.secret | ||
] | ||
)) | ||
]; | ||
}; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |