Skip to content

Commit

Permalink
Chore: Generate docs for project-policies (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranfarage89 committed Nov 14, 2021
1 parent 75ab01d commit be26661
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 14 deletions.
34 changes: 34 additions & 0 deletions docs/data-sources/project_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "env0_project_policy Data Source - terraform-provider-env0"
subcategory: ""
description: |-
---

# env0_project_policy (Data Source)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **project_id** (String) id of the project

### Read-Only

- **disable_destroy_environments** (Boolean) Disallow destroying environment in the project
- **id** (String) id of the policy
- **include_cost_estimation** (Boolean) Enable cost estimation for the project
- **number_of_environments** (Number) Max number of environments a single user can have in this project, 0 indicates no limit
- **number_of_environments_total** (Number) Max number of environments in this project, 0 indicates no limit
- **requires_approval_default** (Boolean) Requires approval default value when creating a new environment in the project
- **skip_apply_when_plan_is_empty** (Boolean) Skip apply when plan has no changes
- **skip_redundant_deployments** (Boolean) Automatically skip queued deployments when a newer deployment is triggered
- **updated_by** (String) updated by


37 changes: 37 additions & 0 deletions docs/resources/project_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "env0_project_policy Resource - terraform-provider-env0"
subcategory: ""
description: |-
---

# env0_project_policy (Resource)





<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **project_id** (String) id of the project

### Optional

- **disable_destroy_environments** (Boolean) Disallow destroying environment in the project
- **include_cost_estimation** (Boolean) Enable cost estimation for the project
- **number_of_environments** (Number) Max number of environments a single user can have in this project, 0 indicates no limit
- **number_of_environments_total** (Number) Max number of environments in this project, 0 indicates no limit
- **requires_approval_default** (Boolean) Requires approval default value when creating a new environment in the project
- **skip_apply_when_plan_is_empty** (Boolean) Skip apply when plan has no changes
- **skip_redundant_deployments** (Boolean) Automatically skip queued deployments when a newer deployment is triggered

### Read-Only

- **id** (String) id of the policy
- **updated_by** (String) updated by


14 changes: 7 additions & 7 deletions env0/data_project_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,37 @@ func dataPolicy() *schema.Resource {
},
"number_of_environments": {
Type: schema.TypeInt,
Description: "number of environments per project",
Description: "Max number of environments a single user can have in this project, 0 indicates no limit",
Computed: true,
},
"number_of_environments_total": {
Type: schema.TypeInt,
Description: "number of environments total",
Description: "Max number of environments in this project, 0 indicates no limit",
Computed: true,
},
"requires_approval_default": {
Type: schema.TypeBool,
Description: "requires approval",
Description: "Requires approval default value when creating a new environment in the project",
Computed: true,
},
"include_cost_estimation": {
Type: schema.TypeBool,
Description: "include cost estimation",
Description: "Enable cost estimation for the project",
Computed: true,
},
"skip_apply_when_plan_is_empty": {
Type: schema.TypeBool,
Description: "skip apply when plan is empty",
Description: "Skip apply when plan has no changes",
Computed: true,
},
"disable_destroy_environments": {
Type: schema.TypeBool,
Description: "disable destroy environments",
Description: "Disallow destroying environment in the project",
Computed: true,
},
"skip_redundant_deployments": {
Type: schema.TypeBool,
Description: "skip redundant deployments",
Description: "Automatically skip queued deployments when a newer deployment is triggered",
Computed: true,
},
"updated_by": {
Expand Down
14 changes: 7 additions & 7 deletions env0/resource_project_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func resourcePolicy() *schema.Resource {
},
"number_of_environments": {
Type: schema.TypeInt,
Description: "number of environments per project, 0 indicates no limit",
Description: "Max number of environments a single user can have in this project, 0 indicates no limit",
Optional: true,
ValidateDiagFunc: func(i interface{}, p cty.Path) diag.Diagnostics {
n := i.(int)
Expand All @@ -52,7 +52,7 @@ func resourcePolicy() *schema.Resource {
},
"number_of_environments_total": {
Type: schema.TypeInt,
Description: "number of environments total, 0 indicates no limit",
Description: "Max number of environments in this project, 0 indicates no limit",
Optional: true,
ValidateDiagFunc: func(i interface{}, p cty.Path) diag.Diagnostics {
n := i.(int)
Expand All @@ -64,27 +64,27 @@ func resourcePolicy() *schema.Resource {
},
"requires_approval_default": {
Type: schema.TypeBool,
Description: "requires approval",
Description: "Requires approval default value when creating a new environment in the project",
Optional: true,
},
"include_cost_estimation": {
Type: schema.TypeBool,
Description: "include cost estimation",
Description: "Enable cost estimation for the project",
Optional: true,
},
"skip_apply_when_plan_is_empty": {
Type: schema.TypeBool,
Description: "skip apply when plan is empty",
Description: "Skip apply when plan has no changes",
Optional: true,
},
"disable_destroy_environments": {
Type: schema.TypeBool,
Description: "disable destroy environments",
Description: "Disallow destroying environment in the project",
Optional: true,
},
"skip_redundant_deployments": {
Type: schema.TypeBool,
Description: "skip redundant deployments",
Description: "Automatically skip queued deployments when a newer deployment is triggered",
Optional: true,
},
"updated_by": {
Expand Down

0 comments on commit be26661

Please sign in to comment.