// 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_local_gateway_route", localGatewayRouteResourceType) } // localGatewayRouteResourceType returns the Terraform awscc_ec2_local_gateway_route resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EC2::LocalGatewayRoute resource type. func localGatewayRouteResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "destination_cidr_block": { // Property: DestinationCidrBlock // CloudFormation resource type schema: // { // "description": "The CIDR block used for destination matches.", // "type": "string" // } Description: "The CIDR block used for destination matches.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "local_gateway_route_table_id": { // Property: LocalGatewayRouteTableId // CloudFormation resource type schema: // { // "description": "The ID of the local gateway route table.", // "type": "string" // } Description: "The ID of the local gateway route table.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "local_gateway_virtual_interface_group_id": { // Property: LocalGatewayVirtualInterfaceGroupId // CloudFormation resource type schema: // { // "description": "The ID of the virtual interface group.", // "type": "string" // } Description: "The ID of the virtual interface group.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "state": { // Property: State // CloudFormation resource type schema: // { // "description": "The state of the route.", // "type": "string" // } Description: "The state of the route.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "The route type.", // "type": "string" // } Description: "The route type.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Describes a route for a local gateway route table.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::LocalGatewayRoute").WithTerraformTypeName("awscc_ec2_local_gateway_route") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destination_cidr_block": "DestinationCidrBlock", "local_gateway_route_table_id": "LocalGatewayRouteTableId", "local_gateway_virtual_interface_group_id": "LocalGatewayVirtualInterfaceGroupId", "state": "State", "type": "Type", }) opts = opts.IsImmutableType(true) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }