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.81k stars 9.16k forks source link

[New Resource]: IoT Fleet Metric #30696

Open PeterBurner opened 1 year ago

PeterBurner commented 1 year ago

Description

Currently there is no way to create/lookup AWS IoT fleet metrics with the AWS Terraform provider. This functionality is supported both by the AWS CLI and the awscc provider technical preview.

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

Potential Terraform Configuration

resource "aws_iot_fleet_metric" "thing_count" {
  metric_name       = "ThingCount"
  aggregation_field = "thingId"
  aggregation_type = {
    name   = "Statistics"
    values = ["count"]
  }
  description   = "Number of existing Things"
  index_name    = "AWS_Things"
  period        = 86400 // 1 day
  query_string  = "*"
  query_version = "1"
  tags = {
    Name    = "ThingCount"
    Service = "IoT Core"
  }
  unit = "Count"
}

data "aws_iot_fleet_metric" "thing_count" {
  metric_name = "ThingCount"
}

data "aws_iot_fleet_metrics" "all_metrics" {}

References

Would you like to implement a fix?

No

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue