You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`distribution_id`\".",
47
-
"distribution_id": "CDN distribution ID",
48
-
"project_id": "STACKIT project ID associated with the distribution",
49
-
"status": "Status of the distribution",
50
-
"created_at": "Time when the distribution was created",
51
-
"updated_at": "Time when the distribution was last updated",
52
-
"errors": "List of distribution errors",
53
-
"domains": "List of configured domains for the distribution",
54
-
"config": "The distribution configuration",
55
-
"config_backend": "The configured backend for the distribution",
56
-
"config_regions": "The configured regions where content will be hosted",
57
-
"config_backend_type": "The configured backend type. ",
58
-
"config_optimizer": "Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience.",
59
-
"config_backend_origin_url": "The configured backend type http for the distribution",
60
-
"config_backend_origin_request_headers": "The configured type http origin request headers for the backend",
61
-
"config_backend_geofencing": "The configured type http to configure countries where content is allowed. A map of URLs to a list of countries",
62
-
"config_blocked_countries": "The configured countries where distribution of content is blocked",
63
-
"domain_name": "The name of the domain",
64
-
"domain_status": "The status of the domain",
65
-
"domain_type": "The type of the domain. Each distribution has one domain of type \"managed\", and domains of type \"custom\" may be additionally created by the user",
66
-
"domain_errors": "List of domain errors",
67
-
"config_backend_bucket_url": "The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.",
68
-
"config_backend_region": "The region where the bucket is hosted. Required if type is 'bucket'.",
50
+
"id": "Terraform's internal resource identifier. It is structured as \"`project_id`,`distribution_id`\".",
51
+
"distribution_id": "CDN distribution ID",
52
+
"project_id": "STACKIT project ID associated with the distribution",
53
+
"status": "Status of the distribution",
54
+
"created_at": "Time when the distribution was created",
55
+
"updated_at": "Time when the distribution was last updated",
56
+
"errors": "List of distribution errors",
57
+
"domains": "List of configured domains for the distribution",
58
+
"config": "The distribution configuration",
59
+
"config_backend": "The configured backend for the distribution",
60
+
"config_regions": "The configured regions where content will be hosted",
61
+
"config_backend_type": "The configured backend type. ",
62
+
"config_optimizer": "Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience.",
63
+
"config_backend_origin_url": "The configured backend type http for the distribution",
64
+
"config_backend_origin_request_headers": "The configured type http origin request headers for the backend",
65
+
"config_backend_geofencing": "The configured type http to configure countries where content is allowed. A map of URLs to a list of countries",
66
+
"config_blocked_countries": "The configured countries where distribution of content is blocked",
67
+
"config_redirects": "A wrapper for a list of redirect rules that allows for redirect settings on a distribution",
68
+
"config_redirects_rules": "A list of redirect rules. The order of rules matters for evaluation",
69
+
"config_redirects_rule_description": "An optional description for the redirect rule",
70
+
"config_redirects_rule_enabled": "A toggle to enable or disable the redirect rule. Default to true",
71
+
"config_redirects_rule_target_url": "The target URL to redirect to. Must be a valid URI",
72
+
"config_redirects_rule_status_code": "The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.",
73
+
"config_redirects_rule_matchers": "A list of matchers that define when this rule should apply. At least one matcher is required",
74
+
"config_redirects_rule_matcher_values": "A list of glob patterns to match against the request path. At least one value is required. Examples: \"/shop/*\" or \"*/img/*\"",
75
+
"config_redirects_rule_match_condition": "Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.",
76
+
"domain_name": "The name of the domain",
77
+
"domain_status": "The status of the domain",
78
+
"domain_type": "The type of the domain. Each distribution has one domain of type \"managed\", and domains of type \"custom\" may be additionally created by the user",
79
+
"domain_errors": "List of domain errors",
80
+
"config_backend_bucket_url": "The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.",
81
+
"config_backend_region": "The region where the bucket is hosted. Required if type is 'bucket'.",
69
82
"config_backend_credentials_access_key_id": "The access key for the bucket. Required if type is 'bucket'.",
70
83
"config_backend_credentials_secret_access_key": "The secret key for the bucket. Required if type is 'bucket'.",
71
84
"config_backend_credentials": "The credentials for the bucket. Required if type is 'bucket'.",
@@ -83,19 +96,38 @@ type Model struct {
83
96
Config types.Object`tfsdk:"config"`// the configuration of the distribution
Backendbackend`tfsdk:"backend"`// The backend associated with the distribution
88
-
Regions*[]string`tfsdk:"regions"`// The regions in which data will be cached
89
-
BlockedCountries*[]string`tfsdk:"blocked_countries"`// The countries for which content will be blocked
90
-
Optimizer types.Object`tfsdk:"optimizer"`// The optimizer configuration
118
+
Backendbackend`tfsdk:"backend"`// The backend associated with the distribution
119
+
Redirects*redirectConfig`tfsdk:"redirects"`// A wrapper for a list of redirect rules that allows for redirect settings on a distribution
120
+
Regions*[]string`tfsdk:"regions"`// The regions in which data will be cached
121
+
BlockedCountries*[]string`tfsdk:"blocked_countries"`// The countries for which content will be blocked
122
+
Optimizer types.Object`tfsdk:"optimizer"`// The optimizer configuration
91
123
}
92
124
93
125
typeoptimizerConfigstruct {
94
126
Enabled types.Bool`tfsdk:"enabled"`
95
127
}
96
128
97
129
typebackendstruct {
98
-
Typestring`tfsdk:"type"`// The type of the backend. Currently, only "http" backend is supported
130
+
Typestring`tfsdk:"type"`// The type of the backend. Currently, only "http" and "bucket" backend is supported
99
131
OriginURL*string`tfsdk:"origin_url"`// The origin URL of the backend
100
132
OriginRequestHeaders*map[string]string`tfsdk:"origin_request_headers"`// Request headers that should be added by the CDN distribution to incoming requests
101
133
Geofencing*map[string][]*string`tfsdk:"geofencing"`// The geofencing is an object mapping multiple alternative origins to country codes.
@@ -116,6 +148,9 @@ var configTypes = map[string]attr.Type{
116
148
"optimizer": types.ObjectType{
117
149
AttrTypes: optimizerTypes,
118
150
},
151
+
"redirects": types.ObjectType{
152
+
AttrTypes: redirectsTypes,
153
+
},
119
154
}
120
155
121
156
varoptimizerTypes=map[string]attr.Type{
@@ -126,6 +161,32 @@ var geofencingTypes = types.MapType{ElemType: types.ListType{
0 commit comments