// Code generated by generators/resource/main.go; DO NOT EDIT. package apprunner import ( "context" "regexp" "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" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_apprunner_vpc_connector", vpcConnectorResourceType) } // vpcConnectorResourceType returns the Terraform awscc_apprunner_vpc_connector resource type. // This Terraform resource type corresponds to the CloudFormation AWS::AppRunner::VpcConnector resource type. func vpcConnectorResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "security_groups": { // Property: SecurityGroups // CloudFormation resource type schema: // { // "description": "A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.", // "insertionOrder": false, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": true // } Description: "A list of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.", Type: types.SetType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "subnets": { // Property: Subnets // CloudFormation resource type schema: // { // "description": "A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.", // "insertionOrder": false, // "items": { // "type": "string" // }, // "minItems": 1, // "type": "array", // "uniqueItems": true // } Description: "A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.", Type: types.SetType{ElemType: types.StringType}, Required: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtLeast(1), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "A list of metadata items that you can associate with your VPC connector resource. A tag is a key-value pair.", // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array" // } Description: "A list of metadata items that you can associate with your VPC connector resource. A tag is a key-value pair.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Optional: true, }, "value": { // Property: Value Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, // Tags is a write-only property. }, "vpc_connector_arn": { // Property: VpcConnectorArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of this VPC connector.", // "maxLength": 1011, // "minLength": 44, // "pattern": "", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of this VPC connector.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "vpc_connector_name": { // Property: VpcConnectorName // CloudFormation resource type schema: // { // "description": "A name for the VPC connector. If you don't specify a name, AWS CloudFormation generates a name for your VPC connector.", // "maxLength": 40, // "minLength": 4, // "pattern": "^[A-Za-z0-9][A-Za-z0-9-\\\\_]{3,39}$", // "type": "string" // } Description: "A name for the VPC connector. If you don't specify a name, AWS CloudFormation generates a name for your VPC connector.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(4, 40), validate.StringMatch(regexp.MustCompile("^[A-Za-z0-9][A-Za-z0-9-\\\\_]{3,39}$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "vpc_connector_revision": { // Property: VpcConnectorRevision // CloudFormation resource type schema: // { // "description": "The revision of this VPC connector. It's unique among all the active connectors (\"Status\": \"ACTIVE\") that share the same Name.", // "type": "integer" // } Description: "The revision of this VPC connector. It's unique among all the active connectors (\"Status\": \"ACTIVE\") that share the same Name.", Type: types.Int64Type, 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: "The AWS::AppRunner::VpcConnector resource specifies an App Runner VpcConnector.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::AppRunner::VpcConnector").WithTerraformTypeName("awscc_apprunner_vpc_connector") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "security_groups": "SecurityGroups", "subnets": "Subnets", "tags": "Tags", "value": "Value", "vpc_connector_arn": "VpcConnectorArn", "vpc_connector_name": "VpcConnectorName", "vpc_connector_revision": "VpcConnectorRevision", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ "/properties/Tags", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }