-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the environment context to evaluated templates + doc updates
- Loading branch information
1 parent
98840b0
commit 76d5953
Showing
7 changed files
with
141 additions
and
16 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 |
---|---|---|
@@ -1 +1 @@ | ||
golang 1.21.0 | ||
golang 1.21.5 |
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
page_title: "CloudTruth Provider" | ||
description: |- | ||
The CloudTruth Terraform provider is used to interact with CloudTruth application resources. | ||
--- | ||
|
||
# CloudTruth Provider | ||
|
||
The [CloudTruth](https://cloudtruth.com) Terraform provider is used to interact with CloudTruth application resources. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
# You can specify the CloudTruth API explicitly like this and inject it into | ||
# the environment where your Terraform commands run by running | ||
# export TF_VAR_cloudtruth_api_key=<YOUR_API_KEY> | ||
# or you can omit this provider block entirely and | ||
# use the CloudTruth CLI environment variable format by | ||
# running export CLOUDTRUTH_API_KEY=<YOUR_API_KEY> | ||
provider "cloudtruth" { | ||
api_key = var.cloudtruth_api_key | ||
} | ||
|
||
// Projects | ||
resource "cloudtruth_project" "parent_project" { | ||
name = "ParentProject" | ||
description = "A top level project." | ||
} | ||
|
||
resource "cloudtruth_project" "project_a" { | ||
name = "ProjectA" | ||
description = "A subproject" | ||
parent = cloudtruth_project.parent_project.name | ||
} | ||
|
||
resource "cloudtruth_parameter" "some_parameter" { | ||
name = "my_parameter_name" | ||
project = cloudtruth_project.parent_project.name | ||
} | ||
|
||
# When the environment is not specified, the "default" environment is used | ||
resource "cloudtruth_parameter_value" "some_parameter_value" { | ||
parameter_name = cloudtruth_parameter.some_parameter.name | ||
project = cloudtruth_project.parent_project.name | ||
value = "A_REGULAR_STRING_VALUE_NOT_A_SECRET" | ||
} | ||
|
||
# Here's another value for the same parameter in the "development" environment | ||
resource "cloudtruth_parameter_value" "some_parameter_value_in_dev" { | ||
parameter_name = cloudtruth_parameter.some_parameter.name | ||
environment = "development" | ||
project = cloudtruth_project.parent_project.name | ||
value = "A_REGULAR_STRING_OVERRIDE_FOR_THE_DEV_ENV" | ||
} | ||
|
||
# Here we specify a value for the parameter in the default environment only | ||
# in the child project ProjectA | ||
resource "cloudtruth_parameter_value" "some_parameter_value" { | ||
parameter_name = cloudtruth_parameter.some_parameter.name | ||
project = cloudtruth_project.project_a.name | ||
value = "A_REGULAR_STRING_VALUE_IN_PROJECT_A_DEFAULT_ENV" | ||
} | ||
``` | ||
|
||
{{ .SchemaMarkdown | trimspace }} |