-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v16] RFD 173 implementation: Terraform provider UX improvements (#44690
) * Introduce the `tctl terraform env` command (#43664) * Introduce the `tctl terrafor env` command * fix tests * address marco's feedback + use correct b64 lib * add license * add created-by label as specified in the RFD * Update tool/tctl/common/terraform_command.go Co-authored-by: Roman Tkachenko <[email protected]> * Apply suggestions from code review Co-authored-by: Roman Tkachenko <[email protected]> * Have telpeort create the Terraform default role * rename use-existing-role -> role, and stop hijacking identity.SSHCACertBytes * Make the terraform provider role a real preset, rename to 'terraform-provider' * lint * Fix tbot's invocation after rebase --------- Co-authored-by: Roman Tkachenko <[email protected]> * Refactor Terraform credential loading (#44037) * Refactor Terraform credential loading * Warn about expiry * kip expired credentials * fixup! kip expired credentials * Use constants everywhere + add godocs * fixup! Use constants everywhere + add godocs * Address marco's feedback * fixup! Address marco's feedback * tidy go mod * lint * re-render TF docs * Update v16 version in error message * Add Terraform Provider native MachineID support (#44306) * Add Terraform Provider native MachineID support * Reject 'token' join method * lint: fix imports * re-render TF docs * fix tests + add license * lint * tidy go mod * use v16 client.Expiry() function --------- Co-authored-by: Roman Tkachenko <[email protected]>
- Loading branch information
Showing
24 changed files
with
2,148 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -461,3 +461,50 @@ const ( | |
// Multiple decisions can be sent for the same request if the policy requires it. | ||
FileTransferDecision string = "[email protected]" | ||
) | ||
|
||
// Terraform provider environment variable names. | ||
// This is mainly used by the Terraform provider and the `tctl terraform` command. | ||
const ( | ||
// EnvVarTerraformAddress is the environment variable configuring the Teleport address the Terraform provider connects to. | ||
EnvVarTerraformAddress = "TF_TELEPORT_ADDR" | ||
// EnvVarTerraformCertificates is the environment variable configuring the path the Terraform provider loads its | ||
// client certificates from. This only works for direct auth joining. | ||
EnvVarTerraformCertificates = "TF_TELEPORT_CERT" | ||
// EnvVarTerraformCertificatesBase64 is the environment variable configuring the client certificates used by the | ||
// Terraform provider. This only works for direct auth joining. | ||
EnvVarTerraformCertificatesBase64 = "TF_TELEPORT_CERT_BASE64" | ||
// EnvVarTerraformKey is the environment variable configuring the path the Terraform provider loads its | ||
// client key from. This only works for direct auth joining. | ||
EnvVarTerraformKey = "TF_TELEPORT_KEY" | ||
// EnvVarTerraformKeyBase64 is the environment variable configuring the client key used by the | ||
// Terraform provider. This only works for direct auth joining. | ||
EnvVarTerraformKeyBase64 = "TF_TELEPORT_KEY_BASE64" | ||
// EnvVarTerraformRootCertificates is the environment variable configuring the path the Terraform provider loads its | ||
// trusted CA certificates from. This only works for direct auth joining. | ||
EnvVarTerraformRootCertificates = "TF_TELEPORT_ROOT_CA" | ||
// EnvVarTerraformRootCertificatesBase64 is the environment variable configuring the CA certificates trusted by the | ||
// Terraform provider. This only works for direct auth joining. | ||
EnvVarTerraformRootCertificatesBase64 = "TF_TELEPORT_CA_BASE64" | ||
// EnvVarTerraformProfileName is the environment variable containing name of the profile used by the Terraform provider. | ||
EnvVarTerraformProfileName = "TF_TELEPORT_PROFILE_NAME" | ||
// EnvVarTerraformProfilePath is the environment variable containing the profile directory used by the Terraform provider. | ||
EnvVarTerraformProfilePath = "TF_TELEPORT_PROFILE_PATH" | ||
// EnvVarTerraformIdentityFilePath is the environment variable containing the path to the identity file used by the provider. | ||
EnvVarTerraformIdentityFilePath = "TF_TELEPORT_IDENTITY_FILE_PATH" | ||
// EnvVarTerraformIdentityFile is the environment variable containing the identity file used by the Terraform provider. | ||
EnvVarTerraformIdentityFile = "TF_TELEPORT_IDENTITY_FILE" | ||
// EnvVarTerraformIdentityFileBase64 is the environment variable containing the base64-encoded identity file used by the Terraform provider. | ||
EnvVarTerraformIdentityFileBase64 = "TF_TELEPORT_IDENTITY_FILE_BASE64" | ||
// EnvVarTerraformRetryBaseDuration is the environment variable configuring the base duration between two Terraform provider retries. | ||
EnvVarTerraformRetryBaseDuration = "TF_TELEPORT_RETRY_BASE_DURATION" | ||
// EnvVarTerraformRetryCapDuration is the environment variable configuring the maximum duration between two Terraform provider retries. | ||
EnvVarTerraformRetryCapDuration = "TF_TELEPORT_RETRY_CAP_DURATION" | ||
// EnvVarTerraformRetryMaxTries is the environment variable configuring the maximum number of Terraform provider retries. | ||
EnvVarTerraformRetryMaxTries = "TF_TELEPORT_RETRY_MAX_TRIES" | ||
// EnvVarTerraformDialTimeoutDuration is the environment variable configuring the Terraform provider dial timeout. | ||
EnvVarTerraformDialTimeoutDuration = "TF_TELEPORT_DIAL_TIMEOUT_DURATION" | ||
// EnvVarTerraformJoinMethod is the environment variable configuring the Terraform provider native MachineID join method. | ||
EnvVarTerraformJoinMethod = "TF_TELEPORT_JOIN_METHOD" | ||
// EnvVarTerraformJoinToken is the environment variable configuring the Terraform provider native MachineID join token. | ||
EnvVarTerraformJoinToken = "TF_TELEPORT_JOIN_TOKEN" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.