hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.12k forks source link

[Enhancement]: Support geo location filter for resource `aws_iot_indexing_configuration` #39550

Open IskanderNovena opened 2 hours ago

IskanderNovena commented 2 hours ago

Description

When running aws iot get-indexing-configuration, it shows support for filtering geo locations, which is also available in the AWS Console. The Terraform resource aws_iot_indexing_configuration does not support it.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_iot_indexing_configuration" "example" {
  thing_indexing_configuration {
    thing_indexing_mode              = "REGISTRY_AND_SHADOW"
    thing_connectivity_indexing_mode = "STATUS"
    device_defender_indexing_mode    = "VIOLATIONS"
    named_shadow_indexing_mode       = "ON"

    filter {
      named_shadow_names = ["thing1shadow"]
      geo_locations      = [
        {
      "name": "shadow.name.thing1shadow.reported.coordinates",
          "order": "LonLat"
        }
      ]
    }

    custom_field {
      name = "shadow.desired.power"
      type = "Boolean"
    }
    custom_field {
      name = "attributes.version"
      type = "Number"
    }
    custom_field {
      name = "shadow.name.thing1shadow.desired.DefaultDesired"
      type = "String"
    }
    custom_field {
      name = "deviceDefender.securityProfile1.NUMBER_VALUE_BEHAVIOR.lastViolationValue.number"
      type = "Number"
    }
  }
}

References

https://docs.aws.amazon.com/iot/latest/developerguide/location-indexing-geoquery.html#location-indexing-configuration

Would you like to implement a fix?

None

github-actions[bot] commented 2 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue