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]: aws_opensearchserverless_collection got AutoFlEx error #38138

Closed
takenakasuji-rhcapital opened this issue Jun 26, 2024 · 7 comments · Fixed by #38292
Closed

[Bug]: aws_opensearchserverless_collection got AutoFlEx error #38138

takenakasuji-rhcapital opened this issue Jun 26, 2024 · 7 comments · Fixed by #38292
Assignees
Labels
bug Addresses a defect in current functionality. flex Pertains to FLatteners and EXpanders. service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service.
Milestone

Comments

@takenakasuji-rhcapital
Copy link

Terraform Core Version

1.8.5

AWS Provider Version

5.55.0

Affected Resource(s)

aws_opensearchserverless_collection

Expected Behavior

OpenSearch correction is imported successfully.

Actual Behavior

Error occurring when running terraform plan.

Relevant Error/Panic Output Snippet

╷
│ Error: AutoFlEx
│ 
│ does not implement attr.Value: struct
╵
╷
│ Error: AutoFlEx
│ 
│ Flatten[*types.CollectionDetail, *opensearchserverless.resourceCollectionData]
╵

Terraform Configuration Files

import {
  to = module.open_search.aws_opensearchserverless_security_policy.encryption
  id = "example/encryption"
}

import {
  to = module.open_search.aws_opensearchserverless_collection.this
  id = "example"
}

resource "aws_opensearchserverless_security_policy" "encryption" {
  name        = "example"
  type        = "encryption"
  description = "example"
  policy = jsonencode({
    Rules = [
      {
        ResourceType = "collection"
        Resource = [
          "collection/example"
        ],
      }
    ],
    AWSOwnedKey = true
  })
}

resource "aws_opensearchserverless_collection" "this" {
  name       = "example"
  type       = "SEARCH"
  depends_on = [aws_opensearchserverless_security_policy.encryption]
}

Steps to Reproduce

A simple terraform plan.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@takenakasuji-rhcapital takenakasuji-rhcapital added the bug Addresses a defect in current functionality. label Jun 26, 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 the service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service. label Jun 26, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 26, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 26, 2024
@breathingdust breathingdust added the flex Pertains to FLatteners and EXpanders. label Jun 26, 2024
@GrayIbis
Copy link

GrayIbis commented Jun 27, 2024

Hello - I'm not sure if this is the same issue I had but I was getting same error with 5.55.0 so I went back to previous working version 5.31.0 and different error message was generated pointing me to resolution ( permission )

5.55.0:
│ Error: AutoFlEx

│   with aws_opensearchserverless_collection.documents,
│   on opensearch.tf line 22, in resource "aws_opensearchserverless_collection" "documents":
│   22: resource "aws_opensearchserverless_collection" "documents" {

│ does not implement attr.Value: struct


│ Error: AutoFlEx

│ with aws_opensearchserverless_collection.documents,
│ on opensearch.tf line 22, in resource "aws_opensearchserverless_collection" "documents":
│ 22: resource "aws_opensearchserverless_collection" "documents" {

│ Flatten[*types.CollectionDetail, *opensearchserverless.resourceCollectionData]

5.31.0:

   with aws_opensearchserverless_collection.documents,
│   on opensearch.tf line 22, in resource "aws_opensearchserverless_collection" "documents":
│   22: resource "aws_opensearchserverless_collection" "documents" {

│ operation error OpenSearchServerless: BatchGetCollection, https response error StatusCode: 400, RequestID: xxxxxxxxxx, api error AccessDeniedException: User:
│ arn:aws:sts::xxxxx:assumed-role/xxxxx/xxxxx is not authorized to perform: aoss:BatchGetCollection on resource:
│ arn:aws:aoss:xxxx:xxxxxx:collection/xxxxxx because no permissions boundary allows the aoss:BatchGetCollection action

@takenakasuji-rhcapital
Copy link
Author

@GrayIbis
Hello, Thank you for your information.
When I reverted the version to 5.31.0 and executed it, I was able to obtain detailed error information.

@takenakasuji-rhcapital
Copy link
Author

The issue with this error is that when using version 5.55.0, the detailed error returned from AWS is not being displayed.

@gdavison gdavison self-assigned this Jul 6, 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 Jul 6, 2024
Copy link

github-actions bot commented Jul 9, 2024

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.58.0 milestone Jul 9, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jul 12, 2024
Copy link

This functionality has been released in v5.58.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!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. flex Pertains to FLatteners and EXpanders. service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service.
Projects
None yet
5 participants