AWS IoT Thing Type
This page shows how to write Terraform and CloudFormation for AWS IoT Thing Type and write them securely.
aws_iot_thing_type (Terraform)
The Thing Type in AWS IoT can be configured in Terraform with the resource name aws_iot_thing_type
. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_iot_thing_type" "subscriber" {
name = "TF_Subscriber"
properties {
description = "A subscriber thing - receives message from AWS MQTT broker"
}
resource "aws_iot_thing_type" "thingtype" {
name = var.thing_type
}
resource "aws_iot_policy" "iot_policy" {
name = var.iot_policy
resource "aws_iot_thing_type" "infodisplay" {
name = "InfoDisplay"
}
resource "aws_iot_thing_type" "customer_thing_type" {
for_each = toset(distinct(data.template_file.thing_type_list.*.rendered))
name = each.value
}
Parameters
-
arn
optional computed - string -
deprecated
optional - bool -
id
optional computed - string -
name
required - string -
properties
list block-
description
optional - string -
searchable_attributes
optional computed - set of string
-
Explanation in Terraform Registry
Creates and manages an AWS IoT Thing Type.
AWS::IoT::Thing AttributePayload (CloudFormation)
The Thing AttributePayload in IoT can be configured in CloudFormation with the resource name AWS::IoT::Thing AttributePayload
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
Attributes
A JSON string containing up to three key-value pair in JSON format. For example:
{\"attributes\":{\"string1\":\"string2\"}}
Required: No
Type: Map of String
Update requires: No interruption
Explanation in CloudFormation Registry
The AttributePayload property specifies up to three attributes for an AWS IoT as key-value pairs. AttributePayload is a property of the AWS::IoT::Thing resource.
Frequently asked questions
What is AWS IoT Thing Type?
AWS IoT Thing Type is a resource for IoT of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS IoT Thing Type?
For Terraform, the moraesjeremias/terraform-aws-iot-core, Angelszm/terraform-aws-iot and magfest/mindbeamer source code examples are useful. See the Terraform Example section for further details.