// Code generated by generators/resource/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.AddResourceTypeFactory("awscc_autoscaling_warm_pool", warmPoolResourceType) } // warmPoolResourceType returns the Terraform awscc_autoscaling_warm_pool resource type. // This Terraform resource type corresponds to the CloudFormation AWS::AutoScaling::WarmPool resource type. func warmPoolResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "auto_scaling_group_name": { // Property: AutoScalingGroupName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "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, Optional: true, }, }, ), Optional: true, }, "max_group_prepared_capacity": { // Property: MaxGroupPreparedCapacity // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Optional: true, }, "min_size": { // Property: MinSize // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Optional: true, }, "pool_state": { // Property: PoolState // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource schema for AWS::AutoScaling::WarmPool.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::WarmPool").WithTerraformTypeName("awscc_autoscaling_warm_pool") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) 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", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }