// Code generated by generators/resource/main.go; DO NOT EDIT. package cloudfront import ( "context" "github.com/hashicorp/terraform-plugin-framework/attr" "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.AddResourceTypeFactory("awscc_cloudfront_distribution", distributionResourceType) } // distributionResourceType returns the Terraform awscc_cloudfront_distribution resource type. // This Terraform resource type corresponds to the CloudFormation AWS::CloudFront::Distribution resource type. func distributionResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "distribution_config": { // Property: DistributionConfig // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Aliases": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "CNAMEs": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "CacheBehaviors": { // "items": { // "additionalProperties": false, // "properties": { // "AllowedMethods": { // "default": [ // "GET", // "HEAD" // ], // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "CachePolicyId": { // "type": "string" // }, // "CachedMethods": { // "default": [ // "GET", // "HEAD" // ], // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "Compress": { // "default": false, // "type": "boolean" // }, // "DefaultTTL": { // "default": 86400, // "type": "number" // }, // "FieldLevelEncryptionId": { // "default": "", // "type": "string" // }, // "ForwardedValues": { // "additionalProperties": false, // "properties": { // "Cookies": { // "additionalProperties": false, // "default": { // "Forward": "none" // }, // "properties": { // "Forward": { // "type": "string" // }, // "WhitelistedNames": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "Forward" // ], // "type": "object" // }, // "Headers": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "QueryString": { // "type": "boolean" // }, // "QueryStringCacheKeys": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "QueryString" // ], // "type": "object" // }, // "FunctionAssociations": { // "items": { // "additionalProperties": false, // "properties": { // "EventType": { // "type": "string" // }, // "FunctionARN": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "LambdaFunctionAssociations": { // "items": { // "additionalProperties": false, // "properties": { // "EventType": { // "type": "string" // }, // "IncludeBody": { // "type": "boolean" // }, // "LambdaFunctionARN": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "MaxTTL": { // "default": 31536000, // "type": "number" // }, // "MinTTL": { // "default": 0, // "type": "number" // }, // "OriginRequestPolicyId": { // "type": "string" // }, // "PathPattern": { // "type": "string" // }, // "RealtimeLogConfigArn": { // "type": "string" // }, // "ResponseHeadersPolicyId": { // "type": "string" // }, // "SmoothStreaming": { // "default": false, // "type": "boolean" // }, // "TargetOriginId": { // "type": "string" // }, // "TrustedKeyGroups": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "TrustedSigners": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "ViewerProtocolPolicy": { // "type": "string" // } // }, // "required": [ // "PathPattern", // "TargetOriginId", // "ViewerProtocolPolicy" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "Comment": { // "default": "", // "type": "string" // }, // "CustomErrorResponses": { // "items": { // "additionalProperties": false, // "properties": { // "ErrorCachingMinTTL": { // "default": 300, // "type": "number" // }, // "ErrorCode": { // "type": "integer" // }, // "ResponseCode": { // "type": "integer" // }, // "ResponsePagePath": { // "type": "string" // } // }, // "required": [ // "ErrorCode" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "CustomOrigin": { // "additionalProperties": false, // "properties": { // "DNSName": { // "type": "string" // }, // "HTTPPort": { // "default": 80, // "type": "integer" // }, // "HTTPSPort": { // "default": 443, // "type": "integer" // }, // "OriginProtocolPolicy": { // "type": "string" // }, // "OriginSSLProtocols": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "DNSName", // "OriginProtocolPolicy", // "OriginSSLProtocols" // ], // "type": "object" // }, // "DefaultCacheBehavior": { // "additionalProperties": false, // "properties": { // "AllowedMethods": { // "default": [ // "GET", // "HEAD" // ], // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "CachePolicyId": { // "default": "", // "type": "string" // }, // "CachedMethods": { // "default": [ // "GET", // "HEAD" // ], // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "Compress": { // "default": false, // "type": "boolean" // }, // "DefaultTTL": { // "default": 86400, // "type": "number" // }, // "FieldLevelEncryptionId": { // "default": "", // "type": "string" // }, // "ForwardedValues": { // "additionalProperties": false, // "properties": { // "Cookies": { // "additionalProperties": false, // "default": { // "Forward": "none" // }, // "properties": { // "Forward": { // "type": "string" // }, // "WhitelistedNames": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "Forward" // ], // "type": "object" // }, // "Headers": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "QueryString": { // "type": "boolean" // }, // "QueryStringCacheKeys": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "QueryString" // ], // "type": "object" // }, // "FunctionAssociations": { // "items": { // "additionalProperties": false, // "properties": { // "EventType": { // "type": "string" // }, // "FunctionARN": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "LambdaFunctionAssociations": { // "items": { // "additionalProperties": false, // "properties": { // "EventType": { // "type": "string" // }, // "IncludeBody": { // "type": "boolean" // }, // "LambdaFunctionARN": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "MaxTTL": { // "default": 31536000, // "type": "number" // }, // "MinTTL": { // "default": 0, // "type": "number" // }, // "OriginRequestPolicyId": { // "default": "", // "type": "string" // }, // "RealtimeLogConfigArn": { // "default": "", // "type": "string" // }, // "ResponseHeadersPolicyId": { // "default": "", // "type": "string" // }, // "SmoothStreaming": { // "default": false, // "type": "boolean" // }, // "TargetOriginId": { // "type": "string" // }, // "TrustedKeyGroups": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "TrustedSigners": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "ViewerProtocolPolicy": { // "type": "string" // } // }, // "required": [ // "TargetOriginId", // "ViewerProtocolPolicy" // ], // "type": "object" // }, // "DefaultRootObject": { // "default": "", // "type": "string" // }, // "Enabled": { // "type": "boolean" // }, // "HttpVersion": { // "default": "http1.1", // "type": "string" // }, // "IPV6Enabled": { // "type": "boolean" // }, // "Logging": { // "additionalProperties": false, // "properties": { // "Bucket": { // "type": "string" // }, // "IncludeCookies": { // "default": false, // "type": "boolean" // }, // "Prefix": { // "default": "", // "type": "string" // } // }, // "required": [ // "Bucket" // ], // "type": "object" // }, // "OriginGroups": { // "additionalProperties": false, // "properties": { // "Items": { // "items": { // "additionalProperties": false, // "properties": { // "FailoverCriteria": { // "additionalProperties": false, // "properties": { // "StatusCodes": { // "additionalProperties": false, // "properties": { // "Items": { // "items": { // "type": "integer" // }, // "type": "array", // "uniqueItems": false // }, // "Quantity": { // "type": "integer" // } // }, // "required": [ // "Quantity", // "Items" // ], // "type": "object" // } // }, // "required": [ // "StatusCodes" // ], // "type": "object" // }, // "Id": { // "type": "string" // }, // "Members": { // "additionalProperties": false, // "properties": { // "Items": { // "items": { // "additionalProperties": false, // "properties": { // "OriginId": { // "type": "string" // } // }, // "required": [ // "OriginId" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "Quantity": { // "type": "integer" // } // }, // "required": [ // "Quantity", // "Items" // ], // "type": "object" // } // }, // "required": [ // "Id", // "FailoverCriteria", // "Members" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "Quantity": { // "type": "integer" // } // }, // "required": [ // "Quantity" // ], // "type": "object" // }, // "Origins": { // "items": { // "additionalProperties": false, // "properties": { // "ConnectionAttempts": { // "type": "integer" // }, // "ConnectionTimeout": { // "type": "integer" // }, // "CustomOriginConfig": { // "additionalProperties": false, // "properties": { // "HTTPPort": { // "default": 80, // "type": "integer" // }, // "HTTPSPort": { // "default": 443, // "type": "integer" // }, // "OriginKeepaliveTimeout": { // "default": 5, // "type": "integer" // }, // "OriginProtocolPolicy": { // "type": "string" // }, // "OriginReadTimeout": { // "default": 30, // "type": "integer" // }, // "OriginSSLProtocols": { // "default": [ // "TLSv1", // "SSLv3" // ], // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // } // }, // "required": [ // "OriginProtocolPolicy" // ], // "type": "object" // }, // "DomainName": { // "type": "string" // }, // "Id": { // "type": "string" // }, // "OriginCustomHeaders": { // "items": { // "additionalProperties": false, // "properties": { // "HeaderName": { // "type": "string" // }, // "HeaderValue": { // "type": "string" // } // }, // "required": [ // "HeaderValue", // "HeaderName" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "OriginPath": { // "default": "", // "type": "string" // }, // "OriginShield": { // "additionalProperties": false, // "properties": { // "Enabled": { // "type": "boolean" // }, // "OriginShieldRegion": { // "type": "string" // } // }, // "type": "object" // }, // "S3OriginConfig": { // "additionalProperties": false, // "properties": { // "OriginAccessIdentity": { // "default": "", // "type": "string" // } // }, // "type": "object" // } // }, // "required": [ // "DomainName", // "Id" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "PriceClass": { // "default": "PriceClass_All", // "type": "string" // }, // "Restrictions": { // "additionalProperties": false, // "default": { // "GeoRestriction": { // "RestrictionType": "none" // } // }, // "properties": { // "GeoRestriction": { // "additionalProperties": false, // "properties": { // "Locations": { // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "RestrictionType": { // "type": "string" // } // }, // "required": [ // "RestrictionType" // ], // "type": "object" // } // }, // "required": [ // "GeoRestriction" // ], // "type": "object" // }, // "S3Origin": { // "additionalProperties": false, // "properties": { // "DNSName": { // "type": "string" // }, // "OriginAccessIdentity": { // "default": "", // "type": "string" // } // }, // "required": [ // "DNSName" // ], // "type": "object" // }, // "ViewerCertificate": { // "additionalProperties": false, // "default": { // "CloudFrontDefaultCertificate": true // }, // "properties": { // "AcmCertificateArn": { // "type": "string" // }, // "CloudFrontDefaultCertificate": { // "type": "boolean" // }, // "IamCertificateId": { // "type": "string" // }, // "MinimumProtocolVersion": { // "type": "string" // }, // "SslSupportMethod": { // "type": "string" // } // }, // "type": "object" // }, // "WebACLId": { // "default": "", // "type": "string" // } // }, // "required": [ // "Enabled" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "aliases": { // Property: Aliases Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "cnames": { // Property: CNAMEs Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "cache_behaviors": { // Property: CacheBehaviors Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "allowed_methods": { // Property: AllowedMethods Type: types.ListType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.List{ElemType: types.StringType, Elems: []attr.Value{ types.String{Value: "GET"}, types.String{Value: "HEAD"}, }}), tfsdk.UseStateForUnknown(), }, }, "cache_policy_id": { // Property: CachePolicyId Type: types.StringType, Optional: true, }, "cached_methods": { // Property: CachedMethods Type: types.ListType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.List{ElemType: types.StringType, Elems: []attr.Value{ types.String{Value: "GET"}, types.String{Value: "HEAD"}, }}), tfsdk.UseStateForUnknown(), }, }, "compress": { // Property: Compress Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, "default_ttl": { // Property: DefaultTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 86400.000000}), tfsdk.UseStateForUnknown(), }, }, "field_level_encryption_id": { // Property: FieldLevelEncryptionId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "forwarded_values": { // Property: ForwardedValues Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "cookies": { // Property: Cookies Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "forward": { // Property: Forward Type: types.StringType, Required: true, }, "whitelisted_names": { // Property: WhitelistedNames Type: types.ListType{ElemType: types.StringType}, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Object{ AttrTypes: map[string]attr.Type{ "forward": types.StringType, }, Attrs: map[string]attr.Value{ "forward": types.String{Value: "none"}, }, }, ), tfsdk.UseStateForUnknown(), }, }, "headers": { // Property: Headers Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "query_string": { // Property: QueryString Type: types.BoolType, Required: true, }, "query_string_cache_keys": { // Property: QueryStringCacheKeys Type: types.ListType{ElemType: types.StringType}, Optional: true, }, }, ), Optional: true, }, "function_associations": { // Property: FunctionAssociations Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "event_type": { // Property: EventType Type: types.StringType, Optional: true, }, "function_arn": { // Property: FunctionARN Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "lambda_function_associations": { // Property: LambdaFunctionAssociations Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "event_type": { // Property: EventType Type: types.StringType, Optional: true, }, "include_body": { // Property: IncludeBody Type: types.BoolType, Optional: true, }, "lambda_function_arn": { // Property: LambdaFunctionARN Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "max_ttl": { // Property: MaxTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 31536000.000000}), tfsdk.UseStateForUnknown(), }, }, "min_ttl": { // Property: MinTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 0.000000}), tfsdk.UseStateForUnknown(), }, }, "origin_request_policy_id": { // Property: OriginRequestPolicyId Type: types.StringType, Optional: true, }, "path_pattern": { // Property: PathPattern Type: types.StringType, Required: true, }, "realtime_log_config_arn": { // Property: RealtimeLogConfigArn Type: types.StringType, Optional: true, }, "response_headers_policy_id": { // Property: ResponseHeadersPolicyId Type: types.StringType, Optional: true, }, "smooth_streaming": { // Property: SmoothStreaming Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, "target_origin_id": { // Property: TargetOriginId Type: types.StringType, Required: true, }, "trusted_key_groups": { // Property: TrustedKeyGroups Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "trusted_signers": { // Property: TrustedSigners Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "viewer_protocol_policy": { // Property: ViewerProtocolPolicy Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "comment": { // Property: Comment Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "custom_error_responses": { // Property: CustomErrorResponses Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "error_caching_min_ttl": { // Property: ErrorCachingMinTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 300.000000}), tfsdk.UseStateForUnknown(), }, }, "error_code": { // Property: ErrorCode Type: types.Int64Type, Required: true, }, "response_code": { // Property: ResponseCode Type: types.Int64Type, Optional: true, }, "response_page_path": { // Property: ResponsePagePath Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "custom_origin": { // Property: CustomOrigin Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "dns_name": { // Property: DNSName Type: types.StringType, Required: true, }, "http_port": { // Property: HTTPPort Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 80}), tfsdk.UseStateForUnknown(), }, }, "https_port": { // Property: HTTPSPort Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 443}), tfsdk.UseStateForUnknown(), }, }, "origin_protocol_policy": { // Property: OriginProtocolPolicy Type: types.StringType, Required: true, }, "origin_ssl_protocols": { // Property: OriginSSLProtocols Type: types.ListType{ElemType: types.StringType}, Required: true, }, }, ), Optional: true, }, "default_cache_behavior": { // Property: DefaultCacheBehavior Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "allowed_methods": { // Property: AllowedMethods Type: types.ListType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.List{ElemType: types.StringType, Elems: []attr.Value{ types.String{Value: "GET"}, types.String{Value: "HEAD"}, }}), tfsdk.UseStateForUnknown(), }, }, "cache_policy_id": { // Property: CachePolicyId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "cached_methods": { // Property: CachedMethods Type: types.ListType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.List{ElemType: types.StringType, Elems: []attr.Value{ types.String{Value: "GET"}, types.String{Value: "HEAD"}, }}), tfsdk.UseStateForUnknown(), }, }, "compress": { // Property: Compress Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, "default_ttl": { // Property: DefaultTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 86400.000000}), tfsdk.UseStateForUnknown(), }, }, "field_level_encryption_id": { // Property: FieldLevelEncryptionId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "forwarded_values": { // Property: ForwardedValues Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "cookies": { // Property: Cookies Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "forward": { // Property: Forward Type: types.StringType, Required: true, }, "whitelisted_names": { // Property: WhitelistedNames Type: types.ListType{ElemType: types.StringType}, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Object{ AttrTypes: map[string]attr.Type{ "forward": types.StringType, }, Attrs: map[string]attr.Value{ "forward": types.String{Value: "none"}, }, }, ), tfsdk.UseStateForUnknown(), }, }, "headers": { // Property: Headers Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "query_string": { // Property: QueryString Type: types.BoolType, Required: true, }, "query_string_cache_keys": { // Property: QueryStringCacheKeys Type: types.ListType{ElemType: types.StringType}, Optional: true, }, }, ), Optional: true, }, "function_associations": { // Property: FunctionAssociations Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "event_type": { // Property: EventType Type: types.StringType, Optional: true, }, "function_arn": { // Property: FunctionARN Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "lambda_function_associations": { // Property: LambdaFunctionAssociations Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "event_type": { // Property: EventType Type: types.StringType, Optional: true, }, "include_body": { // Property: IncludeBody Type: types.BoolType, Optional: true, }, "lambda_function_arn": { // Property: LambdaFunctionARN Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "max_ttl": { // Property: MaxTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 31536000.000000}), tfsdk.UseStateForUnknown(), }, }, "min_ttl": { // Property: MinTTL Type: types.Float64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Float64{Value: 0.000000}), tfsdk.UseStateForUnknown(), }, }, "origin_request_policy_id": { // Property: OriginRequestPolicyId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "realtime_log_config_arn": { // Property: RealtimeLogConfigArn Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "response_headers_policy_id": { // Property: ResponseHeadersPolicyId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "smooth_streaming": { // Property: SmoothStreaming Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, "target_origin_id": { // Property: TargetOriginId Type: types.StringType, Required: true, }, "trusted_key_groups": { // Property: TrustedKeyGroups Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "trusted_signers": { // Property: TrustedSigners Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "viewer_protocol_policy": { // Property: ViewerProtocolPolicy Type: types.StringType, Required: true, }, }, ), Optional: true, }, "default_root_object": { // Property: DefaultRootObject Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "enabled": { // Property: Enabled Type: types.BoolType, Required: true, }, "http_version": { // Property: HttpVersion Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: "http1.1"}), tfsdk.UseStateForUnknown(), }, }, "ipv6_enabled": { // Property: IPV6Enabled Type: types.BoolType, Optional: true, }, "logging": { // Property: Logging Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "bucket": { // Property: Bucket Type: types.StringType, Required: true, }, "include_cookies": { // Property: IncludeCookies Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, "prefix": { // Property: Prefix Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, }, ), Optional: true, }, "origin_groups": { // Property: OriginGroups Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "items": { // Property: Items Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "failover_criteria": { // Property: FailoverCriteria Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "status_codes": { // Property: StatusCodes Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "items": { // Property: Items Type: types.ListType{ElemType: types.Int64Type}, Required: true, }, "quantity": { // Property: Quantity Type: types.Int64Type, Required: true, }, }, ), Required: true, }, }, ), Required: true, }, "id": { // Property: Id Type: types.StringType, Required: true, }, "members": { // Property: Members Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "items": { // Property: Items Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "origin_id": { // Property: OriginId Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Required: true, }, "quantity": { // Property: Quantity Type: types.Int64Type, Required: true, }, }, ), Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "quantity": { // Property: Quantity Type: types.Int64Type, Required: true, }, }, ), Optional: true, }, "origins": { // Property: Origins Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "connection_attempts": { // Property: ConnectionAttempts Type: types.Int64Type, Optional: true, }, "connection_timeout": { // Property: ConnectionTimeout Type: types.Int64Type, Optional: true, }, "custom_origin_config": { // Property: CustomOriginConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "http_port": { // Property: HTTPPort Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 80}), tfsdk.UseStateForUnknown(), }, }, "https_port": { // Property: HTTPSPort Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 443}), tfsdk.UseStateForUnknown(), }, }, "origin_keepalive_timeout": { // Property: OriginKeepaliveTimeout Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 5}), tfsdk.UseStateForUnknown(), }, }, "origin_protocol_policy": { // Property: OriginProtocolPolicy Type: types.StringType, Required: true, }, "origin_read_timeout": { // Property: OriginReadTimeout Type: types.Int64Type, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Int64{Value: 30}), tfsdk.UseStateForUnknown(), }, }, "origin_ssl_protocols": { // Property: OriginSSLProtocols Type: types.ListType{ElemType: types.StringType}, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.List{ElemType: types.StringType, Elems: []attr.Value{ types.String{Value: "TLSv1"}, types.String{Value: "SSLv3"}, }}), tfsdk.UseStateForUnknown(), }, }, }, ), Optional: true, }, "domain_name": { // Property: DomainName Type: types.StringType, Required: true, }, "id": { // Property: Id Type: types.StringType, Required: true, }, "origin_custom_headers": { // Property: OriginCustomHeaders Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "header_name": { // Property: HeaderName Type: types.StringType, Required: true, }, "header_value": { // Property: HeaderValue Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "origin_path": { // Property: OriginPath Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, "origin_shield": { // Property: OriginShield Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "enabled": { // Property: Enabled Type: types.BoolType, Optional: true, }, "origin_shield_region": { // Property: OriginShieldRegion Type: types.StringType, Optional: true, }, }, ), Optional: true, }, "s3_origin_config": { // Property: S3OriginConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "origin_access_identity": { // Property: OriginAccessIdentity Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, }, ), Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, "price_class": { // Property: PriceClass Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: "PriceClass_All"}), tfsdk.UseStateForUnknown(), }, }, "restrictions": { // Property: Restrictions Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "geo_restriction": { // Property: GeoRestriction Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "locations": { // Property: Locations Type: types.ListType{ElemType: types.StringType}, Optional: true, }, "restriction_type": { // Property: RestrictionType Type: types.StringType, Required: true, }, }, ), Required: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Object{ AttrTypes: map[string]attr.Type{ "geo_restriction": types.ObjectType{ AttrTypes: map[string]attr.Type{ "restriction_type": types.StringType, }, }, }, Attrs: map[string]attr.Value{ "geo_restriction": types.Object{ AttrTypes: map[string]attr.Type{ "restriction_type": types.StringType, }, Attrs: map[string]attr.Value{ "restriction_type": types.String{Value: "none"}, }, }, }, }, ), tfsdk.UseStateForUnknown(), }, }, "s3_origin": { // Property: S3Origin Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "dns_name": { // Property: DNSName Type: types.StringType, Required: true, }, "origin_access_identity": { // Property: OriginAccessIdentity Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, }, ), Optional: true, }, "viewer_certificate": { // Property: ViewerCertificate Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "acm_certificate_arn": { // Property: AcmCertificateArn Type: types.StringType, Optional: true, }, "cloudfront_default_certificate": { // Property: CloudFrontDefaultCertificate Type: types.BoolType, Optional: true, }, "iam_certificate_id": { // Property: IamCertificateId Type: types.StringType, Optional: true, }, "minimum_protocol_version": { // Property: MinimumProtocolVersion Type: types.StringType, Optional: true, }, "ssl_support_method": { // Property: SslSupportMethod Type: types.StringType, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Object{ AttrTypes: map[string]attr.Type{ "cloudfront_default_certificate": types.BoolType, }, Attrs: map[string]attr.Value{ "cloudfront_default_certificate": types.Bool{Value: true}, }, }, ), tfsdk.UseStateForUnknown(), }, }, "web_acl_id": { // Property: WebACLId Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: ""}), tfsdk.UseStateForUnknown(), }, }, }, ), Required: true, }, "domain_name": { // Property: DomainName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, }, "value": { // Property: Value Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::CloudFront::Distribution", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::CloudFront::Distribution").WithTerraformTypeName("awscc_cloudfront_distribution") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "acm_certificate_arn": "AcmCertificateArn", "aliases": "Aliases", "allowed_methods": "AllowedMethods", "bucket": "Bucket", "cache_behaviors": "CacheBehaviors", "cache_policy_id": "CachePolicyId", "cached_methods": "CachedMethods", "cloudfront_default_certificate": "CloudFrontDefaultCertificate", "cnames": "CNAMEs", "comment": "Comment", "compress": "Compress", "connection_attempts": "ConnectionAttempts", "connection_timeout": "ConnectionTimeout", "cookies": "Cookies", "custom_error_responses": "CustomErrorResponses", "custom_origin": "CustomOrigin", "custom_origin_config": "CustomOriginConfig", "default_cache_behavior": "DefaultCacheBehavior", "default_root_object": "DefaultRootObject", "default_ttl": "DefaultTTL", "distribution_config": "DistributionConfig", "dns_name": "DNSName", "domain_name": "DomainName", "enabled": "Enabled", "error_caching_min_ttl": "ErrorCachingMinTTL", "error_code": "ErrorCode", "event_type": "EventType", "failover_criteria": "FailoverCriteria", "field_level_encryption_id": "FieldLevelEncryptionId", "forward": "Forward", "forwarded_values": "ForwardedValues", "function_arn": "FunctionARN", "function_associations": "FunctionAssociations", "geo_restriction": "GeoRestriction", "header_name": "HeaderName", "header_value": "HeaderValue", "headers": "Headers", "http_port": "HTTPPort", "http_version": "HttpVersion", "https_port": "HTTPSPort", "iam_certificate_id": "IamCertificateId", "id": "Id", "include_body": "IncludeBody", "include_cookies": "IncludeCookies", "ipv6_enabled": "IPV6Enabled", "items": "Items", "key": "Key", "lambda_function_arn": "LambdaFunctionARN", "lambda_function_associations": "LambdaFunctionAssociations", "locations": "Locations", "logging": "Logging", "max_ttl": "MaxTTL", "members": "Members", "min_ttl": "MinTTL", "minimum_protocol_version": "MinimumProtocolVersion", "origin_access_identity": "OriginAccessIdentity", "origin_custom_headers": "OriginCustomHeaders", "origin_groups": "OriginGroups", "origin_id": "OriginId", "origin_keepalive_timeout": "OriginKeepaliveTimeout", "origin_path": "OriginPath", "origin_protocol_policy": "OriginProtocolPolicy", "origin_read_timeout": "OriginReadTimeout", "origin_request_policy_id": "OriginRequestPolicyId", "origin_shield": "OriginShield", "origin_shield_region": "OriginShieldRegion", "origin_ssl_protocols": "OriginSSLProtocols", "origins": "Origins", "path_pattern": "PathPattern", "prefix": "Prefix", "price_class": "PriceClass", "quantity": "Quantity", "query_string": "QueryString", "query_string_cache_keys": "QueryStringCacheKeys", "realtime_log_config_arn": "RealtimeLogConfigArn", "response_code": "ResponseCode", "response_headers_policy_id": "ResponseHeadersPolicyId", "response_page_path": "ResponsePagePath", "restriction_type": "RestrictionType", "restrictions": "Restrictions", "s3_origin": "S3Origin", "s3_origin_config": "S3OriginConfig", "smooth_streaming": "SmoothStreaming", "ssl_support_method": "SslSupportMethod", "status_codes": "StatusCodes", "tags": "Tags", "target_origin_id": "TargetOriginId", "trusted_key_groups": "TrustedKeyGroups", "trusted_signers": "TrustedSigners", "value": "Value", "viewer_certificate": "ViewerCertificate", "viewer_protocol_policy": "ViewerProtocolPolicy", "web_acl_id": "WebACLId", "whitelisted_names": "WhitelistedNames", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }