terraform-provider-aws: [Bug]: UnknownOperationException for data.aws_identitystore_group.alternate_identifier.unique_attribute with aws v5.0.0

Terraform Core Version

Terraform v1.0.0

AWS Provider Version

hashicorp/aws v5.0.0

Affected Resource(s)

When Terraform plan runs this snippet of code:

data "aws_identitystore_group" "groups" {
  for_each          = local.groups
  identity_store_id = tolist(data.aws_ssoadmin_instances.selected.identity_store_ids)[0]

  alternate_identifier {
    unique_attribute {
      attribute_path  = "DisplayName"
      attribute_value = each.value.name
    }
  }
}

We get the error:

Error: reading AWS SSO Identity Store Group Data Source (d-99672224a9): operation error identitystore: GetGroupId, https response error StatusCode: 400, RequestID: ddf32597-f001-468e-98d7-56153002980b, api error UnknownOperationException: UnknownError

Expected Behavior

An identity group should be retrieved

Actual Behavior

Error: reading AWS SSO Identity Store Group Data Source (d-99672224a9): operation error identitystore: GetGroupId, https response error StatusCode: 400, RequestID: ddf32597-f001-468e-98d7-56153002980b, api error UnknownOperationException: UnknownError

Relevant Error/Panic Output Snippet

Error: reading AWS SSO Identity Store Group Data Source (d-99672224a9): operation error identitystore: GetGroupId, https response error StatusCode: 400, RequestID: ddf32597-f001-468e-98d7-56153002980b, api error UnknownOperationException: UnknownError
  with data.aws_identitystore_group.groups["756cd5d0b663f862cc02e6b2100be8ae"],
  on data.tf line 17, in data "aws_identitystore_group" "groups":
  17: data "aws_identitystore_group" "groups" {

Terraform Configuration Files

data "aws_identitystore_group" "groups" {
  for_each          = local.groups
  identity_store_id = tolist(data.aws_ssoadmin_instances.selected.identity_store_ids)[0]

  alternate_identifier {
    unique_attribute {
      attribute_path  = "DisplayName"
      attribute_value = each.value.name
    }
  }
}

Steps to Reproduce

Terraform plan the snippet above.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

#28139 #28937

Would you like to implement a fix?

None

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 66
  • Comments: 16 (3 by maintainers)

Most upvoted comments

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.

We’re in the same boat. We have to lock to pessimistically lock to 4.0 (~> 4.0) because only the deprecated filter works. The non-deprecated syntax (alternate_identifier { unique_attribute {} }) is not operational. At least the fix from #28937 let us unpin the provider from 4.37.