Skip to content

Commit 8666096

Browse files
feat(api): api update
1 parent 19eaa6d commit 8666096

File tree

10 files changed

+33
-12
lines changed

10 files changed

+33
-12
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1783
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e408a7cdec2dae3d1a18842dcc59280c56050fb042569139aec3fe0f12e0d461.yml
3-
openapi_spec_hash: 7e210c76f5dd4c79b3e67204ad279b81
1+
configured_endpoints: 1781
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bea25aa2ecf5263456a917858800dceeeb1b026bd91c2a8f634f29f6a82186f.yml
3+
openapi_spec_hash: 932e8170cf032407cc8f0bd756bc61bd
44
config_hash: a433f3793b734bc6fcc9d9e0c27ff8c2

examples/resources/cloudflare_r2_custom_domain/resource.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ resource "cloudflare_r2_custom_domain" "example_r2_custom_domain" {
44
domain = "domain"
55
enabled = true
66
zone_id = "zoneId"
7+
ciphers = ["string"]
78
min_tls = "1.0"
89
}

examples/resources/cloudflare_zero_trust_gateway_settings/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "cloudflare_zero_trust_gateway_settings" "example_zero_trust_gateway_se
2424
logo_path = "https://logos.com/a.png"
2525
mailto_address = "[email protected]"
2626
mailto_subject = "Blocked User Inquiry"
27-
mode = "customized_block_page"
27+
mode = ""
2828
name = "Cloudflare"
2929
suppress_footer = false
3030
target_uri = "https://example.com"

internal/services/r2_custom_domain/data_source_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type R2CustomDomainDataSourceModel struct {
2424
MinTLS types.String `tfsdk:"min_tls" json:"minTLS,computed"`
2525
ZoneID types.String `tfsdk:"zone_id" json:"zoneId,computed"`
2626
ZoneName types.String `tfsdk:"zone_name" json:"zoneName,computed"`
27+
Ciphers customfield.List[types.String] `tfsdk:"ciphers" json:"ciphers,computed"`
2728
Status customfield.NestedObject[R2CustomDomainStatusDataSourceModel] `tfsdk:"status" json:"status,computed"`
2829
}
2930

internal/services/r2_custom_domain/data_source_schema.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/hashicorp/terraform-plugin-framework/datasource"
1111
"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
1212
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
13+
"github.com/hashicorp/terraform-plugin-framework/types"
1314
)
1415

1516
var _ datasource.DataSourceWithConfigValidators = (*R2CustomDomainDataSource)(nil)
@@ -53,6 +54,12 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
5354
Description: "Zone that the custom domain resides in.",
5455
Computed: true,
5556
},
57+
"ciphers": schema.ListAttribute{
58+
Description: "An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.",
59+
Computed: true,
60+
CustomType: customfield.NewListType[types.String](ctx),
61+
ElementType: types.StringType,
62+
},
5663
"status": schema.SingleNestedAttribute{
5764
Computed: true,
5865
CustomType: customfield.NewNestedObjectType[R2CustomDomainStatusDataSourceModel](ctx),

internal/services/r2_custom_domain/model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type R2CustomDomainModel struct {
2020
ZoneID types.String `tfsdk:"zone_id" json:"zoneId,required"`
2121
Enabled types.Bool `tfsdk:"enabled" json:"enabled,required"`
2222
MinTLS types.String `tfsdk:"min_tls" json:"minTLS,optional"`
23+
Ciphers *[]types.String `tfsdk:"ciphers" json:"ciphers,optional"`
2324
ZoneName types.String `tfsdk:"zone_name" json:"zoneName,computed"`
2425
Status customfield.NestedObject[R2CustomDomainStatusModel] `tfsdk:"status" json:"status,computed"`
2526
}

internal/services/r2_custom_domain/schema.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
1414
"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
1515
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
16+
"github.com/hashicorp/terraform-plugin-framework/types"
1617
)
1718

1819
var _ resource.ResourceWithConfigValidators = (*R2CustomDomainResource)(nil)
@@ -69,6 +70,11 @@ func ResourceSchema(ctx context.Context) schema.Schema {
6970
),
7071
},
7172
},
73+
"ciphers": schema.ListAttribute{
74+
Description: "An allowlist of ciphers for TLS termination. These ciphers must be in the BoringSSL format.",
75+
Optional: true,
76+
ElementType: types.StringType,
77+
},
7278
"zone_name": schema.StringAttribute{
7379
Description: "Zone that the custom domain resides in.",
7480
Computed: true,

internal/services/zero_trust_gateway_settings/data_source_schema.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,14 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
125125
Computed: true,
126126
},
127127
"mode": schema.StringAttribute{
128-
Description: "Controls whether the user is redirected to a Cloudflare-hosted block page or to a customer-provided URI.\nAvailable values: \"customized_block_page\", \"redirect_uri\".",
128+
Description: "Controls whether the user is redirected to a Cloudflare-hosted block page or to a customer-provided URI.\nAvailable values: \"\", \"customized_block_page\", \"redirect_uri\".",
129129
Computed: true,
130130
Validators: []validator.String{
131-
stringvalidator.OneOfCaseInsensitive("customized_block_page", "redirect_uri"),
131+
stringvalidator.OneOfCaseInsensitive(
132+
"",
133+
"customized_block_page",
134+
"redirect_uri",
135+
),
132136
},
133137
},
134138
"name": schema.StringAttribute{

internal/services/zero_trust_gateway_settings/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type ZeroTrustGatewaySettingsSettingsAntivirusModel struct {
5353
EnabledDownloadPhase types.Bool `tfsdk:"enabled_download_phase" json:"enabled_download_phase,computed_optional"`
5454
EnabledUploadPhase types.Bool `tfsdk:"enabled_upload_phase" json:"enabled_upload_phase,computed_optional"`
5555
FailClosed types.Bool `tfsdk:"fail_closed" json:"fail_closed,computed_optional"`
56-
NotificationSettings *ZeroTrustGatewaySettingsSettingsAntivirusNotificationSettingsModel `tfsdk:"notification_settings" json:"notification_settings,computed_optional"`
56+
NotificationSettings *ZeroTrustGatewaySettingsSettingsAntivirusNotificationSettingsModel `tfsdk:"notification_settings" json:"notification_settings,optional"`
5757
}
5858

5959
type ZeroTrustGatewaySettingsSettingsAntivirusNotificationSettingsModel struct {

internal/services/zero_trust_gateway_settings/schema.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package zero_trust_gateway_settings
55
import (
66
"context"
77

8-
"github.com/cloudflare/terraform-provider-cloudflare/internal/customfield"
98
"github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes"
109
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
1110
"github.com/hashicorp/terraform-plugin-framework/resource"
@@ -63,9 +62,7 @@ func ResourceSchema(ctx context.Context) schema.Schema {
6362
},
6463
"notification_settings": schema.SingleNestedAttribute{
6564
Description: "Configure a message to display on the user's device when an antivirus search is performed.",
66-
Computed: true,
6765
Optional: true,
68-
CustomType: customfield.NewNestedObjectType[ZeroTrustGatewaySettingsSettingsAntivirusNotificationSettingsModel](ctx),
6966
Attributes: map[string]schema.Attribute{
7067
"enabled": schema.BoolAttribute{
7168
Description: "Set notification on",
@@ -124,10 +121,14 @@ func ResourceSchema(ctx context.Context) schema.Schema {
124121
Optional: true,
125122
},
126123
"mode": schema.StringAttribute{
127-
Description: "Controls whether the user is redirected to a Cloudflare-hosted block page or to a customer-provided URI.\nAvailable values: \"customized_block_page\", \"redirect_uri\".",
124+
Description: "Controls whether the user is redirected to a Cloudflare-hosted block page or to a customer-provided URI.\nAvailable values: \"\", \"customized_block_page\", \"redirect_uri\".",
128125
Optional: true,
129126
Validators: []validator.String{
130-
stringvalidator.OneOfCaseInsensitive("customized_block_page", "redirect_uri"),
127+
stringvalidator.OneOfCaseInsensitive(
128+
"",
129+
"customized_block_page",
130+
"redirect_uri",
131+
),
131132
},
132133
},
133134
"name": schema.StringAttribute{

0 commit comments

Comments
 (0)