// Code generated by generators/resource/main.go; DO NOT EDIT. package networkfirewall 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_networkfirewall_firewall", firewallResourceType) } // firewallResourceType returns the Terraform awscc_networkfirewall_firewall resource type. // This Terraform resource type corresponds to the CloudFormation AWS::NetworkFirewall::Firewall resource type. func firewallResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "delete_protection": { // Property: DeleteProtection // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "maxLength": 512, // "pattern": "^.*$", // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(512), validate.StringMatch(regexp.MustCompile("^.*$"), ""), }, }, "endpoint_ids": { // Property: EndpointIds // CloudFormation resource type schema: // { // "items": { // "description": "An endpoint Id.", // "type": "string" // }, // "type": "array" // } Type: types.ListType{ElemType: types.StringType}, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "firewall_arn": { // Property: FirewallArn // CloudFormation resource type schema: // { // "description": "A resource ARN.", // "maxLength": 256, // "minLength": 1, // "pattern": "^arn:aws.*$", // "type": "string" // } Description: "A resource ARN.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "firewall_id": { // Property: FirewallId // CloudFormation resource type schema: // { // "maxLength": 36, // "minLength": 36, // "pattern": "^([0-9a-f]{8})-([0-9a-f]{4}-){3}([0-9a-f]{12})$", // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "firewall_name": { // Property: FirewallName // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "^[a-zA-Z0-9-]+$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9-]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "firewall_policy_arn": { // Property: FirewallPolicyArn // CloudFormation resource type schema: // { // "description": "A resource ARN.", // "maxLength": 256, // "minLength": 1, // "pattern": "^arn:aws.*$", // "type": "string" // } Description: "A resource ARN.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), validate.StringMatch(regexp.MustCompile("^arn:aws.*$"), ""), }, }, "firewall_policy_change_protection": { // Property: FirewallPolicyChangeProtection // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "subnet_change_protection": { // Property: SubnetChangeProtection // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "subnet_mappings": { // Property: SubnetMappings // CloudFormation resource type schema: // { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "SubnetId": { // "description": "A SubnetId.", // "type": "string" // } // }, // "required": [ // "SubnetId" // ], // "type": "object" // }, // "minItems": 1, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "subnet_id": { // Property: SubnetId Description: "A SubnetId.", Type: types.StringType, Required: true, }, }, tfsdk.SetNestedAttributesOptions{}, ), Required: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtLeast(1), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "type": "string" // }, // "Value": { // "maxLength": 255, // "minLength": 0, // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, }, "value": { // Property: Value Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 255), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, }, "vpc_id": { // Property: VpcId // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "^vpc-[0-9a-f]+$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("^vpc-[0-9a-f]+$"), ""), }, 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::NetworkFirewall::Firewall", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::Firewall").WithTerraformTypeName("awscc_networkfirewall_firewall") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "delete_protection": "DeleteProtection", "description": "Description", "endpoint_ids": "EndpointIds", "firewall_arn": "FirewallArn", "firewall_id": "FirewallId", "firewall_name": "FirewallName", "firewall_policy_arn": "FirewallPolicyArn", "firewall_policy_change_protection": "FirewallPolicyChangeProtection", "key": "Key", "subnet_change_protection": "SubnetChangeProtection", "subnet_id": "SubnetId", "subnet_mappings": "SubnetMappings", "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 }