Ryan Lahfa
2ce8c125d4
All checks were successful
Check meta / check_dns (pull_request) Successful in 20s
Check meta / check_meta (pull_request) Successful in 20s
lint / check (push) Successful in 28s
lint / check (pull_request) Successful in 24s
build configuration / build_and_cache_compute01 (pull_request) Successful in 1m30s
build configuration / build_and_cache_geo01 (pull_request) Successful in 1m9s
build configuration / build_and_cache_storage01 (pull_request) Successful in 1m17s
build configuration / build_and_cache_rescue01 (pull_request) Successful in 1m15s
build configuration / build_and_cache_krz01 (pull_request) Successful in 2m7s
build configuration / build_and_cache_geo02 (pull_request) Successful in 1m8s
build configuration / build_and_cache_vault01 (pull_request) Successful in 1m22s
build configuration / build_and_cache_bridge01 (pull_request) Successful in 1m5s
build configuration / build_and_cache_web02 (pull_request) Successful in 1m15s
build configuration / build_and_cache_web01 (pull_request) Successful in 1m45s
Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ lib, ... }:
|
|
let
|
|
inherit (lib) tf;
|
|
in
|
|
{
|
|
# FIXME: add a NixOS module to abstract bucket creation, etc.
|
|
config = {
|
|
terraform.required_providers.garage = {
|
|
version = "~> 1.0.3";
|
|
source = "registry.opentofu.org/RaitoBezarius/garage";
|
|
};
|
|
|
|
resource = {
|
|
secret_resource.admin-s3-token.lifecycle.prevent_destroy = true;
|
|
garage_bucket = {
|
|
monorepo-terraform-state = { };
|
|
impress-raito-demo = { };
|
|
};
|
|
|
|
garage_bucket_global_alias = {
|
|
monorepo-terraform-state = {
|
|
bucket_id = tf.ref "resource.garage_bucket.monorepo-terraform-state.id";
|
|
alias = "monorepo-terraform-state";
|
|
};
|
|
impress-raito-demo = {
|
|
bucket_id = tf.ref "resource.garage_bucket.impress-raito-demo.id";
|
|
alias = "impress-raito-demo";
|
|
};
|
|
};
|
|
|
|
garage_key = {
|
|
raito-dinum-test = {
|
|
name = "raito-dinum-test";
|
|
permissions.create_bucket = false;
|
|
};
|
|
};
|
|
garage_bucket_key = {
|
|
raito-dinum-test = {
|
|
bucket_id = tf.ref "resource.garage_bucket.impress-raito-demo.id";
|
|
access_key_id = tf.ref "resource.garage_key.raito-dinum-test.access_key_id";
|
|
read = true;
|
|
write = true;
|
|
owner = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
provider.garage = {
|
|
host = "s3-admin.dgnum.eu";
|
|
scheme = "https";
|
|
token = tf.ref "resource.secret_resource.admin-s3-token.value";
|
|
};
|
|
};
|
|
}
|