// 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", userDataSourceType) } // userDataSourceType returns the Terraform awscc_elasticache_user data source type. // This Terraform data source type corresponds to the CloudFormation AWS::ElastiCache::User resource type. func userDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "access_string": { // Property: AccessString // CloudFormation resource type schema: // { // "description": "Access permissions string used for this user account.", // "type": "string" // } Description: "Access permissions string used for this user account.", Type: types.StringType, Computed: true, }, "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, }, "no_password_required": { // Property: NoPasswordRequired // CloudFormation resource type schema: // { // "description": "Indicates a password is not required for this user account.", // "type": "boolean" // } Description: "Indicates a password is not required for this user account.", Type: types.BoolType, Computed: true, }, "passwords": { // Property: Passwords // CloudFormation resource type schema: // { // "$comment": "List of passwords.", // "description": "Passwords used for this user account. You can create up to two passwords for each user.", // "insertionOrder": true, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // } Description: "Passwords used for this user account. You can create up to two passwords for each user.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "status": { // Property: Status // CloudFormation resource type schema: // { // "description": "Indicates the user status. Can be \"active\", \"modifying\" or \"deleting\".", // "type": "string" // } Description: "Indicates the user status. Can be \"active\", \"modifying\" or \"deleting\".", Type: types.StringType, Computed: true, }, "user_id": { // Property: UserId // CloudFormation resource type schema: // { // "description": "The ID of the user.", // "pattern": "[a-z][a-z0-9\\\\-]*", // "type": "string" // } Description: "The ID of the user.", Type: types.StringType, Computed: true, }, "user_name": { // Property: UserName // CloudFormation resource type schema: // { // "description": "The username of the user.", // "type": "string" // } Description: "The username of the user.", 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::ElastiCache::User", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::User").WithTerraformTypeName("awscc_elasticache_user") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "access_string": "AccessString", "arn": "Arn", "engine": "Engine", "no_password_required": "NoPasswordRequired", "passwords": "Passwords", "status": "Status", "user_id": "UserId", "user_name": "UserName", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }