Skip to content

Commit

Permalink
Merge branch 'main' into feat/convert-teams-to-framework
Browse files Browse the repository at this point in the history
# Conflicts:
#	octopusdeploy_framework/framework_provider.go
  • Loading branch information
shaun-od committed Dec 6, 2024
2 parents 7f02f7a + 8bfcde1 commit e17bc40
Show file tree
Hide file tree
Showing 40 changed files with 1,937 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data "octopusdeploy_accounts" "example" {

### Optional

- `account_type` (String) A filter to search by a list of account types. Valid account types are `AmazonWebServicesAccount`, `AmazonWebServicesRoleAccount`, `AmazonWebServicesOidcAccount`, `AzureServicePrincipal`, `AzureSubscription`, `None`, `SshKeyPair`, `Token`, or `UsernamePassword`.
- `account_type` (String) A filter to search by a list of account types. Valid account types are `AmazonWebServicesAccount`, `AmazonWebServicesRoleAccount`, `AmazonWebServicesOidcAccount`, `AzureServicePrincipal`, `AzureSubscription`, `GenericOidcAccount`, `None`, `SshKeyPair`, `Token`, or `UsernamePassword`.
- `ids` (List of String) A filter to search by a list of IDs.
- `partial_name` (String) A filter to search by the partial match of a name.
- `skip` (Number) A filter to specify the number of items to skip in the response.
Expand Down
45 changes: 45 additions & 0 deletions docs/data-sources/deployment_freezes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "octopusdeploy_deployment_freezes Data Source - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
Provides information about deployment freezes
---

# octopusdeploy_deployment_freezes (Data Source)

Provides information about deployment freezes



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

### Optional

- `environment_ids` (List of String) A filter to search by a list of environment IDs
- `ids` (List of String) A filter to search by a list of IDs.
- `include_complete` (Boolean) Include deployment freezes that completed, default is true
- `partial_name` (String) A filter to search by a partial name.
- `project_ids` (List of String) A filter to search by a list of project IDs
- `skip` (Number) A filter to specify the number of items to skip in the response.
- `status` (String) Filter by the status of the deployment freeze, value values are Expired, Active, Scheduled (case-insensitive)
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only

- `deployment_freezes` (Attributes List) (see [below for nested schema](#nestedatt--deployment_freezes))
- `id` (String) The unique ID for this resource.

<a id="nestedatt--deployment_freezes"></a>
### Nested Schema for `deployment_freezes`

Read-Only:

- `end` (String) The end time of the freeze
- `id` (String) The unique ID for this resource.
- `name` (String) The name of this resource.
- `project_environment_scope` (Map of List of String) The project environment scope of the deployment freeze
- `start` (String) The start time of the freeze


4 changes: 2 additions & 2 deletions docs/guides/2-provider-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ subcategory: "Guides"
terraform {
required_providers {
octopusdeploy = {
source = OctopusDeployLabs/octopusdeploy
source = "OctopusDeployLabs/octopusdeploy"
}
}
}
Expand All @@ -39,7 +39,7 @@ The environment variable fallback values that the Terraform Provider search for
terraform {
required_providers {
octopusdeploy = {
source = OctopusDeployLabs/octopusdeploy
source = "OctopusDeployLabs/octopusdeploy"
}
}
}
Expand Down
69 changes: 69 additions & 0 deletions docs/resources/deployment_freeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "octopusdeploy_deployment_freeze Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
---

# octopusdeploy_deployment_freeze (Resource)



## Example Usage

```terraform
# basic freeze with no project scopes
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "Xmas"
start = "2024-12-25T00:00:00+10:00"
end = "2024-12-27T00:00:00+08:00"
}
# Freeze with different timezones and single project/environment scope
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "Xmas"
start = "2024-12-25T00:00:00+10:00"
end = "2024-12-27T00:00:00+08:00"
}
resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id= octopusdeploy_deployment_freeze.freeze.id
project_id = "Projects-123"
environment_ids = [ "Environments-123", "Environments-456" ]
}
# Freeze with ids sourced from resources and datasources. Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "End of financial year shutdown"
start = "2025-06-30T00:00:00+10:00"
end = "2025-07-02T00:00:00+10:00"
}
resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
project_id = resource.octopusdeploy_project.project1.id
environment_ids = [resource.octopusdeploy_environment.production.id]
}
resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
project_id = data.octopusdeploy_projects.second_project.projects[0].id
environment_ids = [ data.octopusdeploy_environments.default_environment.environments[0].id ]
}
```

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

### Required

- `end` (String) The end time of the freeze, must be RFC3339 format
- `name` (String) The name of this resource.
- `start` (String) The start time of the freeze, must be RFC3339 format

### Read-Only

- `id` (String) The unique ID for this resource.


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

# octopusdeploy_deployment_freeze_project (Resource)





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

### Required

- `deploymentfreeze_id` (String) The deployment freeze ID associated with this freeze scope.
- `project_id` (String) The project ID associated with this freeze scope.

### Optional

- `environment_ids` (List of String) The environment IDs associated with this project deployment freeze scope.

### Read-Only

- `id` (String) The unique ID for this resource.


51 changes: 51 additions & 0 deletions docs/resources/generic_oidc_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "octopusdeploy_generic_oidc_account Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
This resource manages a Generic OIDC Account in Octopus Deploy.
---

# octopusdeploy_generic_oidc_account (Resource)

This resource manages a Generic OIDC Account in Octopus Deploy.

## Example Usage

```terraform
resource "octopusdeploy_generic_oidc_account" "example" {
name = "Generic OpenID Connect Account (OK to Delete)"
execution_subject_keys = ["space", "project"]
audience = "api://default"
}
```

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

### Required

- `name` (String) The name of the generic oidc account.

### Optional

- `audience` (String) The audience associated with this resource.
- `description` (String) The description of this generic oidc account.
- `environments` (List of String) A list of environment IDs associated with this resource.
- `execution_subject_keys` (List of String) Keys to include in a deployment or runbook. Valid options are `space`, `environment`, `project`, `tenant`, `runbook`, `account`, `type`.
- `space_id` (String) The space ID associated with this resource.
- `tenant_tags` (List of String) A list of tenant tags associated with this resource.
- `tenanted_deployment_participation` (String) The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
- `tenants` (List of String) A list of tenant IDs associated with this resource.

### Read-Only

- `id` (String) The unique ID for this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import [options] octopusdeploy_generic_oidc_account.<name> <account-id>
```
2 changes: 1 addition & 1 deletion docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ resource "octopusdeploy_project" "example" {
- `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`.
- `versioning_strategy` (Block List) (see [below for nested schema](#nestedblock--versioning_strategy))
- `versioning_strategy` (Block List, Deprecated) (see [below for nested schema](#nestedblock--versioning_strategy))

### Read-Only

Expand Down
100 changes: 100 additions & 0 deletions docs/resources/project_versioning_strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "octopusdeploy_project_versioning_strategy Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
---

# octopusdeploy_project_versioning_strategy (Resource)



## Example Usage

```terraform
resource "octopusdeploy_project_group" "tp" {
name = "DevOps Projects"
description = "My DevOps projects group"
}
resource "octopusdeploy_project" "tp" {
name = "My DevOps Project"
description = "test project"
lifecycle_id = "Lifecycles-1"
project_group_id = octopusdeploy_project_group.tp.id
depends_on = [octopusdeploy_project_group.tp]
}
resource "octopusdeploy_deployment_process" "process" {
project_id = octopusdeploy_project.tp.id
step {
name = "Hello World"
target_roles = [ "hello-world" ]
start_trigger = "StartAfterPrevious"
package_requirement = "LetOctopusDecide"
condition = "Success"
run_script_action {
name = "Hello World"
is_disabled = false
is_required = true
script_body = "Write-Host 'hello world'"
script_syntax = "PowerShell"
can_be_used_for_project_versioning = true
sort_order = 1
package {
name = "Package"
feed_id = "feeds-builtin"
package_id = "myExpressApp"
acquisition_location = "Server"
extract_during_deployment = true
}
}
}
depends_on = [octopusdeploy_project.tp]
}
resource "octopusdeploy_project_versioning_strategy" "tp" {
project_id = octopusdeploy_project.tp.id
space_id = octopusdeploy_project.tp.space_id
donor_package_step_id = octopusdeploy_deployment_process.process.step[0].run_script_action[0].id
donor_package = {
deployment_action = "Hello World"
package_reference = "Package"
}
depends_on = [
octopusdeploy_project_group.tp,
octopusdeploy_deployment_process.process
]
}
```

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

### Required

- `donor_package` (Attributes) Donor Packages. (see [below for nested schema](#nestedatt--donor_package))
- `project_id` (String) The associated project ID.
- `space_id` (String) Space ID of the associated project.

### Optional

- `donor_package_step_id` (String) The associated donor package step ID.
- `template` (String)

<a id="nestedatt--donor_package"></a>
### Nested Schema for `donor_package`

Optional:

- `deployment_action` (String) Deployment action.
- `package_reference` (String) Package reference.


38 changes: 38 additions & 0 deletions examples/resources/octopusdeploy_deployment_freeze/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# basic freeze with no project scopes
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "Xmas"
start = "2024-12-25T00:00:00+10:00"
end = "2024-12-27T00:00:00+08:00"
}

# Freeze with different timezones and single project/environment scope
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "Xmas"
start = "2024-12-25T00:00:00+10:00"
end = "2024-12-27T00:00:00+08:00"
}

resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id= octopusdeploy_deployment_freeze.freeze.id
project_id = "Projects-123"
environment_ids = [ "Environments-123", "Environments-456" ]
}

# Freeze with ids sourced from resources and datasources. Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
resource "octopusdeploy_deployment_freeze" "freeze" {
name = "End of financial year shutdown"
start = "2025-06-30T00:00:00+10:00"
end = "2025-07-02T00:00:00+10:00"
}

resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
project_id = resource.octopusdeploy_project.project1.id
environment_ids = [resource.octopusdeploy_environment.production.id]
}

resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
project_id = data.octopusdeploy_projects.second_project.projects[0].id
environment_ids = [ data.octopusdeploy_environments.default_environment.environments[0].id ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import [options] octopusdeploy_generic_oidc_account.<name> <account-id>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "octopusdeploy_generic_oidc_account" "example" {
name = "Generic OpenID Connect Account (OK to Delete)"
execution_subject_keys = ["space", "project"]
audience = "api://default"
}
Loading

0 comments on commit e17bc40

Please sign in to comment.