Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: TF resource for buckets #645

Open
Pionerd opened this issue Sep 30, 2024 · 3 comments
Open

Feature request: TF resource for buckets #645

Pionerd opened this issue Sep 30, 2024 · 3 comments

Comments

@Pionerd
Copy link

Pionerd commented Sep 30, 2024

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.

@kangasta
Copy link
Contributor

kangasta commented Oct 1, 2024

Thanks for the feature request! We are looking into adding bucket resource to the provider soon.

@back-2-95
Copy link

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

@kangasta
Copy link
Contributor

kangasta commented Dec 5, 2024

Hello! We now have the upcloud_managed_object_storage_bucket available for creating buckets with this provider (see #658 for the PR). However, our own API has limited support for configuring the bucket. Because of these limitations, we are also experimenting how an additional provider for managing the buckets over S3 API would work: UpCloudLtd/terraform-provider-objsto.

Happy to hear any feedback on how to improve the developer experience of these!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants