diff --git a/output.tf b/output.tf index 0e7638c..cc4c8c6 100644 --- a/output.tf +++ b/output.tf @@ -14,11 +14,16 @@ output "hosts" { } } + output "scaleway_service_keys" { value = scaleway_iam_api_key.service_keys sensitive = true } +output "scaleway_service_buckets" { + value = scaleway_object_bucket.service_buckets +} + output "scaleway_registry_endpoint_public" { value = scaleway_registry_namespace.public.endpoint } diff --git a/roles/forgejo/vars/main.yml b/roles/forgejo/vars/main.yml index 13f96a8..56b7247 100644 --- a/roles/forgejo/vars/main.yml +++ b/roles/forgejo/vars/main.yml @@ -71,11 +71,11 @@ forgejo_env: FORGEJO__actions__ENABLED: true FORGEJO__storage__STORAGE_TYPE: minio - FORGEJO__storage__MINIO_ENDPOINT: s3.nl-ams.scw.cloud + FORGEJO__storage__MINIO_ENDPOINT: "{{ opentofu.scaleway_service_buckets.forgejo.api_endpoint | urlsplit('hostname') }}" FORGEJO__storage__MINIO_ACCESS_KEY_ID: "{{ opentofu.scaleway_service_keys.forgejo.access_key }}" FORGEJO__storage__MINIO_SECRET_ACCESS_KEY: "{{ opentofu.scaleway_service_keys.forgejo.secret_key }}" - FORGEJO__storage__MINIO_BUCKET: forgejo.serguzim.me - FORGEJO__storage__MINIO_LOCATION: ns-ams + FORGEJO__storage__MINIO_BUCKET: "{{ opentofu.scaleway_service_buckets.forgejo.name }}" + FORGEJO__storage__MINIO_LOCATION: "{{ opentofu.scaleway_service_buckets.forgejo.region }}" FORGEJO__storage__MINIO_USE_SSL: true FORGEJO__other__SHOW_FOOTER_VERSION: true diff --git a/roles/linkwarden/vars/main.yml b/roles/linkwarden/vars/main.yml index ff86056..54b82fe 100644 --- a/roles/linkwarden/vars/main.yml +++ b/roles/linkwarden/vars/main.yml @@ -21,9 +21,9 @@ linkwarden_env: SPACES_KEY: "{{ linkwarden_s3_accesskey }}" SPACES_SECRET: "{{ linkwarden_s3_secretkey }}" - SPACES_ENDPOINT: https://s3.nl-ams.scw.cloud - SPACES_BUCKET_NAME: linkwarden.serguzim.me - SPACES_REGION: ns-ams + SPACES_ENDPOINT: "{{ opentofu.scaleway_service_buckets.linkwarden.api_endpoint }}" + SPACES_BUCKET_NAME: "{{ opentofu.scaleway_service_buckets.linkwarden.name }}" + SPACES_REGION: "{{ opentofu.scaleway_service_buckets.linkwarden.region }}" SPACES_FORCE_PATH_STYLE: false NEXT_PUBLIC_DISABLE_REGISTRATION: true