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)
aws_iot_fleet_metric resource
aws_iot_fleet_metric data source
aws_iot_fleet_metrics data source
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" {}
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.
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)
aws_iot_fleet_metric
resourceaws_iot_fleet_metric
data sourceaws_iot_fleet_metrics
data sourcePotential Terraform Configuration
References
https://docs.aws.amazon.com/iot/latest/apireference/API_CreateFleetMetric.html
https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeFleetMetric.html
https://docs.aws.amazon.com/iot/latest/apireference/API_UpdateFleetMetric.html
https://docs.aws.amazon.com/iot/latest/apireference/API_DeleteFleetMetric.html
https://docs.aws.amazon.com/iot/latest/apireference/API_ListFleetMetrics.html
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/resources/iot_fleet_metric
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/data-sources/iot_fleet_metric
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs/data-sources/iot_fleet_metrics
Would you like to implement a fix?
No