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

[Bug]: data "aws_workspaces_bundle" returns more than one result in 5.72.1 #39775

Closed
jreslock opened this issue Oct 17, 2024 · 3 comments · Fixed by #39777
Closed

[Bug]: data "aws_workspaces_bundle" returns more than one result in 5.72.1 #39775

jreslock opened this issue Oct 17, 2024 · 3 comments · Fixed by #39777
Assignees
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/workspaces Issues and PRs that pertain to the workspaces service.
Milestone

Comments

@jreslock
Copy link

Terraform Core Version

1.5.7

AWS Provider Version

5.72.1

Affected Resource(s)

data aws_workspaces_bundle {}

Expected Behavior

In 5.70.0 the following code returns one bundle ID.

data "aws_workspaces_bundle" "windows" {
  owner = "AMAZON"
  name  = "Performance with Windows 10 and Office 2019 Pro Plus (Server 2019 based)"
}

Actual Behavior

In 5.72.1 the following (exactly the same code) returns an error indicating that more than one bundle has been returned, suggesting that further specificity is required to return a single bundle ID.

data "aws_workspaces_bundle" "windows" {
  owner = "AMAZON"
  name  = "Performance with Windows 10 and Office 2019 Pro Plus (Server 2019 based)"
}

Relevant Error/Panic Output Snippet

│ Error: multiple WorkSpaces Bundles matched; use additional constraints to reduce matches to a single WorkSpaces Bundle
│ 
│   with module.aws_workspaces.data.aws_workspaces_bundle.windows,
│   on ../../modules/aws_workspace/main.tf line 114, in data "aws_workspaces_bundle" "windows":
│  114: data "aws_workspaces_bundle" "windows" {


### Terraform Configuration Files

data "aws_workspaces_bundle" "windows" {
owner = "AMAZON"
name = "Performance with Windows 10 and Office 2019 Pro Plus (Server 2019 based)"
}


### Steps to Reproduce

This is simple. Use the one data source and run a plan in any AWS account. Using provider version 5.70.0 it will successfully return a single bundle ID. Using provider version 5.72.1 it will return an error and the plan will fail.

The response body returned contains 3 bundle IDs but only one actually matches the `name` specified in the data source configuration. Response body has been extracted from the debug output, formatted and pasted below.

{
"Bundles": [
{
"BundleId": "wsb-b9jc2fhhl",
"BundleType": "REGULAR",
"ComputeType": {
"Name": "PERFORMANCE"
},
"CreationTime": 1.559084907265E9,
"Description": "Windows 10 Experience provided by Windows Server 2016 with WorkSpaces Streaming Protocol 2 vCPU 7.5GiB Memory 100GB Storage (English)",
"LastUpdatedTime": 1.559084907265E9,
"Name": "Performance with Windows 10 (Server 2016 based)",
"Owner": "Amazon",
"RootStorage": {
"Capacity": "80"
},
"State": "AVAILABLE",
"UserStorage": {
"Capacity": "100"
}
},
{
"BundleId": "wsb-6cbvhvv9f",
"BundleType": "REGULAR",
"ComputeType": {
"Name": "STANDARD"
},
"CreationTime": 1.626920530503E9,
"Description": "Windows 10 Experience powered by Windows Server 2019 with WorkSpaces Streaming Protocol 2 vCPU 4GiB Memory 50GB Storage (English)",
"LastUpdatedTime": 1.626920530503E9,
"Name": "Standard with Windows 10 (Server 2019 based)",
"Owner": "Amazon",
"RootStorage": {
"Capacity": "80"
},
"State": "AVAILABLE",
"UserStorage": {
"Capacity": "50"
}
},
{
"BundleId": "wsb-0zsvgp8fc",
"BundleType": "REGULAR",
"ComputeType": {
"Name": "VALUE"
},
"CreationTime": 1.559084907402E9,
"Description": "Windows 10 Experience provided by Windows Server 2016 with Office 2016 and WorkSpaces Streaming Protocol 1 vCPU 2GiB Memory 10GB Storage (English)",
"LastUpdatedTime": 1.559084907402E9,
"Name": "Value with Windows 10 and Office 2016 Pro Plus (Server 2016 based)",
"Owner": "Amazon",
"RootStorage": {
"Capacity": "80"
},
"State": "AVAILABLE",
"UserStorage": {
"Capacity": "10"
}
}
]
}


### Debug Output

`terraform plan -target data.aws_workspaces_bundle.windows`

2024-10-17T11:49:48.893-0400 [DEBUG] provider.terraform-provider-aws_v5.72.1_x5: HTTP Response Received: aws.region=us-east-1 http.response.body="{"Bundles":[{"BundleId":"wsb-b9jc2fhhl","BundleType":"REGULAR","ComputeType":{"Name":"PERFORMANCE"},"CreationTime":1.559084907265E9,"Description":"Windows 10 Experience provided by Windows Server 2016 with WorkSpaces Streaming Protocol 2 vCPU 7.5GiB Memory 100GB Storage (English)","LastUpdatedTime":1.559084907265E9,"Name":"Performance with Windows 10 (Server 2016 based)","Owner":"Amazon","RootStorage":{"Capacity":"80"},"State":"AVAILABLE","UserStorage":{"Capacity":"100"}},{"BundleId":"wsb-6cbvhvv9f","BundleType":"REGULAR","ComputeType":{"Name":"STANDARD"},"CreationTime":1.626920530503E9,"Description":"Windows 10 Experience powered by Windows Server 2019 with WorkSpaces Streaming Protocol 2 vCPU 4GiB Memory 50GB Storage (English)","LastUpdatedTime":1.626920530503E9,"Name":"Standard with Windows 10 (Server 2019 based)","Owner":"Amazon","RootStorage":{"Capacity":"80"},"State":"AVAILABLE","UserStorage":{"Capacity":"50"}},{"BundleId":"wsb-0zsvgp8fc","BundleType":"REGULAR","ComputeType":{"Name":"VALUE"},"CreationTime":1.559084907402E9,"Description":"Windows 10 Experience provided by Windows Server 2016 with Office 2016 and WorkSpaces Streaming Protocol 1 vCPU 2GiB Memory 10GB Storage (English)","LastUpdatedTime":1.559084907402E9,"Name":"Value with Windows 10 and Office 2016 Pro Plus (Server 2016 based)","Owner":"Amazon","RootStorage":{"Capacity":"80"},"State":"AVAILABLE","UserStorage":{"Capacity":"10"}}]}
" http.response.header.x_amzn_requestid=582e4e97-313d-420b-a9a9-0875fd96d76b http.response_content_length=1422 http.status_code=200 tf_aws.signing_region= tf_req_id=423b1ed0-6e6f-1c1d-12c1-1425be4f5c14 tf_rpc=ReadDataSource tf_aws.sdk=aws-sdk-go-v2 tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws @module=aws http.response.header.date="Thu, 17 Oct 2024 15:49:48 GMT" rpc.method=DescribeWorkspaceBundles rpc.system=aws-api @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.58/logging/tf_logger.go:45 http.duration=51 http.response.header.content_type=application/x-amz-json-1.1 rpc.service=WorkSpaces tf_data_source_type=aws_workspaces_bundle timestamp=2024-10-17T11:49:48.892-0400
2024-10-17T11:49:48.893-0400 [ERROR] provider.terraform-provider-aws_v5.72.1_x5: Response contains error diagnostic: diagnostic_summary="multiple WorkSpaces Bundles matched; use additional constraints to reduce matches to a single WorkSpaces Bundle" tf_data_source_type=aws_workspaces_bundle tf_proto_version=5.6 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ReadDataSource @caller=github.com/hashicorp/terraform-plugin-go@v0.24.0/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto diagnostic_detail= diagnostic_severity=ERROR tf_req_id=423b1ed0-6e6f-1c1d-12c1-1425be4f5c14 timestamp=2024-10-17T11:49:48.893-0400
2024-10-17T11:49:48.893-0400 [ERROR] vertex "data.aws_workspaces_bundle.windows" error: multiple WorkSpaces Bundles matched; use additional constraints to reduce matches to a single WorkSpaces Bundle
2024-10-17T11:49:48.893-0400 [ERROR] vertex "data.aws_workspaces_bundle.windows (expand)" error: multiple WorkSpaces Bundles matched; use additional constraints to reduce matches to a single WorkSpaces Bundle
2024-10-17T11:49:48.900-0400 [INFO] backend/local: plan operation completed


### Panic Output

_No response_

### Important Factoids

_No response_

### References

_No response_

### Would you like to implement a fix?

None
@jreslock jreslock added the bug Addresses a defect in current functionality. label Oct 17, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/workspaces Issues and PRs that pertain to the workspaces service. needs-triage Waiting for first response or review from a maintainer. labels Oct 17, 2024
@ewbankkit ewbankkit self-assigned this Oct 17, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 17, 2024
@ewbankkit ewbankkit added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 17, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 17, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.73.0 milestone Oct 17, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 24, 2024
Copy link

This functionality has been released in v5.73.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/workspaces Issues and PRs that pertain to the workspaces service.
Projects
None yet
2 participants