// 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_topic_rule_destination", topicRuleDestinationDataSourceType) } // topicRuleDestinationDataSourceType returns the Terraform awscc_iot_topic_rule_destination data source type. // This Terraform data source type corresponds to the CloudFormation AWS::IoT::TopicRuleDestination resource type. func topicRuleDestinationDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "Amazon Resource Name (ARN).", // "type": "string" // } Description: "Amazon Resource Name (ARN).", Type: types.StringType, Computed: true, }, "http_url_properties": { // Property: HttpUrlProperties // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "HTTP URL destination properties.", // "properties": { // "ConfirmationUrl": { // "type": "string" // } // }, // "type": "object" // } Description: "HTTP URL destination properties.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "confirmation_url": { // Property: ConfirmationUrl Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "status": { // Property: Status // CloudFormation resource type schema: // { // "description": "The status of the TopicRuleDestination.", // "enum": [ // "ENABLED", // "IN_PROGRESS", // "DISABLED" // ], // "type": "string" // } Description: "The status of the TopicRuleDestination.", Type: types.StringType, Computed: true, }, "status_reason": { // Property: StatusReason // CloudFormation resource type schema: // { // "description": "The reasoning for the current status of the TopicRuleDestination.", // "type": "string" // } Description: "The reasoning for the current status of the TopicRuleDestination.", Type: types.StringType, Computed: true, }, "vpc_properties": { // Property: VpcProperties // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "VPC destination properties.", // "properties": { // "RoleArn": { // "type": "string" // }, // "SecurityGroups": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // }, // "SubnetIds": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // }, // "VpcId": { // "type": "string" // } // }, // "type": "object" // } Description: "VPC destination properties.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "role_arn": { // Property: RoleArn Type: types.StringType, Computed: true, }, "security_groups": { // Property: SecurityGroups Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "subnet_ids": { // Property: SubnetIds Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "vpc_id": { // Property: VpcId Type: types.StringType, Computed: true, }, }, ), 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::TopicRuleDestination", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::IoT::TopicRuleDestination").WithTerraformTypeName("awscc_iot_topic_rule_destination") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "confirmation_url": "ConfirmationUrl", "http_url_properties": "HttpUrlProperties", "role_arn": "RoleArn", "security_groups": "SecurityGroups", "status": "Status", "status_reason": "StatusReason", "subnet_ids": "SubnetIds", "vpc_id": "VpcId", "vpc_properties": "VpcProperties", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }