// 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_subnet", subnetResourceType) } // subnetResourceType returns the Terraform awscc_ec2_subnet resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EC2::Subnet resource type. func subnetResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "assign_ipv_6_address_on_creation": { // Property: AssignIpv6AddressOnCreation // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "availability_zone": { // Property: AvailabilityZone // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "availability_zone_id": { // Property: AvailabilityZoneId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "cidr_block": { // Property: CidrBlock // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "enable_dns_64": { // Property: EnableDns64 // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "ipv_6_cidr_block": { // Property: Ipv6CidrBlock // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, "ipv_6_cidr_blocks": { // Property: Ipv6CidrBlocks // CloudFormation resource type schema: // { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } Type: types.ListType{ElemType: types.StringType}, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "ipv_6_native": { // Property: Ipv6Native // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "map_public_ip_on_launch": { // Property: MapPublicIpOnLaunch // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "network_acl_association_id": { // Property: NetworkAclAssociationId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "outpost_arn": { // Property: OutpostArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "private_dns_name_options_on_launch": { // Property: PrivateDnsNameOptionsOnLaunch // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "EnableResourceNameDnsAAAARecord": { // "type": "boolean" // }, // "EnableResourceNameDnsARecord": { // "type": "boolean" // }, // "HostnameType": { // "type": "string" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "enable_resource_name_dns_aaaa_record": { // Property: EnableResourceNameDnsAAAARecord Type: types.BoolType, Optional: true, }, "enable_resource_name_dns_a_record": { // Property: EnableResourceNameDnsARecord Type: types.BoolType, Optional: true, }, "hostname_type": { // Property: HostnameType Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "subnet_id": { // Property: SubnetId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, }, "value": { // Property: Value Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "vpc_id": { // Property: VpcId // CloudFormation resource type schema: // { // "type": "string" // } 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::Subnet", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::Subnet").WithTerraformTypeName("awscc_ec2_subnet") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "assign_ipv_6_address_on_creation": "AssignIpv6AddressOnCreation", "availability_zone": "AvailabilityZone", "availability_zone_id": "AvailabilityZoneId", "cidr_block": "CidrBlock", "enable_dns_64": "EnableDns64", "enable_resource_name_dns_a_record": "EnableResourceNameDnsARecord", "enable_resource_name_dns_aaaa_record": "EnableResourceNameDnsAAAARecord", "hostname_type": "HostnameType", "ipv_6_cidr_block": "Ipv6CidrBlock", "ipv_6_cidr_blocks": "Ipv6CidrBlocks", "ipv_6_native": "Ipv6Native", "key": "Key", "map_public_ip_on_launch": "MapPublicIpOnLaunch", "network_acl_association_id": "NetworkAclAssociationId", "outpost_arn": "OutpostArn", "private_dns_name_options_on_launch": "PrivateDnsNameOptionsOnLaunch", "subnet_id": "SubnetId", "tags": "Tags", "value": "Value", "vpc_id": "VpcId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }