diff --git a/docs/data-sources/project_policy.md b/docs/data-sources/project_policy.md new file mode 100644 index 00000000..0bf50533 --- /dev/null +++ b/docs/data-sources/project_policy.md @@ -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 + +### 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 + + diff --git a/docs/resources/project_policy.md b/docs/resources/project_policy.md new file mode 100644 index 00000000..a9234c1b --- /dev/null +++ b/docs/resources/project_policy.md @@ -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 + +### 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 + + diff --git a/env0/data_project_policy.go b/env0/data_project_policy.go index 47e2733c..cbd312f3 100644 --- a/env0/data_project_policy.go +++ b/env0/data_project_policy.go @@ -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": { diff --git a/env0/resource_project_policy.go b/env0/resource_project_policy.go index 9bfa8a51..015f911a 100644 --- a/env0/resource_project_policy.go +++ b/env0/resource_project_policy.go @@ -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) @@ -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) @@ -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": {