mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-12 02:15:01 +00:00
Switch to recommending identity file in terraform guide (#26995)
This commit is contained in:
@@ -122,27 +122,13 @@ $ tctl create terraform-impersonator.yaml
|
||||
|
||||
(!docs/pages/includes/add-role-to-user.mdx role="terraform-impersonator"!)
|
||||
|
||||
Next, request a signed certificate for the Terraform user:
|
||||
Next, request a signed identity file for the Terraform user:
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Self-Hosted" scope={["oss","enterprise"]}>
|
||||
```code
|
||||
$ tctl auth sign --format=tls --user=terraform --out=auth
|
||||
```
|
||||
|
||||
This command should result in three PEM-encoded files: `auth.crt`, `auth.key`,
|
||||
and `auth.cas` (certificate, private key, and CA certs, respectively).
|
||||
|
||||
</TabItem>
|
||||
<TabItem label="Teleport Cloud" scope={["cloud"]}>
|
||||
```code
|
||||
$ tctl auth sign --user=terraform --out=terraform-identity
|
||||
```
|
||||
|
||||
The above sequence should result in one PEM-encoded file: `terraform-identity`.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
This command should result in one file: `terraform-identity`.
|
||||
|
||||
## Step 2/3. Create a Terraform configuration
|
||||
|
||||
@@ -166,25 +152,11 @@ role using Terraform.
|
||||
|
||||
Check the contents of the `teleport-terraform` folder:
|
||||
|
||||
<Tabs>
|
||||
<TabItem scope={["cloud"]} label="Teleport Cloud">
|
||||
|
||||
```code
|
||||
$ ls
|
||||
# main.tf terraform-identity terraform-impersonator.yaml terraform.yaml
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem scope={["oss", "enterprise"]} label="Self-Hosted">
|
||||
|
||||
```code
|
||||
$ ls
|
||||
# main.tf auth.crt auth.key auth.cas terraform-impersonator.yaml terraform.yaml
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Init terraform and apply the spec:
|
||||
|
||||
```code
|
||||
|
||||
@@ -9,11 +9,9 @@ terraform {
|
||||
|
||||
provider "teleport" {
|
||||
# Update addr to point to Teleport Auth/Proxy
|
||||
# addr = "auth.example.com:3025"
|
||||
addr = "proxy.example.com:443"
|
||||
cert_path = "auth.crt"
|
||||
key_path = "auth.key"
|
||||
root_ca_path = "auth.cas"
|
||||
# addr = "auth.example.com:3025"
|
||||
addr = "proxy.example.com:443"
|
||||
identity_file_path = "terraform-identity"
|
||||
}
|
||||
|
||||
resource "teleport_role" "terraform-test" {
|
||||
|
||||
Reference in New Issue
Block a user