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

yandex_storage_bucket: can't provide IAM-token from provider #474

Open
a1ndreay opened this issue Oct 8, 2024 · 2 comments
Open

yandex_storage_bucket: can't provide IAM-token from provider #474

a1ndreay opened this issue Oct 8, 2024 · 2 comments
Labels

Comments

@a1ndreay
Copy link

a1ndreay commented Oct 8, 2024

Trouble: The storage service does not accept the IAM token as authorization method
Purpose: Use an IAM token instead of an SA (service account)
Steps for reproduce:
I'm provide a token - (Optional) Security token or IAM token used for authentication in Yandex.Cloud. into provider block:

provider "yandex" {
 cloud_id  = local.cloud_id
 folder_id = local.folder_id
 zone      = local.zone
 token     = var.IAM_TOKEN #<-- MY IAM TOKEN
}

But there's an error ocurred while no access_key and secret_key provide to storage client https://terraform-provider.yandexcloud.net/Resources/storage_bucket#argument-reference:

resource "yandex_storage_bucket" "test" {
  folder_id = data.yandex_resourcemanager_folder.students_ext_11.folder_id
  bucket = local.bucket
  #access_key = yandex_iam_service_account_static_access_key.sa-static-key.access_key
  #secret_key = yandex_iam_service_account_static_access_key.sa-static-key.secret_key
  max_size = 1048576  #<--- MAX_SIZE requires an IAM-token, not static access key! 
}
image

But as you can see above, an error occurs without specifying the static access key: " error getting storage client: failed to get default storage client".
How to specify the user providing the IAM key as a client not SA?

@Fluffi1235 Fluffi1235 added the bug label Nov 1, 2024
@Fluffi1235
Copy link

Thank you for your message, we'll pass it on to the team.

@art22m
Copy link
Contributor

art22m commented Nov 2, 2024

Hi!
This bug is fixed in the v0.131.0 version.
See docs https://terraform-provider.yandexcloud.net/resources/storage_bucket.html

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

No branches or pull requests

3 participants