-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
1. Create a `main.tf` file containing this minimal Terraform code: | ||
|
||
```hcl | ||
terraform { | ||
required_providers { | ||
teleport = { | ||
source = "terraform.releases.teleport.dev/gravitational/teleport" | ||
version = "~> (=teleport.major_version=).0" | ||
} | ||
} | ||
} | ||
provider "teleport" { | ||
addr = '<Var name="teleport.example.com:443" />' | ||
} | ||
# We must create a test role, if we don't declare resources, Terraform won't try to | ||
# connect to Teleport and we won't be able to validate the setup. | ||
resource "teleport_role" "test" { | ||
version = "v7" | ||
metadata = { | ||
name = "test" | ||
description = "Dummy role to validate Terraform Provider setup" | ||
labels = { | ||
test = "yes" | ||
} | ||
} | ||
spec = {} | ||
} | ||
``` | ||
|
||
1. Then, init your Terraform working directory to download the Teleport provider: | ||
|
||
```code | ||
$ terraform init | ||
Initializing the backend... | ||
Initializing provider plugins... | ||
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ... | ||
``` | ||
|
||
1. Finally, run a Terraform plan: | ||
|
Empty file.
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