Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 7217313

Browse files
authored
fix: fix datasource result blocks (#763)
1 parent 6b47b61 commit 7217313

20 files changed

+90
-74
lines changed

docs/data-sources/environments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ data "octopusdeploy_environments" "example" {
3636

3737
### Read-Only
3838

39-
- `environments` (Block List) Provides information about existing environments. (see [below for nested schema](#nestedblock--environments))
39+
- `environments` (Attributes List) (see [below for nested schema](#nestedatt--environments))
4040
- `id` (String) The unique ID for this resource.
4141

42-
<a id="nestedblock--environments"></a>
42+
<a id="nestedatt--environments"></a>
4343
### Nested Schema for `environments`
4444

4545
Read-Only:

docs/data-sources/feeds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ data "octopusdeploy_feeds" "example" {
3636

3737
### Read-Only
3838

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

42-
<a id="nestedblock--feeds"></a>
42+
<a id="nestedatt--feeds"></a>
4343
### Nested Schema for `feeds`
4444

4545
Read-Only:

docs/data-sources/library_variable_sets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Provides information about existing library variable sets.
2727
### Read-Only
2828

2929
- `id` (String) The unique ID for this resource.
30-
- `library_variable_sets` (Block List) A list of library variable sets that match the filter(s). (see [below for nested schema](#nestedblock--library_variable_sets))
30+
- `library_variable_sets` (Attributes List) (see [below for nested schema](#nestedatt--library_variable_sets))
3131

32-
<a id="nestedblock--library_variable_sets"></a>
32+
<a id="nestedatt--library_variable_sets"></a>
3333
### Nested Schema for `library_variable_sets`
3434

3535
Read-Only:

docs/data-sources/project_groups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ data "octopusdeploy_project_groups" "example" {
3535
### Read-Only
3636

3737
- `id` (String) The unique ID for this resource.
38-
- `project_groups` (Block List) A list of project groups that match the filter(s). (see [below for nested schema](#nestedblock--project_groups))
38+
- `project_groups` (Attributes List) A list of project groups that match the filter(s). (see [below for nested schema](#nestedatt--project_groups))
3939

40-
<a id="nestedblock--project_groups"></a>
40+
<a id="nestedatt--project_groups"></a>
4141
### Nested Schema for `project_groups`
4242

4343
Read-Only:

docs/data-sources/spaces.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ data "octopusdeploy_spaces" "spaces" {
3434
### Read-Only
3535

3636
- `id` (String) The unique ID for this resource.
37-
- `spaces` (Block List) Provides information about existing spaces. (see [below for nested schema](#nestedblock--spaces))
37+
- `spaces` (Attributes List) (see [below for nested schema](#nestedatt--spaces))
3838

39-
<a id="nestedblock--spaces"></a>
39+
<a id="nestedatt--spaces"></a>
4040
### Nested Schema for `spaces`
4141

4242
Read-Only:

docs/data-sources/tag_sets.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ Provides information about existing tag sets.
2626
### Read-Only
2727

2828
- `id` (String) The ID of this resource.
29-
- `tag_sets` (List of Object) A list of tag sets that match the filter(s). (see [below for nested schema](#nestedatt--tag_sets))
29+
- `tag_sets` (Attributes List) A list of tag sets that match the filter(s). (see [below for nested schema](#nestedatt--tag_sets))
3030

3131
<a id="nestedatt--tag_sets"></a>
3232
### Nested Schema for `tag_sets`
3333

3434
Read-Only:
3535

36-
- `description` (String)
37-
- `id` (String)
38-
- `name` (String)
39-
- `sort_order` (Number)
40-
- `space_id` (String)
36+
- `description` (String) The description of this tag set.
37+
- `id` (String) The unique ID for this resource.
38+
- `name` (String) The name of this resource.
39+
- `sort_order` (Number) The sort order associated with this resource.
40+
- `space_id` (String) The space ID associated with this resource.
4141

4242

docs/data-sources/tenant_projects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Provides information about existing tenants.
2424

2525
### Read-Only
2626

27-
- `tenant_projects` (Block List) A list of related tenants, projects and environments that match the filter(s). (see [below for nested schema](#nestedblock--tenant_projects))
27+
- `tenant_projects` (Attributes List) A list of related tenants, projects and environments that match the filter(s). (see [below for nested schema](#nestedatt--tenant_projects))
2828

29-
<a id="nestedblock--tenant_projects"></a>
29+
<a id="nestedatt--tenant_projects"></a>
3030
### Nested Schema for `tenant_projects`
3131

3232
Read-Only:

docs/data-sources/variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ data "octopusdeploy_variables" "example" {
2424

2525
- `name` (String) The name of variable to find.
2626
- `owner_id` (String) Owner ID for the variable to find.
27+
- `scope` (Attributes List) As variable names can appear more than once under different scopes, a VariableScope must also be provided (see [below for nested schema](#nestedatt--scope))
2728

2829
### Optional
2930

30-
- `scope` (Block List) As variable names can appear more than once under different scopes, a VariableScope must also be provided (see [below for nested schema](#nestedblock--scope))
3131
- `space_id` (String) A Space ID to filter by. Will revert what is specified on the provider if not set.
3232

3333
### Read-Only
@@ -41,7 +41,7 @@ data "octopusdeploy_variables" "example" {
4141
- `type` (String) The type of variable represented by this resource. Valid types are `AmazonWebServicesAccount`, `AzureAccount`, `GoogleCloudAccount`, `UsernamePasswordAccount`, `Certificate`, `Sensitive`, `String`, `WorkerPool`.
4242
- `value` (String)
4343

44-
<a id="nestedblock--scope"></a>
44+
<a id="nestedatt--scope"></a>
4545
### Nested Schema for `scope`
4646

4747
Optional:

octopusdeploy_framework/datasource_environments.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ func (*environmentDataSource) Schema(_ context.Context, req datasource.SchemaReq
5252

5353
//response
5454
"id": schemas.GetIdDatasourceSchema(true),
55-
},
56-
Blocks: map[string]schema.Block{
57-
"environments": schema.ListNestedBlock{
58-
Description: "Provides information about existing environments.",
59-
NestedObject: schema.NestedBlockObject{
55+
"environments": schema.ListNestedAttribute{
56+
Computed: true,
57+
Optional: false,
58+
NestedObject: schema.NestedAttributeObject{
6059
Attributes: schemas.GetEnvironmentDatasourceSchema(),
6160
},
6261
},

octopusdeploy_framework/datasource_feeds.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ func (*feedsDataSource) Schema(_ context.Context, req datasource.SchemaRequest,
3232
resp.Schema = datasourceSchema.Schema{
3333
Description: "Provides information about existing feeds.",
3434
Attributes: schemas.GetFeedsDataSourceSchema(),
35-
Blocks: map[string]datasourceSchema.Block{
36-
"feeds": datasourceSchema.ListNestedBlock{
37-
NestedObject: datasourceSchema.NestedBlockObject{
38-
Attributes: schemas.GetFeedDataSourceSchema(),
39-
},
40-
},
41-
},
4235
}
4336
}
4437

0 commit comments

Comments
 (0)