feat: authorize OCI lifecycle service principal
This commit is contained in:
parent
3c39b4cee6
commit
5980e4c6a0
|
|
@ -48,6 +48,17 @@ resource "oci_objectstorage_bucket" "homelab_backups" {
|
|||
}
|
||||
}
|
||||
|
||||
resource "oci_identity_policy" "object_storage_lifecycle" {
|
||||
count = var.enabled && var.backup_bucket_enabled ? 1 : 0
|
||||
compartment_id = var.tenancy_id
|
||||
name = "jeannie-object-storage-lifecycle"
|
||||
description = "Allow OCI Object Storage to execute Jeannie backup lifecycle rules"
|
||||
statements = [
|
||||
"Allow service objectstorage-${var.region} to manage object-family in compartment ${var.compartment_name}",
|
||||
]
|
||||
freeform_tags = local.base_tags
|
||||
}
|
||||
|
||||
resource "oci_identity_compartment" "homelab" {
|
||||
count = var.enabled && var.create_compartment ? 1 : 0
|
||||
compartment_id = var.tenancy_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue