// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package eventschemas 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_eventschemas_registry_policy", registryPolicyDataSourceType) } // registryPolicyDataSourceType returns the Terraform awscc_eventschemas_registry_policy data source type. // This Terraform data source type corresponds to the CloudFormation AWS::EventSchemas::RegistryPolicy resource type. func registryPolicyDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "policy": { // Property: Policy // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Computed: true, }, "registry_name": { // Property: RegistryName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "revision_id": { // Property: RevisionId // CloudFormation resource type schema: // { // "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::EventSchemas::RegistryPolicy", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::RegistryPolicy").WithTerraformTypeName("awscc_eventschemas_registry_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "id": "Id", "policy": "Policy", "registry_name": "RegistryName", "revision_id": "RevisionId", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }