// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package autoscaling 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_autoscaling_warm_pool", warmPoolDataSourceType) } // warmPoolDataSourceType returns the Terraform awscc_autoscaling_warm_pool data source type. // This Terraform data source type corresponds to the CloudFormation AWS::AutoScaling::WarmPool resource type. func warmPoolDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "auto_scaling_group_name": { // Property: AutoScalingGroupName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "instance_reuse_policy": { // Property: InstanceReusePolicy // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "ReuseOnScaleIn": { // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "reuse_on_scale_in": { // Property: ReuseOnScaleIn Type: types.BoolType, Computed: true, }, }, ), Computed: true, }, "max_group_prepared_capacity": { // Property: MaxGroupPreparedCapacity // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Computed: true, }, "min_size": { // Property: MinSize // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Computed: true, }, "pool_state": { // Property: PoolState // 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::AutoScaling::WarmPool", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::WarmPool").WithTerraformTypeName("awscc_autoscaling_warm_pool") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_name": "AutoScalingGroupName", "instance_reuse_policy": "InstanceReusePolicy", "max_group_prepared_capacity": "MaxGroupPreparedCapacity", "min_size": "MinSize", "pool_state": "PoolState", "reuse_on_scale_in": "ReuseOnScaleIn", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }