Skip to content

Feature Request: Support CLI Authentication Fallback in the STACKIT Terraform ProviderΒ #719

@rswrz

Description

@rswrz

Description

It would be highly beneficial if the STACKIT Terraform Provider could automatically fall back to an active stackit CLI authentication session. This would allow users to authenticate via the stackit CLI and seamlessly use Terraform locally, without requiring additional manual authentication steps.

Current Workaround

At the moment, this behavior can be manually achieved by retrieving an access token via the CLI and exporting it as an environment variable:

stackit auth login
export STACKIT_SERVICE_ACCOUNT_TOKEN=$(stackit auth get-access-token 2>/dev/stdout)
terraform init && terraform apply

Proposed Enhancement

Enable the Terraform provider to detect and utilize the existing CLI session automatically, similar to how other cloud providers (e.g., Azure CLI, AWS CLI) handle authentication fallback in their Terraform providers. This would greatly improve the developer experience and streamline local workflows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions