Skip to content

Commit

Permalink
Some more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacCalligeros95 committed Aug 7, 2024
1 parent 975ac87 commit 2c6f1b6
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 136 deletions.
15 changes: 6 additions & 9 deletions docs/data-sources/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,23 @@ data "octopusdeploy_environments" "example" {
<a id="nestedblock--environments"></a>
### Nested Schema for `environments`

Required:
Optional:

- `name` (String) The name of this resource, no more than 50 characters long
- `jira_extension_settings` (Attributes List) Provides extension settings for the Jira integration for this environment. (see [below for nested schema](#nestedatt--environments--jira_extension_settings))
- `space_id` (String) The space ID associated with this environment.

Optional:
Read-Only:

- `allow_dynamic_infrastructure` (Boolean)
- `description` (String) The description of this environment.
- `id` (String) The unique ID for this resource.
- `jira_extension_settings` (Attributes List) 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` (Attributes List) 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` (Attributes List) Provides extension settings for the ServiceNow integration for this environment. (see [below for nested schema](#nestedatt--environments--servicenow_extension_settings))
- `slug` (String) The unique slug of this 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:

- `description` (String) The description of this environment.

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

Expand Down
23 changes: 10 additions & 13 deletions docs/data-sources/feeds.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,37 @@ data "octopusdeploy_feeds" "example" {
### Optional

- `feed_type` (String) A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.
- `feeds` (Block List) (see [below for nested schema](#nestedblock--feeds))
- `id` (String) The unique ID for this resource.
- `ids` (List of String) A filter to search by a list of IDs.
- `name` (String) The name of this resource.
- `partial_name` (String) A filter to search by a partial name.
- `skip` (Number) A filter to specify the number of items to skip in the response.
- `space_id` (String) The space ID associated with this feeds.
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only

- `feeds` (Block List) (see [below for nested schema](#nestedblock--feeds))
- `id` (String) The unique ID for this resource.

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

Required:
Read-Only:

- `access_key` (String) The AWS access key to use when authenticating against Amazon Web Services.
- `feed_uri` (String)
- `name` (String) The name of this resource.

Optional:

- `api_version` (String)
- `delete_unreleased_packages_after_days` (Number)
- `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.
- `feed_type` (String) A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.
- `feed_uri` (String)
- `id` (String) The unique ID for this resource.
- `is_enhanced_mode` (Boolean)
- `name` (String) The name of this resource.
- `package_acquisition_location_options` (List of String)
- `password` (String, Sensitive) The password associated with this resource.
- `region` (String)
- `registry_path` (String)
- `secret_key` (String, Sensitive)
- `space_id` (String) The space ID associated with this feeds.
- `username` (String, Sensitive) The username associated with this resource.

Read-Only:

- `region` (String)
- `username` (String, Sensitive) The username associated with this resource.
4 changes: 2 additions & 2 deletions docs/data-sources/git_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ A list of Git Credentials that match the filter(s).

Optional:

- `id` (String) The unique ID for this resource.
- `name` (String) A filter search by exact name
- `space_id` (String) The space ID associated with this Git Credential.

Read-Only:

- `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.
- `username` (String) The username for the Git credential.

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/library_variable_sets.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ Provides information about existing library variable sets.
Optional:

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

Read-Only:

- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this library variable set.
- `template_ids` (Map of String)
- `variable_set_id` (String)

Expand Down
7 changes: 2 additions & 5 deletions docs/data-sources/lifecycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,13 @@ Required:

- `name` (String) The name of this resource.

Optional:

- `id` (String) The unique ID for this resource.
- `space_id` (String) The space ID associated with this lifecycle.

Read-Only:

- `description` (String) The description of this lifecycle.
- `id` (String) The unique ID for this resource.
- `phase` (Attributes List) (see [below for nested schema](#nestedatt--lifecycles--phase))
- `release_retention_policy` (Attributes List) (see [below for nested schema](#nestedatt--lifecycles--release_retention_policy))
- `space_id` (String) The space ID associated with this lifecycle.
- `tentacle_retention_policy` (Attributes List) (see [below for nested schema](#nestedatt--lifecycles--tentacle_retention_policy))

<a id="nestedatt--lifecycles--phase"></a>
Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/space.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Provides information about an existing space.
<!-- schema generated by tfplugindocs -->
## Schema

### Required

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

### Optional

- `description` (String) The description of this space.

### Read-Only

- `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
8 changes: 4 additions & 4 deletions docs/data-sources/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ data "octopusdeploy_spaces" "spaces" {
<a id="nestedblock--spaces"></a>
### Nested Schema for `spaces`

Required:

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

Optional:

- `description` (String) The description of this space.

Read-Only:

- `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
10 changes: 5 additions & 5 deletions docs/data-sources/tenants.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ Provides information about existing tenants.
- `space_id` (String) The space ID associated with this tenants.
- `tags` (List of String) A filter to search by a list of tags.
- `take` (Number) A filter to specify the number of items to take (or return) in the response.

### Read-Only

- `tenants` (Block List) A list of tenants that match the filter(s). (see [below for nested schema](#nestedblock--tenants))

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

Optional:
Read-Only:

- `cloned_from_tenant_id` (String) The ID of the tenant from which this tenant was cloned.
- `description` (String) The description of this tenants.
- `id` (String) The unique ID for this resource.
- `name` (String) The name of 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:

- `description` (String) The description of this tenants.


4 changes: 2 additions & 2 deletions octopusdeploy_framework/datasource_environments.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ func (*environmentDataSource) Schema(_ context.Context, req datasource.SchemaReq
Attributes: map[string]schema.Attribute{
//request
"ids": util.GetQueryIDsDatasourceSchema(),
"space_id": util.GetSpaceIdDatasourceSchema(schemas.EnvironmentResourceDescription),
"space_id": schemas.GetSpaceIdDatasourceSchema(schemas.EnvironmentResourceDescription, false),
"name": util.GetQueryNameDatasourceSchema(),
"partial_name": util.GetQueryPartialNameDatasourceSchema(),
"skip": util.GetQuerySkipDatasourceSchema(),
"take": util.GetQueryTakeDatasourceSchema(),

//response
"id": util.GetIdDatasourceSchema(),
"id": schemas.GetIdDatasourceSchema(false),
},
Blocks: map[string]schema.Block{
"environments": schema.ListNestedBlock{
Expand Down
4 changes: 2 additions & 2 deletions octopusdeploy_framework/datasource_project_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ func (p *projectGroupsDataSource) Schema(_ context.Context, _ datasource.SchemaR
resp.Schema = schema.Schema{
Attributes: map[string]schema.Attribute{
// request
"space_id": util.GetSpaceIdDatasourceSchema(description),
"space_id": schemas.GetSpaceIdDatasourceSchema(description, false),
"ids": util.GetQueryIDsDatasourceSchema(),
"partial_name": util.GetQueryPartialNameDatasourceSchema(),
"skip": util.GetQuerySkipDatasourceSchema(),
"take": util.GetQueryTakeDatasourceSchema(),

// response
"id": util.GetIdDatasourceSchema(),
"id": schemas.GetIdDatasourceSchema(false),
},
Blocks: map[string]schema.Block{
"project_groups": schema.ListNestedBlock{
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy_framework/datasource_spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (*spacesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, r
"take": schemas.GetQueryTakeDatasourceSchema(),

// response
"id": schemas.GetIdDatasourceSchema(),
"id": schemas.GetIdDatasourceSchema(false),
},
Blocks: map[string]schema.Block{
"spaces": schema.ListNestedBlock{
Expand Down
15 changes: 6 additions & 9 deletions octopusdeploy_framework/schemas/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,20 @@ const (

func GetEnvironmentDatasourceSchema() map[string]datasourceSchema.Attribute {
return map[string]datasourceSchema.Attribute{
"id": util.GetIdDatasourceSchema(),
"slug": util.GetSlugDatasourceSchema(EnvironmentResourceDescription),
"name": util.GetNameDatasourceWithMaxLengthSchema(true, 50),
"id": GetIdDatasourceSchema(true),
"slug": util.GetSlugDatasourceSchema(EnvironmentResourceDescription, true),
"name": GetReadonlyNameDatasourceSchema(),
"description": util.GetDescriptionDatasourceSchema(EnvironmentResourceDescription),
EnvironmentSortOrder: util.GetSortOrderDataSourceSchema(EnvironmentResourceDescription),
EnvironmentAllowDynamicInfrastructure: datasourceSchema.BoolAttribute{
Optional: true,
Computed: true,
},
EnvironmentUseGuidedFailure: datasourceSchema.BoolAttribute{
Optional: true,
Computed: true,
},
"space_id": util.GetSpaceIdDatasourceSchema(EnvironmentResourceDescription),
"space_id": GetSpaceIdDatasourceSchema(EnvironmentResourceDescription, true),
EnvironmentJiraExtensionSettings: datasourceSchema.ListNestedAttribute{
Description: "Provides extension settings for the Jira integration for this environment.",
Optional: true,
Computed: true,
NestedObject: datasourceSchema.NestedAttributeObject{
Attributes: map[string]datasourceSchema.Attribute{
Expand All @@ -62,7 +61,6 @@ func GetEnvironmentDatasourceSchema() map[string]datasourceSchema.Attribute {
},
EnvironmentJiraServiceManagementExtensionSettings: datasourceSchema.ListNestedAttribute{
Description: "Provides extension settings for the Jira Service Management (JSM) integration for this environment.",
Optional: true,
Computed: true,
NestedObject: datasourceSchema.NestedAttributeObject{
Attributes: map[string]datasourceSchema.Attribute{
Expand All @@ -72,7 +70,6 @@ func GetEnvironmentDatasourceSchema() map[string]datasourceSchema.Attribute {
},
EnvironmentServiceNowExtensionSettings: datasourceSchema.ListNestedAttribute{
Description: "Provides extension settings for the ServiceNow integration for this environment.",
Optional: true,
Computed: true,
NestedObject: datasourceSchema.NestedAttributeObject{
Attributes: map[string]datasourceSchema.Attribute{
Expand Down
33 changes: 15 additions & 18 deletions octopusdeploy_framework/schemas/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ func GetFeedsDataSourceSchema() map[string]datasourceSchema.Attribute {
"partial_name": util.GetQueryPartialNameDatasourceSchema(),
"skip": util.GetQuerySkipDatasourceSchema(),
"take": util.GetQueryTakeDatasourceSchema(),
"space_id": util.GetSpaceIdDatasourceSchema("feeds"),
"space_id": GetSpaceIdDatasourceSchema("feeds", false),

// response
"id": util.GetIdDatasourceSchema(),
"id": GetIdDatasourceSchema(true),
}
}

func GetFeedDataSourceSchema() map[string]datasourceSchema.Attribute {
return map[string]datasourceSchema.Attribute{
"feed_type": datasourceSchema.StringAttribute{
Description: "A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.",
Optional: true,
Computed: true,
Validators: []validator.String{
stringvalidator.OneOf(
"AwsElasticContainerRegistry",
Expand All @@ -103,63 +103,60 @@ func GetFeedDataSourceSchema() map[string]datasourceSchema.Attribute {
},
},
"feed_uri": datasourceSchema.StringAttribute{
Required: true,
Computed: true,
},
"id": util.GetIdDatasourceSchema(),
"id": GetIdDatasourceSchema(true),
"is_enhanced_mode": datasourceSchema.BoolAttribute{
Optional: true,
Computed: true,
},
"name": util.GetNameDatasourceSchema(true),
"name": GetReadonlyNameDatasourceSchema(),
"password": datasourceSchema.StringAttribute{
Description: "The password associated with this resource.",
Sensitive: true,
Optional: true,
Computed: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
},
},
"package_acquisition_location_options": datasourceSchema.ListAttribute{
Computed: true,
ElementType: types.StringType,
Optional: true,
},
"region": datasourceSchema.StringAttribute{
Computed: true,
},
"registry_path": datasourceSchema.StringAttribute{
Optional: true,
Computed: true,
},
"secret_key": datasourceSchema.StringAttribute{
Optional: true,
Computed: true,
Sensitive: true,
},
"space_id": util.GetSpaceIdDatasourceSchema("feeds"),
"space_id": GetSpaceIdDatasourceSchema("feeds", true),
"username": datasourceSchema.StringAttribute{
Description: "The username associated with this resource.",
Sensitive: true,
Optional: true,
Computed: true,
Validators: []validator.String{
stringvalidator.LengthAtLeast(1),
},
},
"delete_unreleased_packages_after_days": datasourceSchema.Int64Attribute{
Optional: true,
Computed: true,
},
"access_key": datasourceSchema.StringAttribute{
Required: true,
Computed: true,
Description: "The AWS access key to use when authenticating against Amazon Web Services.",
},
"api_version": datasourceSchema.StringAttribute{
Optional: true,
Computed: true,
},
"download_attempts": datasourceSchema.Int64Attribute{
Description: "The number of times a deployment should attempt to download a package from this feed before failing.",
Optional: true,
Computed: true,
},
"download_retry_backoff_seconds": datasourceSchema.Int64Attribute{
Description: "The number of seconds to apply as a linear back off between download attempts.",
Optional: true,
Computed: true,
},
}
Expand Down
Loading

0 comments on commit 2c6f1b6

Please sign in to comment.