// 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_carrier_gateway", carrierGatewayDataSourceType) } // carrierGatewayDataSourceType returns the Terraform awscc_ec2_carrier_gateway data source type. // This Terraform data source type corresponds to the CloudFormation AWS::EC2::CarrierGateway resource type. func carrierGatewayDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "carrier_gateway_id": { // Property: CarrierGatewayId // CloudFormation resource type schema: // { // "description": "The ID of the carrier gateway.", // "type": "string" // } Description: "The ID of the carrier gateway.", Type: types.StringType, Computed: true, }, "owner_id": { // Property: OwnerId // CloudFormation resource type schema: // { // "description": "The ID of the owner.", // "type": "string" // } Description: "The ID of the owner.", Type: types.StringType, Computed: true, }, "state": { // Property: State // CloudFormation resource type schema: // { // "description": "The state of the carrier gateway.", // "type": "string" // } Description: "The state of the carrier gateway.", Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "The tags for the carrier gateway.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "maxLength": 127, // "minLength": 1, // "pattern": "", // "type": "string" // }, // "Value": { // "maxLength": 255, // "minLength": 1, // "pattern": "", // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Description: "The tags for the carrier gateway.", Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.SetNestedAttributesOptions{}, ), Computed: true, }, "vpc_id": { // Property: VpcId // CloudFormation resource type schema: // { // "description": "The ID of the VPC.", // "type": "string" // } Description: "The ID of the VPC.", 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::CarrierGateway", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EC2::CarrierGateway").WithTerraformTypeName("awscc_ec2_carrier_gateway") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "carrier_gateway_id": "CarrierGatewayId", "key": "Key", "owner_id": "OwnerId", "state": "State", "tags": "Tags", "value": "Value", "vpc_id": "VpcId", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }