Replace static s3 variables with opentofu output

This commit is contained in:
Tobias Reisinger 2024-09-28 00:30:46 +02:00
parent f8245550d0
commit 3a24ec2856
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 11 additions and 6 deletions

View file

@ -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
}

View file

@ -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

View file

@ -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