e6e85b00f7
- Added getmail configuration generation using template files. - Introduced postfix and dovecot configuration checksums for deployment. - Created new dovecot configuration file and sieve script for email handling. - Updated main.tf to utilize local variables for configuration management. - Removed redundant external password hasher from main.tf. feat(nginx): improve nginx configuration management - Centralized nginx configuration into a local variable with checksum. - Created separate config maps for default website configurations. - Updated deployment to utilize new configuration structure. feat(sftpgo): add SFTPGo application deployment - Introduced SFTPGo with Kubernetes resources including namespace, config maps, and secrets. - Configured SFTPGo with SMTP settings and AWS credentials. - Implemented health checks and volume mounts for persistent storage. refactor(seafile): remove Seafile module - Deleted Seafile module and associated resources as part of cleanup.
126 lines
3.5 KiB
Terraform
126 lines
3.5 KiB
Terraform
resource "scaleway_iam_application" "backup_app" {
|
|
name = "k8s_backup_app"
|
|
}
|
|
|
|
resource "scaleway_iam_application" "mail_app" {
|
|
name = "mail_app"
|
|
}
|
|
|
|
resource "scaleway_iam_application" "nextcloud_app" {
|
|
name = "nextcloud_app"
|
|
}
|
|
|
|
resource "scaleway_iam_application" "dovecot_app" {
|
|
name = "dovecot_app"
|
|
}
|
|
|
|
resource "scaleway_iam_application" "sftpgo_app" {
|
|
name = "sftpgo_app"
|
|
}
|
|
|
|
resource "scaleway_iam_policy" "object_read_write_backup" {
|
|
name = "K8s backup app policy"
|
|
description = "Gives k8s backup job access to object storage in project"
|
|
application_id = scaleway_iam_application.backup_app.id
|
|
|
|
rule {
|
|
project_ids = [data.scaleway_account_project.default.id]
|
|
permission_set_names = [
|
|
"ObjectStorageObjectsWrite",
|
|
"ObjectStorageObjectsRead",
|
|
"ObjectStorageObjectsDelete",
|
|
"ObjectStorageBucketsRead"
|
|
]
|
|
}
|
|
}
|
|
|
|
resource "scaleway_iam_policy" "email_full_access" {
|
|
name = "Email full access policy"
|
|
description = "Gives access to transactional email in project"
|
|
application_id = scaleway_iam_application.mail_app.id
|
|
|
|
rule {
|
|
project_ids = [data.scaleway_account_project.default.id]
|
|
permission_set_names = [
|
|
"TransactionalEmailFullAccess",
|
|
]
|
|
}
|
|
}
|
|
|
|
resource "scaleway_iam_policy" "object_read_write_nextcloud" {
|
|
name = "Nextcloud app policy"
|
|
description = "Gives nextcloud job access to object storage in project"
|
|
application_id = scaleway_iam_application.nextcloud_app.id
|
|
|
|
rule {
|
|
project_ids = [data.scaleway_account_project.default.id]
|
|
permission_set_names = [
|
|
"ObjectStorageObjectsWrite",
|
|
"ObjectStorageObjectsRead",
|
|
"ObjectStorageBucketsRead",
|
|
"ObjectStorageBucketsWrite",
|
|
"ObjectStorageObjectsDelete"
|
|
]
|
|
}
|
|
}
|
|
|
|
resource "scaleway_iam_policy" "object_read_write_dovecot" {
|
|
name = "Dovecot app policy"
|
|
description = "Gives dovecot job access to object storage in project"
|
|
application_id = scaleway_iam_application.dovecot_app.id
|
|
|
|
rule {
|
|
project_ids = [data.scaleway_account_project.default.id]
|
|
permission_set_names = [
|
|
"ObjectStorageObjectsWrite",
|
|
"ObjectStorageObjectsRead",
|
|
"ObjectStorageBucketsRead",
|
|
"ObjectStorageBucketsWrite",
|
|
"ObjectStorageObjectsDelete"
|
|
]
|
|
}
|
|
}
|
|
|
|
|
|
resource "scaleway_iam_policy" "object_read_write_sftpgo" {
|
|
name = "SFtpGo app policy"
|
|
description = "Gives sftpgo job access to object storage in project"
|
|
application_id = scaleway_iam_application.sftpgo_app.id
|
|
|
|
rule {
|
|
project_ids = [data.scaleway_account_project.default.id]
|
|
permission_set_names = [
|
|
"ObjectStorageObjectsWrite",
|
|
"ObjectStorageObjectsRead",
|
|
"ObjectStorageBucketsRead",
|
|
"ObjectStorageBucketsWrite",
|
|
"ObjectStorageObjectsDelete"
|
|
]
|
|
}
|
|
}
|
|
|
|
resource "scaleway_iam_api_key" "backup_app_api" {
|
|
application_id = scaleway_iam_application.backup_app.id
|
|
description = "k8s backup app API key"
|
|
}
|
|
|
|
resource "scaleway_iam_api_key" "mail_app_api" {
|
|
application_id = scaleway_iam_application.mail_app.id
|
|
description = "mail access API key"
|
|
}
|
|
|
|
resource "scaleway_iam_api_key" "nextcloud_app_api" {
|
|
application_id = scaleway_iam_application.nextcloud_app.id
|
|
description = "nextcloud access API key"
|
|
}
|
|
|
|
resource "scaleway_iam_api_key" "dovecot_app_api" {
|
|
application_id = scaleway_iam_application.dovecot_app.id
|
|
description = "dovecot access API key"
|
|
}
|
|
|
|
resource "scaleway_iam_api_key" "sftpgo_app_api" {
|
|
application_id = scaleway_iam_application.sftpgo_app.id
|
|
description = "sftpgo access API key"
|
|
}
|