Skip to content

Commit

Permalink
resource id should be readonly. space name on datasource should be op…
Browse files Browse the repository at this point in the history
…tional (#770)
  • Loading branch information
benPearce1 authored Aug 29, 2024
1 parent a6264b1 commit 4d9acca
Show file tree
Hide file tree
Showing 32 changed files with 95 additions and 44 deletions.
5 changes: 4 additions & 1 deletion docs/data-sources/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ Provides information about an existing space.
<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `name` (String) The name of this resource, no more than 20 characters long

### Read-Only

- `description` (String) The description of this space.
- `id` (String) The unique ID for this resource.
- `is_default` (Boolean) Specifies if this space is the default space in Octopus.
- `is_task_queue_stopped` (Boolean) Specifies the status of the task queue for this space.
- `name` (String) The name of this resource, no more than 20 characters long
- `slug` (String) The unique slug of this space
- `space_managers_team_members` (Set of String) A list of user IDs designated to be managers of this space.
- `space_managers_teams` (Set of String) A list of team IDs designated to be managers of this space.
Expand Down
5 changes: 4 additions & 1 deletion docs/data-sources/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ data "octopusdeploy_spaces" "spaces" {
<a id="nestedatt--spaces"></a>
### Nested Schema for `spaces`

Optional:

- `name` (String) The name of this resource, no more than 20 characters long

Read-Only:

- `description` (String) The description of this space.
- `id` (String) The unique ID for this resource.
- `is_default` (Boolean) Specifies if this space is the default space in Octopus.
- `is_task_queue_stopped` (Boolean) Specifies the status of the task queue for this space.
- `name` (String) The name of this resource, no more than 20 characters long
- `slug` (String) The unique slug of this space
- `space_managers_team_members` (Set of String) A list of user IDs designated to be managers of this space.
- `space_managers_teams` (Set of String) A list of team IDs designated to be managers of this space.
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/artifactory_generic_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ resource "octopusdeploy_artifactory_generic_feed" "example" {

### Optional

- `id` (String) The unique ID for this resource.
- `layout_regex` (String)
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this artifactory generic feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/aws_elastic_container_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ resource "octopusdeploy_aws_elastic_container_registry" "example" {

### Optional

- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `space_id` (String) The space ID associated with this aws elastic container registry.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/docker_container_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ resource "octopusdeploy_docker_container_registry" "example" {
### Optional

- `api_version` (String)
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `registry_path` (String)
- `space_id` (String) The space ID associated with this docker container registry feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ 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) 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))
Expand All @@ -53,6 +52,10 @@ resource "octopusdeploy_environment" "example" {
- `space_id` (String) The space ID associated with this environment.
- `use_guided_failure` (Boolean)

### Read-Only

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

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

Expand Down
5 changes: 4 additions & 1 deletion docs/resources/git_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ Manages a Git credential 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 Git Credential.
- `type` (String) The Git credential authentication type.

### Read-Only

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


5 changes: 4 additions & 1 deletion docs/resources/github_repository_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ resource "octopusdeploy_github_repository_feed" "example" {

- `download_attempts` (Number) The number of times a deployment should attempt to download a package from this feed before failing.
- `download_retry_backoff_seconds` (Number) The number of seconds to apply as a linear back off between download attempts.
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this github repository feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/helm_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ resource "octopusdeploy_helm_feed" "example" {

### Optional

- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this helm feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
7 changes: 5 additions & 2 deletions docs/resources/library_variable_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ This resource manages library variable sets in Octopus Deploy.
### Optional

- `description` (String) The description of this library variable set.
- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this library variable set.
- `template` (Block List) (see [below for nested schema](#nestedblock--template))

### Read-Only

- `id` (String) The unique ID for this resource.
- `template_ids` (Map of String)
- `variable_set_id` (String)

Expand All @@ -43,7 +43,10 @@ Optional:
- `default_value` (String) A default value for the parameter, if applicable. This can be a hard-coded value or a variable reference.
- `display_settings` (Map of String) The display settings for the parameter.
- `help_text` (String) The help presented alongside the parameter input.
- `id` (String) The unique ID for this resource.
- `label` (String) The label shown beside the parameter when presented in the deployment process. Example: `Server name`.

Read-Only:

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


5 changes: 4 additions & 1 deletion docs/resources/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,15 @@ resource "octopusdeploy_lifecycle" "example" {
### Optional

- `description` (String) The description of this lifecycle.
- `id` (String) The unique ID for this resource.
- `phase` (Block List) Defines a phase in the lifecycle. (see [below for nested schema](#nestedblock--phase))
- `release_retention_policy` (Block List) Defines the retention policy for releases or tentacles. (see [below for nested schema](#nestedblock--release_retention_policy))
- `space_id` (String) The space ID associated with this resource.
- `tentacle_retention_policy` (Block List) Defines the retention policy for releases or tentacles. (see [below for nested schema](#nestedblock--tentacle_retention_policy))

### Read-Only

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

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

Expand Down
5 changes: 4 additions & 1 deletion docs/resources/maven_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ resource "octopusdeploy_maven_feed" "example" {

- `download_attempts` (Number) The number of times a deployment should attempt to download a package from this feed before failing.
- `download_retry_backoff_seconds` (Number) The number of seconds to apply as a linear back off between download attempts.
- `id` (String) The unique ID for this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this maven feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/nuget_feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ resource "octopusdeploy_nuget_feed" "example" {

- `download_attempts` (Number) The number of times a deployment should attempt to download a package from this feed before failing.
- `download_retry_backoff_seconds` (Number) The number of seconds to apply as a linear back off between download attempts.
- `id` (String) The unique ID for this resource.
- `is_enhanced_mode` (Boolean) This will improve performance of the NuGet feed but may not be supported by some older feeds. Disable if the operation, Create Release does not return the latest version for a package.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `space_id` (String) The space ID associated with this nuget feed.
- `username` (String, Sensitive) The username associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ resource "octopusdeploy_project" "example" {
- `git_anonymous_persistence_settings` (Block List) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedblock--git_anonymous_persistence_settings))
- `git_library_persistence_settings` (Block List) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedblock--git_library_persistence_settings))
- `git_username_password_persistence_settings` (Block List) Provides Git-related persistence settings for a version-controlled project. (see [below for nested schema](#nestedblock--git_username_password_persistence_settings))
- `id` (String) The unique ID for this resource.
- `included_library_variable_sets` (List of String) The list of included library variable set IDs.
- `is_disabled` (Boolean)
- `is_discrete_channel_release` (Boolean) Treats releases of different channels to the same environment as a separate deployment dimension
Expand All @@ -103,6 +102,7 @@ resource "octopusdeploy_project" "example" {
### Read-Only

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

<a id="nestedblock--auto_deploy_release_overrides"></a>
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/project_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ resource "octopusdeploy_project_group" "example" {
### Optional

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

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ This resource manages runbooks in Octopus Deploy.
- `environment_scope` (String) Determines how the runbook is scoped to environments.
- `environments` (List of String) When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
- `force_package_download` (Boolean) Whether to force packages to be re-downloaded or not.
- `id` (String) The unique ID for this resource.
- `multi_tenancy_mode` (String) The tenanted deployment mode of the runbook. Valid modes are `Untenanted`, `TenantedOrUntenanted`, `Tenanted`
- `retention_policy` (Block List) Sets the runbook retention policy. (see [below for nested schema](#nestedblock--retention_policy))
- `space_id` (String) The space ID associated with this runbook.

### Read-Only

- `id` (String) The unique ID for this resource.
- `published_runbook_snapshot_id` (String) The published snapshot ID.
- `runbook_process_id` (String) The runbook process ID.

Expand Down
5 changes: 4 additions & 1 deletion docs/resources/script_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ resource "octopusdeploy_script_module" "example" {
### Optional

- `description` (String) The description of this script module.
- `id` (String) The unique ID for this resource.
- `script` (Block List) The script associated with this script module. (see [below for nested schema](#nestedblock--script))
- `space_id` (String) The space ID associated with this Script Module.
- `variable_set_id` (String) The variable set ID for this script module.

### Read-Only

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

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

Expand Down
5 changes: 4 additions & 1 deletion docs/resources/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ resource "octopusdeploy_space" "example" {
### Optional

- `description` (String) The description of this space.
- `id` (String) The unique ID for this resource.
- `is_default` (Boolean) Specifies if this space is the default space in Octopus.
- `is_task_queue_stopped` (Boolean) Specifies the status of the task queue for this space.
- `slug` (String) The unique slug of this space
- `space_managers_team_members` (Set of String) A list of user IDs designated to be managers of this space.
- `space_managers_teams` (Set of String) A list of team IDs designated to be managers of this space.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/tag_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ resource "octopusdeploy_tag" "beta" {
### Optional

- `description` (String) The description of this tag set.
- `id` (String) The unique ID for this resource.
- `sort_order` (Number) The sort order associated with this resource.
- `space_id` (String) The space ID associated with this resource.

### Read-Only

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

## Import

Import is supported using the following syntax:
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/tenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ This resource manages tenants in Octopus Deploy.

- `cloned_from_tenant_id` (String) The ID of the tenant from which this tenant was cloned.
- `description` (String) The description of this tenant.
- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this tenant.
- `tenant_tags` (List of String) A list of tenant tags associated with this resource.

### Read-Only

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

~> **NOTE property `project_environment` deprecated:** The `project_environment` property has been replaced by the `octopusdeploy_tenant_project` resource to allow more advanced provisioning scenarioes.
5 changes: 4 additions & 1 deletion docs/resources/tenant_common_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ Manages a tenant common variable in Octopus Deploy.

### Optional

- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this Tenant Common Variable.
- `value` (String, Sensitive) The value of the variable.

### Read-Only

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


5 changes: 4 additions & 1 deletion docs/resources/tenant_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ description: |-
### Optional

- `environment_ids` (List of String) The environment IDs associated with this tenant.
- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this project tenant.

### Read-Only

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


5 changes: 4 additions & 1 deletion docs/resources/username_password_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ resource "octopusdeploy_username_password_account" "example" {

- `description` (String) The description of this username/password account.
- `environments` (List of String) A list of environment IDs associated with this resource.
- `id` (String) The unique ID for this resource.
- `password` (String, Sensitive) The password associated with this resource.
- `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:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ resource "octopusdeploy_variable" "prompted_variable" {
### Read-Only

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

<a id="nestedblock--prompt"></a>
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy_framework/schemas/git_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (g GitCredentialSchema) GetResourceSchema() resourceSchema.Schema {
return resourceSchema.Schema{
Description: "Manages a Git credential in Octopus Deploy.",
Attributes: map[string]resourceSchema.Attribute{
"id": util.ResourceString().Optional().Computed().PlanModifiers(stringplanmodifier.UseStateForUnknown()).Description("The unique ID for this resource.").Build(),
"id": GetIdResourceSchema(),
"space_id": util.ResourceString().Optional().Computed().PlanModifiers(stringplanmodifier.UseStateForUnknown()).Description("The space ID associated with this Git Credential.").Build(),
"name": util.ResourceString().Required().Description("The name of this Git Credential.").Build(),
"description": util.ResourceString().Optional().Computed().Default("").Description("The description of this Git Credential.").Build(),
Expand Down
Loading

0 comments on commit 4d9acca

Please sign in to comment.