diff --git a/docs/resources/environment.md b/docs/resources/environment.md
index c9f9c5d1e..22b847d57 100644
--- a/docs/resources/environment.md
+++ b/docs/resources/environment.md
@@ -3,12 +3,12 @@
page_title: "octopusdeploy_environment Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
-
+ This resource manages environments in Octopus Deploy.
---
# octopusdeploy_environment (Resource)
-
+This resource manages environments in Octopus Deploy.
## Example Usage
@@ -48,17 +48,20 @@ resource "octopusdeploy_environment" "example" {
- `jira_extension_settings` (Block List) Provides extension settings for the Jira integration for this environment. (see [below for nested schema](#nestedblock--jira_extension_settings))
- `jira_service_management_extension_settings` (Block List) Provides extension settings for the Jira Service Management (JSM) integration for this environment. (see [below for nested schema](#nestedblock--jira_service_management_extension_settings))
- `servicenow_extension_settings` (Block List) Provides extension settings for the ServiceNow integration for this environment. (see [below for nested schema](#nestedblock--servicenow_extension_settings))
-- `slug` (String) The unique slug of this environment
-- `sort_order` (Number) The order number to sort an environment
+- `sort_order` (Number) The order number to sort an environment.
- `space_id` (String) The space ID associated with this environment.
- `use_guided_failure` (Boolean)
+### Read-Only
+
+- `slug` (String) The unique slug of this environment
+
### Nested Schema for `jira_extension_settings`
Optional:
-- `environment_type` (String)
+- `environment_type` (String) The Jira environment type of this Octopus deployment environment. Valid values are `"development"`, `"production"`, `"staging"`, `"testing"`, `"unmapped"`.
@@ -66,7 +69,7 @@ Optional:
Optional:
-- `is_enabled` (Boolean)
+- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.
@@ -74,7 +77,7 @@ Optional:
Optional:
-- `is_enabled` (Boolean)
+- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.
## Import
diff --git a/octopusdeploy_framework/schemas/environment.go b/octopusdeploy_framework/schemas/environment.go
index 8b26f9ac9..ed57bba65 100644
--- a/octopusdeploy_framework/schemas/environment.go
+++ b/octopusdeploy_framework/schemas/environment.go
@@ -129,7 +129,7 @@ func GetEnvironmentResourceSchema() resourceSchema.Schema {
Attributes: map[string]resourceSchema.Attribute{
"environment_type": resourceSchema.StringAttribute{
Description: fmt.Sprintf("The Jira environment type of this Octopus deployment environment. Valid values are %s.", strings.Join(util.Map(jiraEnvironmentTypes, func(item string) string { return fmt.Sprintf("`\"%s\"`", item) }), ", ")),
- Required: true,
+ Optional: true,
Validators: []validator.String{
stringvalidator.OneOfCaseInsensitive(
jiraEnvironmentTypes...,
@@ -145,7 +145,7 @@ func GetEnvironmentResourceSchema() resourceSchema.Schema {
Attributes: map[string]resourceSchema.Attribute{
"is_enabled": resourceSchema.BoolAttribute{
Description: "Specifies whether or not this extension is enabled for this project.",
- Required: true,
+ Optional: true,
},
},
},
@@ -156,7 +156,7 @@ func GetEnvironmentResourceSchema() resourceSchema.Schema {
Attributes: map[string]resourceSchema.Attribute{
"is_enabled": resourceSchema.BoolAttribute{
Description: "Specifies whether or not this extension is enabled for this project.",
- Required: true,
+ Optional: true,
},
},
},