Open Pionerd opened 1 month ago
Thanks for the feature request! We are looking into adding bucket resource to the provider soon.
I'm using AWS provider meanwhile like this:
#
# AWS provider with UpCloud connection
#
provider "aws" {
region = "us-east-1" # Just for faking
access_key = upcloud_managed_object_storage_user_access_key.admin-access-key.access_key_id
secret_key = upcloud_managed_object_storage_user_access_key.admin-access-key.secret_access_key
skip_credentials_validation = true
skip_requesting_account_id = true
skip_region_validation = true
s3_use_path_style = true
endpoints {
s3 = "https://${one(upcloud_managed_object_storage.default.endpoint).domain_name}"
}
}
#
# Buckets
#
resource "aws_s3_bucket" "bucket" {
bucket = "mybucket"
}
resource "aws_s3_bucket_lifecycle_configuration" "bucket-lifecycle" {
bucket = aws_s3_bucket.bucket.id
rule {
id = "DeleteOldVersions"
noncurrent_version_expiration {
noncurrent_days = 30
}
status = "Enabled"
}
}
Currently we can make the Managed Object Storage via Terraform, but not the actual buckets inside them. It would be great if we could make those as well.