// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package networkfirewall 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_networkfirewall_logging_configuration", loggingConfigurationDataSourceType) } // loggingConfigurationDataSourceType returns the Terraform awscc_networkfirewall_logging_configuration data source type. // This Terraform data source type corresponds to the CloudFormation AWS::NetworkFirewall::LoggingConfiguration resource type. func loggingConfigurationDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "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, }, "firewall_name": { // Property: FirewallName // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "^[a-zA-Z0-9-]+$", // "type": "string" // } Type: types.StringType, Computed: true, }, "logging_configuration": { // Property: LoggingConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "LogDestinationConfigs": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "LogDestination": { // "additionalProperties": false, // "description": "A key-value pair to configure the logDestinations.", // "patternProperties": { // "": { // "maxLength": 1024, // "minLength": 1, // "type": "string" // } // }, // "type": "object" // }, // "LogDestinationType": { // "enum": [ // "S3", // "CloudWatchLogs", // "KinesisDataFirehose" // ], // "type": "string" // }, // "LogType": { // "enum": [ // "ALERT", // "FLOW" // ], // "type": "string" // } // }, // "required": [ // "LogType", // "LogDestinationType", // "LogDestination" // ], // "type": "object" // }, // "minItems": 1, // "type": "array" // } // }, // "required": [ // "LogDestinationConfigs" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "log_destination_configs": { // Property: LogDestinationConfigs Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "log_destination": { // Property: LogDestination Description: "A key-value pair to configure the logDestinations.", // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Computed: true, }, "log_destination_type": { // Property: LogDestinationType Type: types.StringType, Computed: true, }, "log_type": { // Property: LogType Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, }, ), 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::NetworkFirewall::LoggingConfiguration", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::LoggingConfiguration").WithTerraformTypeName("awscc_networkfirewall_logging_configuration") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "firewall_arn": "FirewallArn", "firewall_name": "FirewallName", "log_destination": "LogDestination", "log_destination_configs": "LogDestinationConfigs", "log_destination_type": "LogDestinationType", "log_type": "LogType", "logging_configuration": "LoggingConfiguration", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }