// Code generated by generators/resource/main.go; DO NOT EDIT. package ec2 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_ec2_host", hostResourceType) } // hostResourceType returns the Terraform awscc_ec2_host resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EC2::Host resource type. func hostResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "auto_placement": { // Property: AutoPlacement // CloudFormation resource type schema: // { // "description": "Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.", // "type": "string" // } Description: "Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.", Type: types.StringType, Optional: true, }, "availability_zone": { // Property: AvailabilityZone // CloudFormation resource type schema: // { // "description": "The Availability Zone in which to allocate the Dedicated Host.", // "type": "string" // } Description: "The Availability Zone in which to allocate the Dedicated Host.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "host_id": { // Property: HostId // CloudFormation resource type schema: // { // "description": "Id of the host created.", // "type": "string" // } Description: "Id of the host created.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "host_recovery": { // Property: HostRecovery // CloudFormation resource type schema: // { // "description": "Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default.", // "type": "string" // } Description: "Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default.", Type: types.StringType, Optional: true, }, "instance_type": { // Property: InstanceType // CloudFormation resource type schema: // { // "description": "Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.", // "type": "string" // } Description: "Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::EC2::Host", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::Host").WithTerraformTypeName("awscc_ec2_host") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_placement": "AutoPlacement", "availability_zone": "AvailabilityZone", "host_id": "HostId", "host_recovery": "HostRecovery", "instance_type": "InstanceType", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }