// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package inspector 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_inspector_assessment_template", assessmentTemplateDataSourceType) } // assessmentTemplateDataSourceType returns the Terraform awscc_inspector_assessment_template data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Inspector::AssessmentTemplate resource type. func assessmentTemplateDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "assessment_target_arn": { // Property: AssessmentTargetArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "assessment_template_name": { // Property: AssessmentTemplateName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "duration_in_seconds": { // Property: DurationInSeconds // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Computed: true, }, "rules_package_arns": { // Property: RulesPackageArns // CloudFormation resource type schema: // { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "user_attributes_for_findings": { // Property: UserAttributesForFindings // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } 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, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::Inspector::AssessmentTemplate", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Inspector::AssessmentTemplate").WithTerraformTypeName("awscc_inspector_assessment_template") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "assessment_target_arn": "AssessmentTargetArn", "assessment_template_name": "AssessmentTemplateName", "duration_in_seconds": "DurationInSeconds", "key": "Key", "rules_package_arns": "RulesPackageArns", "user_attributes_for_findings": "UserAttributesForFindings", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }