terraform-provider-aws icon indicating copy to clipboard operation
terraform-provider-aws copied to clipboard

B add filter to iot_thing_indexing_configuration

Open Oltier opened this issue 2 years ago • 3 comments

Change summary

Update the [Create|Get|Update]IndexingConfiguration requests with a new optional parameter: filter

Change details

AWS has introduced a breaking change, making filter attribute required, when named_shadow_indexing_mode is set to ON. https://docs.aws.amazon.com/iot/latest/apireference/API_ThingIndexingConfiguration.html https://awsapichanges.info/archive/changes/0a7be3-iot.html

If filter is missing in the described case above, then the following error message is returned when trying to add a similar configuration:

resource "aws_iot_indexing_configuration" "indexing-config" {
  thing_indexing_configuration {
    thing_indexing_mode              = "REGISTRY_AND_SHADOW"
    thing_connectivity_indexing_mode = "STATUS"
    named_shadow_indexing_mode       = "ON"

    custom_field {
      name = "shadow.name.shadowName.desired.someStringValue"
      type = "String"
    }
  }
}
Error: error updating IoT Indexing Configuration: InvalidRequestException: NamedShadowNames Filter must not be empty for enabling NamedShadowIndexingMode

Closes https://github.com/hashicorp/terraform-provider-aws/issues/27532

Output from acceptance testing:

AWS_PROFILE=default TF_ACC=1 go test ./internal/service/iot/... -v -count 1 -parallel 20 -run='TestAccIoTIndexingConfiguration_serial'  -timeout 180m
=== RUN   TestAccIoTIndexingConfiguration_serial
=== RUN   TestAccIoTIndexingConfiguration_serial/basic
=== RUN   TestAccIoTIndexingConfiguration_serial/allAttributes
--- PASS: TestAccIoTIndexingConfiguration_serial (51.15s)
    --- PASS: TestAccIoTIndexingConfiguration_serial/basic (27.02s)
    --- PASS: TestAccIoTIndexingConfiguration_serial/allAttributes (24.13s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/iot        52.884s

Oltier avatar Sep 19 '22 18:09 Oltier

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Please review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

github-actions[bot] avatar Sep 19 '22 18:09 github-actions[bot]

@HashiCoop any update on it? what's the ETA?

icsaba avatar Sep 28 '22 08:09 icsaba

The functionality is currently broken since aws introduced this change: https://awsapichanges.info/archive/changes/0a7be3-iot.html named_shadow_indexing_mode cannot be enabled without a filter.

tmarlok88 avatar Oct 11 '22 15:10 tmarlok88

Hey,

Can somebody review the PR and merge the changes? @breathingdust

Thanks in advance!

gergo-schreiner-goto avatar Dec 15 '22 09:12 gergo-schreiner-goto

Any news on when this can be merged?

BernhardRode avatar Aug 23 '23 09:08 BernhardRode

@Oltier Thanks for the contribution :tada: :clap:.

ewbankkit avatar Oct 26 '23 12:10 ewbankkit

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

github-actions[bot] avatar Oct 26 '23 23:10 github-actions[bot]

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Nov 27 '23 02:11 github-actions[bot]