Terraform module for creating and managing AWS IoT Core resources
Name | Version |
---|---|
terraform | >= 1.6 |
aws | >= 6.0 |
Name | Version |
---|---|
aws | >= 6.0 |
No modules.
Name | Type |
---|---|
aws_dynamodb_table.iot_data | resource |
aws_iot_certificate.this | resource |
aws_iot_policy.this | resource |
aws_iot_policy_attachment.existing_policy_attachments | resource |
aws_iot_policy_attachment.inline_policy_attachments | resource |
aws_iot_thing.this | resource |
aws_iot_thing_group.this | resource |
aws_iot_thing_group_membership.this | resource |
aws_iot_thing_principal_attachment.attachments | resource |
aws_iot_thing_type.this | resource |
aws_iot_topic_rule.this | resource |
aws_s3_bucket.iot_data | resource |
aws_s3_bucket.iot_data_force_destroy | resource |
aws_s3_bucket_lifecycle_configuration.iot_data | resource |
aws_s3_bucket_lifecycle_configuration.iot_data_force_destroy | resource |
aws_s3_bucket_versioning.iot_data | resource |
aws_s3_bucket_versioning.iot_data_force_destroy | resource |
aws_caller_identity.current | data source |
aws_iot_endpoint.current | data source |
aws_region.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
create_certificates | Whether to create IoT certificates | bool |
true |
no |
create_dynamodb_table | Whether to create a DynamoDB table for IoT data | bool |
false |
no |
create_s3_bucket | Whether to create an S3 bucket for IoT data | bool |
false |
no |
dynamodb_attributes | DynamoDB table attributes | list(object({ |
[ |
no |
dynamodb_hash_key | DynamoDB table hash key | string |
"deviceId" |
no |
dynamodb_range_key | DynamoDB table range key | string |
"timestamp" |
no |
dynamodb_table_name | Name of the DynamoDB table for IoT data | string |
null |
no |
dynamodb_ttl_attribute | DynamoDB TTL attribute name | string |
"ttl" |
no |
dynamodb_ttl_enabled | Whether to enable DynamoDB TTL | bool |
true |
no |
name_prefix | Prefix for resource names | string |
"iot" |
no |
policy_arn | Existing IoT policy ARN (mutually exclusive with policy_json) | string |
null |
no |
policy_json | Inline IoT policy JSON (mutually exclusive with policy_arn) | string |
null |
no |
policy_name | Name for the inline IoT policy (required if policy_json is provided) | string |
null |
no |
rules | Map of IoT topic rules to create | map(object({ |
{} |
no |
s3_bucket_name | Name of the S3 bucket for IoT data | string |
null |
no |
s3_data_retention_days | Number of days to retain data in S3 | number |
30 |
no |
s3_force_destroy | Whether to force destroy the S3 bucket (allows non-empty bucket deletion) | bool |
false |
no |
tags | A map of tags to assign to the resources | map(string) |
{} |
no |
thing_attributes | Map of attributes for IoT things | map(string) |
{} |
no |
thing_group_memberships | Map of thing group memberships | map(object({ |
{} |
no |
thing_groups | Map of IoT thing groups to create | map(object({ |
{} |
no |
thing_names | List of IoT thing names to create | list(string) |
[] |
no |
thing_type_name | IoT thing type name (optional) | string |
null |
no |
thing_types | Map of IoT thing types to create | map(object({ |
{} |
no |
Name | Description |
---|---|
account_id | AWS account ID |
certificate_arns | List of IoT certificate ARNs |
certificate_pems | List of IoT certificate PEMs (sensitive) |
certificate_private_keys | List of IoT certificate private keys (sensitive) |
certificate_public_keys | List of IoT certificate public keys (sensitive) |
dynamodb_table_arn | DynamoDB table ARN for IoT data |
dynamodb_table_name | DynamoDB table name for IoT data |
endpoint | IoT endpoint |
policy_arn | IoT policy ARN (inline policy or provided ARN) |
policy_name | IoT policy name |
region | AWS region |
rule_arns | Map of IoT topic rule ARNs |
rule_names | Map of IoT topic rule names |
s3_bucket_arn | S3 bucket ARN for IoT data |
s3_bucket_name | S3 bucket name for IoT data |
thing_arns | List of IoT thing ARNs |
thing_group_arns | Map of IoT thing group ARNs |
thing_group_names | Map of IoT thing group names |
thing_names | List of IoT thing names |
thing_type_arns | Map of IoT thing type ARNs |
thing_type_names | Map of IoT thing type names |