// Code generated by generators/singular-data-source/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.AddDataSourceTypeFactory("awscc_ec2_transit_gateway_connect", transitGatewayConnectDataSourceType) } // transitGatewayConnectDataSourceType returns the Terraform awscc_ec2_transit_gateway_connect data source type. // This Terraform data source type corresponds to the CloudFormation AWS::EC2::TransitGatewayConnect resource type. func transitGatewayConnectDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "creation_time": { // Property: CreationTime // CloudFormation resource type schema: // { // "description": "The creation time.", // "type": "string" // } Description: "The creation time.", Type: types.StringType, Computed: true, }, "options": { // Property: Options // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "The Connect attachment options.", // "properties": { // "Protocol": { // "description": "The tunnel protocol.", // "type": "string" // } // }, // "type": "object" // } Description: "The Connect attachment options.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "protocol": { // Property: Protocol Description: "The tunnel protocol.", Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "state": { // Property: State // CloudFormation resource type schema: // { // "description": "The state of the attachment.", // "type": "string" // } Description: "The state of the attachment.", Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "The tags for the attachment.", // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "description": "The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.", // "type": "string" // }, // "Value": { // "description": "The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.", // "type": "string" // } // }, // "type": "object" // }, // "type": "array" // } Description: "The tags for the attachment.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key of the tag. Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.", Type: types.StringType, Computed: true, }, "value": { // Property: Value Description: "The value of the tag. Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.", Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "transit_gateway_attachment_id": { // Property: TransitGatewayAttachmentId // CloudFormation resource type schema: // { // "description": "The ID of the Connect attachment.", // "type": "string" // } Description: "The ID of the Connect attachment.", Type: types.StringType, Computed: true, }, "transit_gateway_id": { // Property: TransitGatewayId // CloudFormation resource type schema: // { // "description": "The ID of the transit gateway.", // "type": "string" // } Description: "The ID of the transit gateway.", Type: types.StringType, Computed: true, }, "transport_transit_gateway_attachment_id": { // Property: TransportTransitGatewayAttachmentId // CloudFormation resource type schema: // { // "description": "The ID of the attachment from which the Connect attachment was created.", // "type": "string" // } Description: "The ID of the attachment from which the Connect attachment was created.", 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::EC2::TransitGatewayConnect", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayConnect").WithTerraformTypeName("awscc_ec2_transit_gateway_connect") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "key": "Key", "options": "Options", "protocol": "Protocol", "state": "State", "tags": "Tags", "transit_gateway_attachment_id": "TransitGatewayAttachmentId", "transit_gateway_id": "TransitGatewayId", "transport_transit_gateway_attachment_id": "TransportTransitGatewayAttachmentId", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }