forked from mrolla/terraform-provider-circleci
-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
f45e5fa
commit fc6d0c9
Showing
7 changed files
with
336 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,29 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_context Data Source - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_context (Data Source) | ||
|
||
## Usage | ||
```hcl | ||
data "circleci_context" "my_context" { | ||
name = "my-context" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the context | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
|
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,31 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_project Data Source - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_project (Data Source) | ||
|
||
## Usage | ||
```hcl | ||
data "circleci_project" "my_project" { | ||
name = "my-project" | ||
} | ||
``` | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the project | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
|
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,42 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci Provider" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci Provider | ||
|
||
~> This provider uses Circle CI API v2. | ||
|
||
## Usage | ||
```hcl | ||
terraform { | ||
required_providers { | ||
circleci = { | ||
source = "SectorLabs/circleci" | ||
} | ||
} | ||
} | ||
provider "circleci" { | ||
api_token = "YOUR_CIRCLECI_API_TOKEN" | ||
vcs_type = "github" | ||
organization = "MyOrganization" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `organization` (String) The Circle CI organization. | ||
|
||
### Optional | ||
|
||
- `api_token` (String) The token key for API operations. Can also be set via `CIRCLECI_TOKEN` environment variable. | ||
- `url` (String) The URL of the Circle CI API (v2). | ||
- `vcs_type` (String) The VCS type for the organization. |
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,55 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_checkout_key Resource - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_checkout_key (Resource) | ||
|
||
## Usage | ||
|
||
Creating a `deploy-key`: | ||
```hcl | ||
resource "circleci_checkout_key" "my_deploy_key" { | ||
project = "my_project" | ||
type = "deploy-key" | ||
} | ||
``` | ||
|
||
Creating a `user-key`: | ||
```hcl | ||
resource "circleci_checkout_key" "my_user_key" { | ||
project = data.circleci_project.my_project.name | ||
type = "user-key" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `project` (String) The name of the CircleCI project to create the checkout key in. | ||
- `type` (String) The type of the checkout key. Can be either `user-key` or `deploy-key`. | ||
|
||
### Read-Only | ||
|
||
- `created_at` (String) The date and time the checkout key was created. | ||
- `fingerprint` (String) The fingerprint of the checkout key. | ||
- `id` (String) The ID of this resource. | ||
- `preferred` (Boolean) A boolean value that indicates if this key is preferred. | ||
- `public_key` (String) The public SSH key of the checkout key. | ||
|
||
~> The `preferred` flag is automatically set to true on the most recent key created. | ||
|
||
~> For `deploy-key` type, the resource will also create a deploy key in your VCS repository, which will not be deleted in case of Terraform destroy. Requires manual clean up. | ||
|
||
## Import | ||
|
||
Checkout Keys can be imported using the project name and the fingerprint. | ||
```bash | ||
$ terraform import circleci_checkout_key.key "my-project/12:34:56:78:90:12:34:56:78:90:12:34:56:78:90:12" | ||
``` |
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,35 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_context Resource - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_context (Resource) | ||
|
||
## Usage | ||
```hcl | ||
resource "circleci_context" "my_context" { | ||
name = "my-awesome-context" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the context | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Contexts can be imported using their names: | ||
```bash | ||
$ terraform import circleci_context.context my-context | ||
``` |
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,73 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_context_environment_variable Resource - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_context_environment_variable (Resource) | ||
|
||
## Usage | ||
Environment variables can be created using a context name: | ||
```hcl | ||
resource "circleci_context_environment_variable" "var" { | ||
context = "my-context" | ||
name = "DUMMY" | ||
value = "VALUE" | ||
} | ||
``` | ||
|
||
Or using a data source for the context name: | ||
```hcl | ||
data "circleci_context" "context" { | ||
name = "my-context" | ||
} | ||
resource "circleci_context_environment_variable" "var" { | ||
context = data.circleci_context.context.name | ||
name = "DUMMY" | ||
value = "VALUE" | ||
} | ||
``` | ||
|
||
Or using a context resource: | ||
```hcl | ||
resource "circleci_context" "context" { | ||
name = "my-context" | ||
} | ||
resource "circleci_context_environment_variable" "var" { | ||
context = circleci_context.context.name | ||
name = "DUMMY" | ||
value = "VALUE" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `context` (String) The name of the context where the environment variable is defined | ||
- `name` (String) The name of the environment variable | ||
- `value` (String, Sensitive) The value that will be set for the environment variable. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Contexts' environment variables can be imported using the context name and the variable | ||
name: | ||
```bash | ||
$ terraform import circleci_context_environment_variable.var my-context/MY_VARIABLE | ||
``` | ||
|
||
~> Importing a variable does not support importing the variable value since it is marked | ||
as sensitive. |
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,71 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "circleci_environment_variable Resource - terraform-provider-circleci" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# circleci_environment_variable (Resource) | ||
|
||
## Usage | ||
Environment variables can be created using a project name: | ||
```hcl | ||
resource "circleci_environment_variable" "variable" { | ||
project = "my-project" | ||
name = "DUMMY" | ||
value = "VALUE" | ||
} | ||
``` | ||
|
||
Or using a project data source: | ||
```hcl | ||
data "circleci_project" "project" { | ||
name = "my-project" | ||
} | ||
resource "circleci_environment_variable" "variable" { | ||
project = data.circleci_project.project.name | ||
name = "DUMMY" | ||
value = "VALUE" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the environment variable | ||
- `project` (String) The name of the CircleCI project to create the variable in | ||
- `value` (String, Sensitive) The value of the environment variable | ||
|
||
### Optional | ||
|
||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) | ||
- `delete` (String) | ||
|
||
## Import | ||
|
||
Projects' environment variables can be imported using the project name and the variable | ||
name: | ||
```bash | ||
$ terraform import circleci_environment_variable.var my-project/MY_VARIABLE | ||
``` | ||
|
||
~> Importing a variable does not support importing the variable value since it is marked | ||
as sensitive. | ||
|