Skip to content

Commit 8522cb4

Browse files
committed
review changes 7 (ephemeralProviderData)
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
1 parent 9612522 commit 8522cb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/ephemeral-resources/access_token.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ page_title: "stackit_access_token Ephemeral Resource - stackit"
44
subcategory: ""
55
description: |-
66
Ephemeral resource that generates a short-lived STACKIT access token (JWT) using a service account key. A new token is generated each time the resource is evaluated, and it remains consistent for the duration of a Terraform operation. If a private key is not explicitly provided, the provider attempts to extract it from the service account key instead. Access tokens generated from service account keys expire after 60 minutes.
7-
~> Service account key credentials must be configured either in the STACKIT provider configuration or via environment variables (see example below). If any other authentication method is configured, this ephemeral resource generation will fail with an error.
7+
~> Service account key credentials must be configured either in the STACKIT provider configuration or via environment variables (see example below). If any other authentication method is configured, this ephemeral resource will fail with an error.
88
~> This ephemeral-resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
99
---
1010

1111
# stackit_access_token (Ephemeral Resource)
1212

1313
Ephemeral resource that generates a short-lived STACKIT access token (JWT) using a service account key. A new token is generated each time the resource is evaluated, and it remains consistent for the duration of a Terraform operation. If a private key is not explicitly provided, the provider attempts to extract it from the service account key instead. Access tokens generated from service account keys expire after 60 minutes.
1414

15-
~> Service account key credentials must be configured either in the STACKIT provider configuration or via environment variables (see example below). If any other authentication method is configured, this ephemeral resource generation will fail with an error.
15+
~> Service account key credentials must be configured either in the STACKIT provider configuration or via environment variables (see example below). If any other authentication method is configured, this ephemeral resource will fail with an error.
1616

1717
~> This ephemeral-resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
1818

stackit/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,12 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
476476

477477
// Copy service account, private key credentials and custom-token endpoint to support ephemeral access token generation
478478
var ephemeralProviderData core.EphemeralProviderData
479+
ephemeralProviderData.ProviderData = providerData
479480
setStringField(providerConfig.ServiceAccountKey, func(v string) { ephemeralProviderData.ServiceAccountKey = v })
480481
setStringField(providerConfig.ServiceAccountKeyPath, func(v string) { ephemeralProviderData.ServiceAccountKeyPath = v })
481482
setStringField(providerConfig.PrivateKey, func(v string) { ephemeralProviderData.PrivateKey = v })
482483
setStringField(providerConfig.PrivateKeyPath, func(v string) { ephemeralProviderData.PrivateKeyPath = v })
483484
setStringField(providerConfig.TokenCustomEndpoint, func(v string) { ephemeralProviderData.TokenCustomEndpoint = v })
484-
setBoolField(providerConfig.EnableBetaResources, func(v bool) { ephemeralProviderData.EnableBetaResources = v })
485485
resp.EphemeralResourceData = ephemeralProviderData
486486

487487
providerData.Version = p.version

0 commit comments

Comments
 (0)