Skip to content

Generate S3 credentials using Terraform #285

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

Closed
fl42 opened this issue Aug 10, 2022 · 1 comment · Fixed by #291
Closed

Generate S3 credentials using Terraform #285

fl42 opened this issue Aug 10, 2022 · 1 comment · Fixed by #291

Comments

@fl42
Copy link

fl42 commented Aug 10, 2022

Hello,

I would like to be able to generate S3 credentials for a public cloud user from Terraform.

It works from OpenStack CLI or OVH manager.
But from Terraform it does not work using the OpenStack provider and the OVH provider does not provide a way to generate S3 credentials.

Terraform Version

Terraform v1.2.6
on linux_amd64
+ provider registry.terraform.io/ovh/ovh v0.19.1
+ provider registry.terraform.io/terraform-provider-openstack/openstack v1.48.0

Affected Resource(s)

  • ovh_cloud_project_user
  • openstack_identity_user_v3?
  • openstack_identity_ec2_credential_v3?

Terraform Configuration Files

resource "ovh_cloud_project_user" "test" {
   service_name = var.service_name  # Public cloud project ID
   description = "Test"
}

# Get OpenStack ID
data "openstack_identity_user_v3" "test" {
  name = ovh_cloud_project_user.test.username
}

resource "openstack_identity_ec2_credential_v3" "test" {
  user_id = data.openstack_identity_user_v3.test.unique_id
}

The user used by the OpenStack provider has Administrator role.

Expected Behavior

OVH provider should provide a way to generate S3 credentials.
Or openstack_identity_user_v3 and openstack_identity_ec2_credential_v3 should succeed.

Actual Behavior

I got a permission issue with openstack_identity_user_v3

Error: Unable to query openstack_identity_user_v3: Request forbidden: [GET https://auth.cloud.ovh.net/v3/users?enabled=true&name=user-XXXX], error message: {"error": {"message": "You are not authorized to perform the requested action: identity:list_users.", "code": 403, "title": "Forbidden"}}

Steps to Reproduce

  1. terraform apply

Has anyone been able to generate S3 credentials from Terraform?

Thanks

@yvigara
Copy link
Contributor

yvigara commented Aug 16, 2022

I have the exact same issue.
I found the API endpoints that allow the creation/deletion of S3 Credentials. I'm now working on adding a resource to the provider. I have a POC working and I hope to be able to raise a PR in the next couple of days.

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

Successfully merging a pull request may close this issue.

2 participants