// 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_logging", loggingDataSourceType) } // loggingDataSourceType returns the Terraform awscc_iot_logging data source type. // This Terraform data source type corresponds to the CloudFormation AWS::IoT::Logging resource type. func loggingDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "account_id": { // Property: AccountId // CloudFormation resource type schema: // { // "description": "Your 12-digit account ID (used as the primary identifier for the CloudFormation resource).", // "maxLength": 12, // "minLength": 12, // "pattern": "^[0-9]{12}$", // "type": "string" // } Description: "Your 12-digit account ID (used as the primary identifier for the CloudFormation resource).", Type: types.StringType, Computed: true, }, "default_log_level": { // Property: DefaultLogLevel // CloudFormation resource type schema: // { // "description": "The log level to use. Valid values are: ERROR, WARN, INFO, DEBUG, or DISABLED.", // "enum": [ // "ERROR", // "WARN", // "INFO", // "DEBUG", // "DISABLED" // ], // "type": "string" // } Description: "The log level to use. Valid values are: ERROR, WARN, INFO, DEBUG, or DISABLED.", Type: types.StringType, Computed: true, }, "role_arn": { // Property: RoleArn // CloudFormation resource type schema: // { // "description": "The ARN of the role that allows IoT to write to Cloudwatch logs.", // "maxLength": 2048, // "minLength": 20, // "type": "string" // } Description: "The ARN of the role that allows IoT to write to Cloudwatch logs.", 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::Logging", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::IoT::Logging").WithTerraformTypeName("awscc_iot_logging") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "default_log_level": "DefaultLogLevel", "role_arn": "RoleArn", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }