Skip to content

Commit

Permalink
[Bot] push changes from Files.com
Browse files Browse the repository at this point in the history
  • Loading branch information
files-opensource-bot committed Jul 22, 2024
1 parent 2bdb465 commit 9cfe8ad
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ terraform {
required_providers {
files = {
source = "Files-com/files"
version = "0.1.13"
version = "0.1.14"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion _VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.13
0.1.14
1 change: 1 addition & 0 deletions docs/data-sources/remote_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ data "files_remote_server" "example_remote_server" {
- `server_host_key` (String) Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
- `server_type` (String) Remote server type.
- `ssl` (String) Should we require SSL?
- `supports_versioning` (Boolean) If true, this remote server supports file versioning. This value is determined automatically by Files.com.
- `username` (String) Remote server username. Not needed for S3 buckets.
- `wasabi_access_key` (String) Wasabi access key.
- `wasabi_bucket` (String) Wasabi Bucket name
Expand Down
1 change: 1 addition & 0 deletions docs/resources/remote_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ resource "files_remote_server" "example_remote_server" {
- `id` (Number) Remote server ID
- `pinned_region` (String) If set, all communciations with this remote server are made through the provided region.
- `remote_home_path` (String) Initial home folder on remote server
- `supports_versioning` (Boolean) If true, this remote server supports file versioning. This value is determined automatically by Files.com.

## Import

Expand Down
6 changes: 6 additions & 0 deletions internal/provider/remote_server_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ type remoteServerDataSourceModel struct {
LinodeBucket types.String `tfsdk:"linode_bucket"`
LinodeAccessKey types.String `tfsdk:"linode_access_key"`
LinodeRegion types.String `tfsdk:"linode_region"`
SupportsVersioning types.Bool `tfsdk:"supports_versioning"`
}

func (r *remoteServerDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) {
Expand Down Expand Up @@ -330,6 +331,10 @@ func (r *remoteServerDataSource) Schema(_ context.Context, _ datasource.SchemaRe
Description: "Linode region",
Computed: true,
},
"supports_versioning": schema.BoolAttribute{
Description: "If true, this remote server supports file versioning. This value is determined automatically by Files.com.",
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -420,6 +425,7 @@ func (r *remoteServerDataSource) populateDataSourceModel(ctx context.Context, re
state.LinodeBucket = types.StringValue(remoteServer.LinodeBucket)
state.LinodeAccessKey = types.StringValue(remoteServer.LinodeAccessKey)
state.LinodeRegion = types.StringValue(remoteServer.LinodeRegion)
state.SupportsVersioning = types.BoolPointerValue(remoteServer.SupportsVersioning)

return
}
6 changes: 6 additions & 0 deletions internal/provider/remote_server_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ type remoteServerResourceModel struct {
LinodeBucket types.String `tfsdk:"linode_bucket"`
LinodeAccessKey types.String `tfsdk:"linode_access_key"`
LinodeRegion types.String `tfsdk:"linode_region"`
SupportsVersioning types.Bool `tfsdk:"supports_versioning"`
AwsSecretKey types.String `tfsdk:"aws_secret_key"`
Password types.String `tfsdk:"password"`
PrivateKey types.String `tfsdk:"private_key"`
Expand Down Expand Up @@ -564,6 +565,10 @@ func (r *remoteServerResource) Schema(_ context.Context, _ resource.SchemaReques
stringplanmodifier.UseStateForUnknown(),
},
},
"supports_versioning": schema.BoolAttribute{
Description: "If true, this remote server supports file versioning. This value is determined automatically by Files.com.",
Computed: true,
},
"aws_secret_key": schema.StringAttribute{
Description: "AWS secret key.",
Optional: true,
Expand Down Expand Up @@ -970,6 +975,7 @@ func (r *remoteServerResource) populateResourceModel(ctx context.Context, remote
state.LinodeBucket = types.StringValue(remoteServer.LinodeBucket)
state.LinodeAccessKey = types.StringValue(remoteServer.LinodeAccessKey)
state.LinodeRegion = types.StringValue(remoteServer.LinodeRegion)
state.SupportsVersioning = types.BoolPointerValue(remoteServer.SupportsVersioning)

return
}

0 comments on commit 9cfe8ad

Please sign in to comment.