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

STACKIT Service Account Email #520

Open
BackInBash opened this issue Aug 28, 2024 · 1 comment
Open

STACKIT Service Account Email #520

BackInBash opened this issue Aug 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@BackInBash
Copy link
Member

Hi,

why do I need to specify the Service Account Email Adresse in combination with the Access Token?


│ Error: Error creating project

│   with stackit_resourcemanager_project.project-hub,
│   on 03-project.tf line 9, in resource "stackit_resourcemanager_project" "project-hub":
│    9: resource "stackit_resourcemanager_project" "project-hub" {

│ The service account e-mail cannot be empty: set it in the provider configuration or through the STACKIT_SERVICE_ACCOUNT_EMAIL or in your credentials file (default filepath is ~/.stackit/credentials.json)

Because the Service Account Email Adress is part of the JWT Token itself and could be extracted 🤔

Example Terraform Code to extract Service Account Email:

jsondecode(base64decode(split(".", var.STACKIT_SERVICE_ACCOUNT_TOKEN)[1])).email
@vicentepinto98 vicentepinto98 added the enhancement New feature or request label Aug 29, 2024
@vicentepinto98
Copy link
Contributor

Hi @BackInBash , thanks for opening the issue.
You are right, we could extract it from the JWT Token. We will also check if we need it at all, as it might not be required anymore.
If that's the case, we'll remove this check.

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

No branches or pull requests

2 participants