-
Notifications
You must be signed in to change notification settings - Fork 16
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
Introduce Storage Bucket Resource #5
Conversation
c19a276
to
bd6d76f
Compare
@mdavidsen @adamcstephens I would appreciate your feedback 😊 |
bd6d76f
to
cda8d48
Compare
8b870f0
to
efd1897
Compare
efd1897
to
fccebe8
Compare
Signed-off-by: Fabian Mettler <dev@maveonair.com>
fccebe8
to
9a7fb65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very experienced with the storage buckets. If the bucket is cluster node targeted, does the key need to be as well?
|
||
// Computed. | ||
|
||
"location": schema.StringAttribute{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? This should be retrievable through target
, and in fact both are set from the same value below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been following the implementation of the resource_storage volume. If there is no added value by exporting this attribute, that I would suggest we remove it?
As I can see, the location information is part of the storage bucket: $ incus storage bucket show default bucket1
config: {}
description: ""
name: bucket1
s3_url: ""
location: none but not set for a storage bucket key: $ incus storage bucket key show default bucket1 admin
description: Admin user
role: admin
access-key: .....
secret-key: .....
name: admin @stgraber could you please provide some details here? |
The storage bucket key doesn't have a location because it's tied to a specific storage bucket which does have a location. Storage buckets are location-specific on most storage pool drivers. The exception to that being when they are on a remote storage pool such as ceph. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Description
This pull request aims to improve the capabilities of this Terraform provider by adding support for managing storage buckets and their access keys.
Proposed resource definitions
Storage Bucket Creation
Import existing Storage Bucket and Key
Open Questions
I would like to gather feedback and opinions on how to handle the following aspect:
Admin Key Creation
Incus always creates an admin key when a storage bucket is created. I would like to know how to approach this situation:
Option 1: Ignore the fact that an admin key is always created and the user should use the Terraform import function to make the admin key usable within Terraform.
Option 2: Expose the admin key on the storage bucket itself as the computed values
admin_access_key
andadmin_secret_key
, if the admin key is available.At the moment I prefer "Option 1" to avoid additional implementation logic in the Terraform provider, as it could be that the admin token was deleted by an operator after the bucket was created. This means that the
admin_access_key
andadmin_secret_key
would no longer exist, which could lead to confusion.Please share your thoughts and preferences regarding this matter.