// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package elasticache 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_elasticache_user_group", userGroupDataSourceType) } // userGroupDataSourceType returns the Terraform awscc_elasticache_user_group data source type. // This Terraform data source type corresponds to the CloudFormation AWS::ElastiCache::UserGroup resource type. func userGroupDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the user account.", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the user account.", Type: types.StringType, Computed: true, }, "engine": { // Property: Engine // CloudFormation resource type schema: // { // "description": "Must be redis.", // "enum": [ // "redis" // ], // "type": "string" // } Description: "Must be redis.", Type: types.StringType, Computed: true, }, "status": { // Property: Status // CloudFormation resource type schema: // { // "description": "Indicates user group status. Can be \"creating\", \"active\", \"modifying\", \"deleting\".", // "type": "string" // } Description: "Indicates user group status. Can be \"creating\", \"active\", \"modifying\", \"deleting\".", Type: types.StringType, Computed: true, }, "user_group_id": { // Property: UserGroupId // CloudFormation resource type schema: // { // "description": "The ID of the user group.", // "pattern": "[a-z][a-z0-9\\\\-]*", // "type": "string" // } Description: "The ID of the user group.", Type: types.StringType, Computed: true, }, "user_ids": { // Property: UserIds // CloudFormation resource type schema: // { // "$comment": "List of users.", // "description": "List of users associated to this user group.", // "insertionOrder": true, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // } Description: "List of users associated to this user group.", Type: types.ListType{ElemType: 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::ElastiCache::UserGroup", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::UserGroup").WithTerraformTypeName("awscc_elasticache_user_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "engine": "Engine", "status": "Status", "user_group_id": "UserGroupId", "user_ids": "UserIds", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }