Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implemented extension settings #466

Merged
merged 15 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/data-sources/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,36 @@ Read-Only:
- `allow_dynamic_infrastructure` (Boolean)
- `description` (String) The description of this environment.
- `id` (String) The unique ID for this resource.
- `jira_extension_settings` (List of Object) Provides extension settings for the Jira integration for this environment. (see [below for nested schema](#nestedatt--environments--jira_extension_settings))
- `jira_service_management_extension_settings` (List of Object) Provides extension settings for the Jira Service Management (JSM) integration for this environment. (see [below for nested schema](#nestedatt--environments--jira_service_management_extension_settings))
- `name` (String) The name of this resource.
- `servicenow_extension_settings` (List of Object) Provides extension settings for the ServiceNow integration for this environment. (see [below for nested schema](#nestedatt--environments--servicenow_extension_settings))
- `slug` (String)
- `sort_order` (Number) The order number to sort an environment.
- `space_id` (String) The space ID associated with this environment.
- `use_guided_failure` (Boolean)

<a id="nestedatt--environments--jira_extension_settings"></a>
### Nested Schema for `environments.jira_extension_settings`

Read-Only:

- `environment_type` (String)
jbristowe marked this conversation as resolved.
Show resolved Hide resolved


<a id="nestedatt--environments--jira_service_management_extension_settings"></a>
### Nested Schema for `environments.jira_service_management_extension_settings`

Read-Only:

- `is_enabled` (Boolean)


<a id="nestedatt--environments--servicenow_extension_settings"></a>
### Nested Schema for `environments.servicenow_extension_settings`

Read-Only:

- `is_enabled` (Boolean)


42 changes: 42 additions & 0 deletions docs/data-sources/git_credentials.md
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: "octopusdeploy_git_credentials Data Source - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
Provides information about existing GitCredentials.
---

# octopusdeploy_git_credentials (Data Source)

Provides information about existing GitCredentials.



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

### Optional

- `name` (String) A filter to search by name.
- `skip` (Number) A filter to specify the number of items to skip in the response.
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only

- `git_credentials` (Block List) A list of Git Credentials that match the filter(s). (see [below for nested schema](#nestedblock--git_credentials))
- `id` (String) The ID of this resource.

<a id="nestedblock--git_credentials"></a>
### Nested Schema for `git_credentials`

Read-Only:

- `description` (String) The description of this Git credential.
- `id` (String) The unique ID for this resource.
- `name` (String) The name of the Git credential. This name must be unique.
- `password` (String, Sensitive) The password for the Git credential.
- `space_id` (String) The space ID associated with this resource.
- `type` (String) The Git credential authentication type.
- `username` (String) The username for the Git credential.


33 changes: 23 additions & 10 deletions docs/data-sources/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Read-Only:
- `deployment_process_id` (String)
- `description` (String) The description of this project.
- `discrete_channel_release` (Boolean) Treats releases of different channels to the same environment as a separate deployment dimension
- `extension_settings` (Set of Object) (see [below for nested schema](#nestedatt--projects--extension_settings))
- `git_anonymous_persistence_settings` (List of Object) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedatt--projects--git_anonymous_persistence_settings))
- `git_library_persistence_settings` (List of Object) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedatt--projects--git_library_persistence_settings))
- `git_username_password_persistence_settings` (List of Object) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedatt--projects--git_username_password_persistence_settings))
Expand All @@ -67,11 +66,13 @@ Read-Only:
- `is_disabled` (Boolean)
- `is_discrete_channel_release` (Boolean) Treats releases of different channels to the same environment as a separate deployment dimension
- `is_version_controlled` (Boolean)
- `jira_service_management_extension_settings` (List of Object) Provides extension settings for the Jira Service Management (JSM) integration for this project. (see [below for nested schema](#nestedatt--projects--jira_service_management_extension_settings))
- `lifecycle_id` (String) The lifecycle ID associated with this project.
- `name` (String) The name of the project in Octopus Deploy. This name must be unique.
- `project_group_id` (String) The project group ID associated with this project.
- `release_creation_strategy` (List of Object) (see [below for nested schema](#nestedatt--projects--release_creation_strategy))
- `release_notes_template` (String)
- `servicenow_extension_settings` (List of Object) Provides extension settings for the ServiceNow integration for this project. (see [below for nested schema](#nestedatt--projects--servicenow_extension_settings))
- `slug` (String)
- `space_id` (String) The space ID associated with this project.
- `template` (List of Object) (see [below for nested schema](#nestedatt--projects--template))
Expand All @@ -90,15 +91,6 @@ Read-Only:
- `target_roles` (List of String)


<a id="nestedatt--projects--extension_settings"></a>
### Nested Schema for `projects.extension_settings`

Read-Only:

- `extension_id` (String)
- `values` (List of String)


<a id="nestedatt--projects--git_anonymous_persistence_settings"></a>
### Nested Schema for `projects.git_anonymous_persistence_settings`

Expand Down Expand Up @@ -135,6 +127,16 @@ Read-Only:
- `username` (String)


<a id="nestedatt--projects--jira_service_management_extension_settings"></a>
### Nested Schema for `projects.jira_service_management_extension_settings`

Read-Only:

- `connection_id` (String)
- `is_enabled` (Boolean)
- `service_desk_project_name` (String)


<a id="nestedatt--projects--release_creation_strategy"></a>
### Nested Schema for `projects.release_creation_strategy`

Expand All @@ -154,6 +156,17 @@ Read-Only:



<a id="nestedatt--projects--servicenow_extension_settings"></a>
### Nested Schema for `projects.servicenow_extension_settings`

Read-Only:

- `connection_id` (String)
- `is_enabled` (Boolean)
- `is_state_automatically_transitioned` (Boolean)
- `standard_change_template_name` (String)


<a id="nestedatt--projects--template"></a>
### Nested Schema for `projects.template`

Expand Down
43 changes: 43 additions & 0 deletions docs/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ resource "octopusdeploy_environment" "example" {
description = "An environment for the development team."
name = "Development Environment (OK to Delete)"
use_guided_failure = false
jira_extension_settings {
environment_type = "unmapped"
}
jira_service_management_extension_settings {
is_enabled = false
}
servicenow_extension_settings {
is_enabled = false
}
}
```

Expand All @@ -33,9 +45,40 @@ resource "octopusdeploy_environment" "example" {
- `allow_dynamic_infrastructure` (Boolean)
- `description` (String) The description of this environment.
- `id` (String) The unique ID for this resource.
- `jira_extension_settings` (Block List, Max: 1) 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, Max: 1) 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, Max: 1) Provides extension settings for the ServiceNow integration for this environment. (see [below for nested schema](#nestedblock--servicenow_extension_settings))
- `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)

<a id="nestedblock--jira_extension_settings"></a>
### Nested Schema for `jira_extension_settings`

Required:

- `environment_type` (String) The Jira environment type of this Octopus deployment environment. Valid values are `"development"`, `"production"`, `"staging"`, `"testing"`, or `"unmapped"`.


<a id="nestedblock--jira_service_management_extension_settings"></a>
### Nested Schema for `jira_service_management_extension_settings`

Required:

- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.


<a id="nestedblock--servicenow_extension_settings"></a>
### Nested Schema for `servicenow_extension_settings`

Required:

- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.

## Import

Import is supported using the following syntax:
Expand Down
6 changes: 2 additions & 4 deletions docs/resources/git_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ This resource manages Git credentials in Octopus Deploy.
### Optional

- `description` (String) The description of this Git credential.
- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this resource.

### Read-Only

- `id` (String) The ID of this resource.
- `type` (String) The Git credential authentication type.


47 changes: 36 additions & 11 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ resource "octopusdeploy_project" "example" {
skip_machine_behavior = "SkipUnavailableMachines"
}
jira_service_management_extension_settings {
connection_id = "133d7fe602514060a48bc42ee9870f99"
is_enabled = false
service_desk_project_name = "Test Service Desk Project (OK to Delete)"
}
servicenow_extension_settings {
connection_id = "989034685e2c48c4b06a29286c9ef5cc"
is_enabled = false
is_state_automatically_transitioned = false
standard_change_template_name = "Standard Change Template Name (OK to Delete)"
}
template {
default_value = "example-default-value"
help_text = "example-help-test"
Expand Down Expand Up @@ -75,8 +88,10 @@ resource "octopusdeploy_project" "example" {
- `is_disabled` (Boolean)
- `is_discrete_channel_release` (Boolean) Treats releases of different channels to the same environment as a separate deployment dimension
- `is_version_controlled` (Boolean)
- `jira_service_management_extension_settings` (Block List, Max: 1) Provides extension settings for the Jira Service Management (JSM) integration for this project. (see [below for nested schema](#nestedblock--jira_service_management_extension_settings))
- `release_creation_strategy` (Block List, Max: 1) (see [below for nested schema](#nestedblock--release_creation_strategy))
- `release_notes_template` (String)
- `servicenow_extension_settings` (Block List, Max: 1) Provides extension settings for the ServiceNow integration for this project. (see [below for nested schema](#nestedblock--servicenow_extension_settings))
- `space_id` (String) The space ID associated with this project.
- `template` (Block List) (see [below for nested schema](#nestedblock--template))
- `tenanted_deployment_participation` (String) The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
Expand All @@ -85,7 +100,6 @@ resource "octopusdeploy_project" "example" {
### Read-Only

- `deployment_process_id` (String)
- `extension_settings` (Block Set) (see [below for nested schema](#nestedblock--extension_settings))
- `slug` (String)
- `variable_set_id` (String)

Expand Down Expand Up @@ -145,6 +159,16 @@ Optional:
- `protected_branches` (List of String) A list of protected branch patterns.


<a id="nestedblock--jira_service_management_extension_settings"></a>
### Nested Schema for `jira_service_management_extension_settings`

Required:

- `connection_id` (String) The connection identifier associated with the extension settings.
- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.
- `service_desk_project_name` (String) The project name associated with this extension.


<a id="nestedblock--release_creation_strategy"></a>
### Nested Schema for `release_creation_strategy`

Expand All @@ -164,6 +188,17 @@ Optional:



<a id="nestedblock--servicenow_extension_settings"></a>
### Nested Schema for `servicenow_extension_settings`

Required:

- `connection_id` (String) The connection identifier associated with the extension settings.
- `is_enabled` (Boolean) Specifies whether or not this extension is enabled for this project.
- `is_state_automatically_transitioned` (Boolean) Specifies whether or not this extension will automatically transition the state of a deployment for this project.
- `standard_change_template_name` (String) The name of the standard change template associated with this extension.


<a id="nestedblock--template"></a>
### Nested Schema for `template`

Expand Down Expand Up @@ -197,16 +232,6 @@ Optional:
- `deployment_action` (String)
- `package_reference` (String)



<a id="nestedblock--extension_settings"></a>
### Nested Schema for `extension_settings`

Read-Only:

- `extension_id` (String)
- `values` (List of String)

## Import

Import is supported using the following syntax:
Expand Down
12 changes: 12 additions & 0 deletions examples/resources/octopusdeploy_environment/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,16 @@ resource "octopusdeploy_environment" "example" {
description = "An environment for the development team."
name = "Development Environment (OK to Delete)"
use_guided_failure = false

jira_extension_settings {
environment_type = "unmapped"
}

jira_service_management_extension_settings {
is_enabled = false
}

servicenow_extension_settings {
is_enabled = false
}
}
13 changes: 13 additions & 0 deletions examples/resources/octopusdeploy_project/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ resource "octopusdeploy_project" "example" {
skip_machine_behavior = "SkipUnavailableMachines"
}

jira_service_management_extension_settings {
connection_id = "133d7fe602514060a48bc42ee9870f99"
is_enabled = false
service_desk_project_name = "Test Service Desk Project (OK to Delete)"
}

servicenow_extension_settings {
connection_id = "989034685e2c48c4b06a29286c9ef5cc"
is_enabled = false
is_state_automatically_transitioned = false
standard_change_template_name = "Standard Change Template Name (OK to Delete)"
}

template {
default_value = "example-default-value"
help_text = "example-help-test"
Expand Down
Loading