// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package iot import ( "context" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" ) func init() { registry.AddDataSourceTypeFactory("awscc_iot_provisioning_template", provisioningTemplateDataSourceType) } // provisioningTemplateDataSourceType returns the Terraform awscc_iot_provisioning_template data source type. // This Terraform data source type corresponds to the CloudFormation AWS::IoT::ProvisioningTemplate resource type. func provisioningTemplateDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "description": { // Property: Description // CloudFormation resource type schema: // { // "maxLength": 500, // "type": "string" // } Type: types.StringType, Computed: true, }, "enabled": { // Property: Enabled // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, }, "pre_provisioning_hook": { // Property: PreProvisioningHook // CloudFormation resource type schema: // { // "properties": { // "PayloadVersion": { // "type": "string" // }, // "TargetArn": { // "type": "string" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "payload_version": { // Property: PayloadVersion Type: types.StringType, Computed: true, }, "target_arn": { // Property: TargetArn Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "provisioning_role_arn": { // Property: ProvisioningRoleArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array" // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "template_arn": { // Property: TemplateArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "template_body": { // Property: TemplateBody // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "template_name": { // Property: TemplateName // CloudFormation resource type schema: // { // "maxLength": 36, // "minLength": 1, // "pattern": "^[0-9A-Za-z_-]+$", // "type": "string" // } Type: types.StringType, Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::IoT::ProvisioningTemplate", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::IoT::ProvisioningTemplate").WithTerraformTypeName("awscc_iot_provisioning_template") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "enabled": "Enabled", "key": "Key", "payload_version": "PayloadVersion", "pre_provisioning_hook": "PreProvisioningHook", "provisioning_role_arn": "ProvisioningRoleArn", "tags": "Tags", "target_arn": "TargetArn", "template_arn": "TemplateArn", "template_body": "TemplateBody", "template_name": "TemplateName", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }