Skip to content

Commit b58815a

Browse files
authored
docs: update docs for environments and project environments (#220)
1 parent c08743e commit b58815a

File tree

8 files changed

+100
-4
lines changed

8 files changed

+100
-4
lines changed

docs/data-sources/environment.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "unleash_environment Data Source - terraform-provider-unleash"
4+
subcategory: ""
5+
description: |-
6+
Access existing environments.
7+
---
8+
9+
# unleash_environment (Data Source)
10+
11+
Access existing environments.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `name` (String) The name of the environment. Must be a URL-friendly string according to RFC 3968.
21+
- `type` (String) The type of the environment. Unleash recognizes 'development', 'test', 'preproduction' and 'production'. You can pass other values and Unleash will accept them but they will carry no special semantics.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "unleash_project_environment Data Source - terraform-provider-unleash"
4+
subcategory: ""
5+
description: |-
6+
ProjectEnvironment schema
7+
---
8+
9+
# unleash_project_environment (Data Source)
10+
11+
ProjectEnvironment schema
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `environment_name` (String) Environment identifier, equivalent to the environment name.
21+
- `project_id` (String) Project identifier.
22+
23+
### Read-Only
24+
25+
- `change_requests_enabled` (Boolean) If change requests are required for this environment, the environment must be enabled for this to have effect.
26+
- `enabled` (Boolean) If the environment is enabled for this project. This affects whether or not users will be able to enable flags for this environment on this project.
27+
- `required_approvals` (Number) Number of approvals required for change requests.

docs/resources/environment.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "unleash_environment Resource - terraform-provider-unleash"
4+
subcategory: ""
5+
description: |-
6+
Manage Unleash environments.
7+
---
8+
9+
# unleash_environment (Resource)
10+
11+
Manage Unleash environments.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `name` (String) The name of the environment. Must be a URL-friendly string according to RFC 3968. Changing this property will require the resource to be replaced, it's generally safer to remove this resource and create a new one.
21+
- `type` (String) The type of the environment. Unleash recognizes 'development', 'test', 'preproduction' and 'production'. You can pass other values and Unleash will accept them but they will carry no special semantics.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "unleash_project_environment Resource - terraform-provider-unleash"
4+
subcategory: ""
5+
description: |-
6+
ProjectEnvironment schema
7+
---
8+
9+
# unleash_project_environment (Resource)
10+
11+
ProjectEnvironment schema
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `enabled` (Boolean) If the environment is enabled for this project. This affects whether or not users will be able to enable flags for this environment on this project.
21+
- `environment_name` (String) Environment identifier, equivalen t to the environment name.
22+
- `project_id` (String) Project identifier.
23+
24+
### Optional
25+
26+
- `change_requests_enabled` (Boolean) If change requests are required for this environment, the environment must be enabled for this to have effect.
27+
- `required_approvals` (Number) Number of approvals required for change requests.

internal/provider/environment_data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (d *environmentDataSource) Metadata(_ context.Context, req datasource.Metad
4646

4747
func (d *environmentDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
4848
resp.Schema = schema.Schema{
49-
Description: "Fetch a context field.",
49+
Description: "Access existing environments.",
5050
Attributes: map[string]schema.Attribute{
5151
"name": schema.StringAttribute{
5252
Description: "The name of the environment. Must be a URL-friendly string according to RFC 3968.",

internal/provider/environment_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (r *environmentResource) Metadata(_ context.Context, req resource.MetadataR
5050

5151
func (r *environmentResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
5252
resp.Schema = schema.Schema{
53-
Description: "Fetch a context field.",
53+
Description: "Manage Unleash environments.",
5454
Attributes: map[string]schema.Attribute{
5555
"name": schema.StringAttribute{
5656
Description: "The name of the environment. Must be a URL-friendly string according to RFC 3968. " +

internal/provider/project_environment_data_source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (d *projectEnvironmentDataSource) Metadata(_ context.Context, req datasourc
5050

5151
func (d *projectEnvironmentDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
5252
resp.Schema = schema.Schema{
53-
Description: "ProjectAccess schema",
53+
Description: "ProjectEnvironment schema",
5454
Attributes: map[string]schema.Attribute{
5555
"project_id": schema.StringAttribute{
5656
Description: "Project identifier.",

internal/provider/project_environment_resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (r *projectEnvironmentResource) Metadata(_ context.Context, req resource.Me
8080

8181
func (r *projectEnvironmentResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
8282
resp.Schema = schema.Schema{
83-
Description: "ProjectAccess schema",
83+
Description: "ProjectEnvironment schema",
8484
Attributes: map[string]schema.Attribute{
8585
"project_id": schema.StringAttribute{
8686
Description: "Project identifier.",

0 commit comments

Comments
 (0)