Skip to content

Commit f5ee559

Browse files
feat(api): api update
1 parent 2c8c5d1 commit f5ee559

File tree

13 files changed

+63
-15
lines changed

13 files changed

+63
-15
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1793
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f7681635d53a6621672260d7c100544abb5ac1765e79a1050125ede065ddc3ce.yml
3-
openapi_spec_hash: a9bf548865fe679f0fd5946d8ac43dc3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b80363dff8a9093d4f64908a5266d96097c56e8b786850513ad10807e3f61441.yml
3+
openapi_spec_hash: 03f0955df4a358d12749e4d530a17fa6
44
config_hash: de4c81cee29cd7dd907279e8916b334f

internal/services/zero_trust_tunnel_cloudflared/data_source_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type ZeroTrustTunnelCloudflaredDataSourceModel struct {
2323
TunnelID types.String `tfsdk:"tunnel_id" path:"tunnel_id,optional"`
2424
AccountID types.String `tfsdk:"account_id" path:"account_id,required"`
2525
AccountTag types.String `tfsdk:"account_tag" json:"account_tag,computed"`
26+
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed"`
2627
ConnsActiveAt timetypes.RFC3339 `tfsdk:"conns_active_at" json:"conns_active_at,computed" format:"date-time"`
2728
ConnsInactiveAt timetypes.RFC3339 `tfsdk:"conns_inactive_at" json:"conns_inactive_at,computed" format:"date-time"`
2829
CreatedAt timetypes.RFC3339 `tfsdk:"created_at" json:"created_at,computed" format:"date-time"`

internal/services/zero_trust_tunnel_cloudflared/data_source_schema.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
3737
Description: "Cloudflare account ID",
3838
Computed: true,
3939
},
40+
"config_src": schema.StringAttribute{
41+
Description: "Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.\nAvailable values: \"local\", \"cloudflare\".",
42+
Computed: true,
43+
Validators: []validator.String{
44+
stringvalidator.OneOfCaseInsensitive("local", "cloudflare"),
45+
},
46+
},
4047
"conns_active_at": schema.StringAttribute{
4148
Description: "Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If `null`, the tunnel is inactive.",
4249
Computed: true,
@@ -62,8 +69,9 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
6269
Computed: true,
6370
},
6471
"remote_config": schema.BoolAttribute{
65-
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
66-
Computed: true,
72+
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
73+
Computed: true,
74+
DeprecationMessage: "Use the config_src field instead.",
6775
},
6876
"status": schema.StringAttribute{
6977
Description: "The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).\nAvailable values: \"inactive\", \"degraded\", \"healthy\", \"down\".",

internal/services/zero_trust_tunnel_cloudflared/list_data_source_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func (m *ZeroTrustTunnelCloudflaredsDataSourceModel) toListParams(_ context.Cont
8181
type ZeroTrustTunnelCloudflaredsResultDataSourceModel struct {
8282
ID types.String `tfsdk:"id" json:"id,computed"`
8383
AccountTag types.String `tfsdk:"account_tag" json:"account_tag,computed"`
84+
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed"`
8485
Connections customfield.NestedObjectList[ZeroTrustTunnelCloudflaredsConnectionsDataSourceModel] `tfsdk:"connections" json:"connections,computed"`
8586
ConnsActiveAt timetypes.RFC3339 `tfsdk:"conns_active_at" json:"conns_active_at,computed" format:"date-time"`
8687
ConnsInactiveAt timetypes.RFC3339 `tfsdk:"conns_inactive_at" json:"conns_inactive_at,computed" format:"date-time"`

internal/services/zero_trust_tunnel_cloudflared/list_data_source_schema.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ func ListDataSourceSchema(ctx context.Context) schema.Schema {
8787
Description: "Cloudflare account ID",
8888
Computed: true,
8989
},
90+
"config_src": schema.StringAttribute{
91+
Description: "Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.\nAvailable values: \"local\", \"cloudflare\".",
92+
Computed: true,
93+
Validators: []validator.String{
94+
stringvalidator.OneOfCaseInsensitive("local", "cloudflare"),
95+
},
96+
},
9097
"connections": schema.ListNestedAttribute{
9198
Description: "The Cloudflare Tunnel connections between your origin and Cloudflare's edge.",
9299
Computed: true,
@@ -160,8 +167,9 @@ func ListDataSourceSchema(ctx context.Context) schema.Schema {
160167
Computed: true,
161168
},
162169
"remote_config": schema.BoolAttribute{
163-
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
164-
Computed: true,
170+
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
171+
Computed: true,
172+
DeprecationMessage: "Use the config_src field instead.",
165173
},
166174
"status": schema.StringAttribute{
167175
Description: "The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).\nAvailable values: \"inactive\", \"degraded\", \"healthy\", \"down\".",

internal/services/zero_trust_tunnel_cloudflared/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ZeroTrustTunnelCloudflaredResultEnvelope struct {
1717
type ZeroTrustTunnelCloudflaredModel struct {
1818
ID types.String `tfsdk:"id" json:"id,computed"`
1919
AccountID types.String `tfsdk:"account_id" path:"account_id,required"`
20-
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed_optional,no_refresh"`
20+
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed_optional"`
2121
Name types.String `tfsdk:"name" json:"name,required"`
2222
TunnelSecret types.String `tfsdk:"tunnel_secret" json:"tunnel_secret,optional,no_refresh"`
2323
AccountTag types.String `tfsdk:"account_tag" json:"account_tag,computed"`

internal/services/zero_trust_tunnel_cloudflared/schema.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ func ResourceSchema(ctx context.Context) schema.Schema {
7676
CustomType: timetypes.RFC3339Type{},
7777
},
7878
"remote_config": schema.BoolAttribute{
79-
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
80-
Computed: true,
79+
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
80+
Computed: true,
81+
DeprecationMessage: "Use the config_src field instead.",
8182
},
8283
"status": schema.StringAttribute{
8384
Description: "The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).\nAvailable values: \"inactive\", \"degraded\", \"healthy\", \"down\".",

internal/services/zero_trust_tunnel_warp_connector/data_source_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type ZeroTrustTunnelWARPConnectorDataSourceModel struct {
2323
TunnelID types.String `tfsdk:"tunnel_id" path:"tunnel_id,optional"`
2424
AccountID types.String `tfsdk:"account_id" path:"account_id,required"`
2525
AccountTag types.String `tfsdk:"account_tag" json:"account_tag,computed"`
26+
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed"`
2627
ConnsActiveAt timetypes.RFC3339 `tfsdk:"conns_active_at" json:"conns_active_at,computed" format:"date-time"`
2728
ConnsInactiveAt timetypes.RFC3339 `tfsdk:"conns_inactive_at" json:"conns_inactive_at,computed" format:"date-time"`
2829
CreatedAt timetypes.RFC3339 `tfsdk:"created_at" json:"created_at,computed" format:"date-time"`

internal/services/zero_trust_tunnel_warp_connector/data_source_schema.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
3737
Description: "Cloudflare account ID",
3838
Computed: true,
3939
},
40+
"config_src": schema.StringAttribute{
41+
Description: "Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.\nAvailable values: \"local\", \"cloudflare\".",
42+
Computed: true,
43+
Validators: []validator.String{
44+
stringvalidator.OneOfCaseInsensitive("local", "cloudflare"),
45+
},
46+
},
4047
"conns_active_at": schema.StringAttribute{
4148
Description: "Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If `null`, the tunnel is inactive.",
4249
Computed: true,
@@ -62,8 +69,9 @@ func DataSourceSchema(ctx context.Context) schema.Schema {
6269
Computed: true,
6370
},
6471
"remote_config": schema.BoolAttribute{
65-
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
66-
Computed: true,
72+
Description: "If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine.",
73+
Computed: true,
74+
DeprecationMessage: "Use the config_src field instead.",
6775
},
6876
"status": schema.StringAttribute{
6977
Description: "The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).\nAvailable values: \"inactive\", \"degraded\", \"healthy\", \"down\".",

internal/services/zero_trust_tunnel_warp_connector/list_data_source_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func (m *ZeroTrustTunnelWARPConnectorsDataSourceModel) toListParams(_ context.Co
7777
type ZeroTrustTunnelWARPConnectorsResultDataSourceModel struct {
7878
ID types.String `tfsdk:"id" json:"id,computed"`
7979
AccountTag types.String `tfsdk:"account_tag" json:"account_tag,computed"`
80+
ConfigSrc types.String `tfsdk:"config_src" json:"config_src,computed"`
8081
Connections customfield.NestedObjectList[ZeroTrustTunnelWARPConnectorsConnectionsDataSourceModel] `tfsdk:"connections" json:"connections,computed"`
8182
ConnsActiveAt timetypes.RFC3339 `tfsdk:"conns_active_at" json:"conns_active_at,computed" format:"date-time"`
8283
ConnsInactiveAt timetypes.RFC3339 `tfsdk:"conns_inactive_at" json:"conns_inactive_at,computed" format:"date-time"`

0 commit comments

Comments
 (0)