Skip to content

Support STACKIT_SERVICE_ACCOUNT_KEY Environment Variable #761

@rswrz

Description

@rswrz

Description

Currently, authentication with the Terraform provider can be configured using:

  1. The service_account_key parameter, which requires passing the service account key directly.
  2. The service_account_key_path parameter, which points to a file containing the key.

Additionally, authentication can be set using the environment variable STACKIT_SERVICE_ACCOUNT_KEY_PATH.

Requested Feature

This feature request proposes supporting the environment variable STACKIT_SERVICE_ACCOUNT_KEY as an alternative to the service_account_key provider configuration property.

Use Case

Allowing authentication via STACKIT_SERVICE_ACCOUNT_KEY would simplify CI/CD workflows, particularly in GitHub Actions (and likely other CI/CD environments).

Currently, storing the service account key in a GitHub Secret requires workarounds, such as:

  1. Writing the secret to a temporary file and setting STACKIT_SERVICE_ACCOUNT_KEY_PATH.
  2. Using a custom Terraform variable (stackit_service_account_key) and passing it via the TF_VAR_stackit_service_account_key environment variable.

By supporting STACKIT_SERVICE_ACCOUNT_KEY, we could eliminate the need for these workarounds, allowing direct authentication using a GitHub Secret.

Current Workaround

variable "stackit_service_account_key" {
  type      = string
  sensitive = true
}

provider "stackit" {
  service_account_key = var.stackit_service_account_key
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions