Skip to content

Commit

Permalink
EOL mount_refresh_interval (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenglund authored Oct 18, 2023
1 parent d98acf3 commit 4560b4b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 24 deletions.
1 change: 0 additions & 1 deletion docs/data-sources/virtual_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ description: |-
- `description` (String) Virtual Instance description.
- `desired_size` (String) Virtual Instance desired size.
- `enable_remount_on_resume` (Boolean) When a Virtual Instance is resumed, it will remount all collections that were mounted when the Virtual Instance was suspended.
- `mount_refresh_interval_seconds` (Number) Number of seconds between data refreshes for mounts on this Virtual Instance.
- `name` (String) Virtual Instance name.
- `state` (String) Virtual Instance state.
5 changes: 5 additions & 0 deletions docs/resources/mongodb_collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ Required:
- `database_name` (String) MongoDB database name containing the target collection.
- `integration_name` (String) The name of the Rockset MongoDB integration.

Optional:

- `retrieve_full_document` (Boolean) Whether to get the full document from the MongoDB change stream to enable multi-field expression transformations.
Selecting this option will increase load on your upstream MongoDB database.

Read-Only:

- `scan_end_time` (String) MongoDB scan end time.
Expand Down
1 change: 0 additions & 1 deletion docs/resources/virtual_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ resource "rockset_collection_mount" "patch" {

- `auto_suspend_seconds` (Number) Number of seconds without queries after which the Virtual Instance is suspended.
- `description` (String) Description of the virtual instance.
- `mount_refresh_interval_seconds` (Number) Number of seconds between data refreshes for mounts on this Virtual Instance. A value of 0 means continuous refresh and a value of null means never refresh.
- `remount_on_resume` (Boolean) When a Virtual Instance is resumed, remount all collections that were mounted when the Virtual Instance was suspended.

### Read-Only
Expand Down
8 changes: 0 additions & 8 deletions rockset/data_source_virtual_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ func dataSourceRocksetVirtualInstance() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"mount_refresh_interval_seconds": {
Description: "Number of seconds between data refreshes for mounts on this Virtual Instance.",
Type: schema.TypeInt,
Optional: true,
},
// TODO: auto_scaling_policy
}}
}
Expand Down Expand Up @@ -103,9 +98,6 @@ func dataSourceReadRocksetVirtualInstance(ctx context.Context, d *schema.Resourc
if err = d.Set("enable_remount_on_resume", vi.GetEnableRemountOnResume()); err != nil {
return diag.FromErr(err)
}
if err = d.Set("mount_refresh_interval_seconds", vi.GetMountRefreshIntervalSeconds()); err != nil {
return diag.FromErr(err)
}

d.SetId(id)

Expand Down
1 change: 0 additions & 1 deletion rockset/data_source_virtual_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestAccVirtualInstance_Data(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "default", "true"),
resource.TestCheckResourceAttr(resourceName, "state", "ACTIVE"),
resource.TestCheckResourceAttr(resourceName, "enable_remount_on_resume", "false"),
resource.TestCheckResourceAttr(resourceName, "mount_refresh_interval_seconds", "0"),
),
},
},
Expand Down
13 changes: 0 additions & 13 deletions rockset/resource_virtual_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ which must be SMALL or larger. To enable live mount, the secondary virtual insta
Optional: true,
ValidateFunc: validation.IntAtLeast(900),
},
"mount_refresh_interval_seconds": {
Description: "Number of seconds between data refreshes for mounts on this Virtual Instance. A value of 0 means continuous refresh and a value of null means never refresh.",
Type: schema.TypeInt,
Optional: true,
},
"state": {
Description: "Virtual Instance state.",
Type: schema.TypeString,
Expand Down Expand Up @@ -223,11 +218,6 @@ func getVirtualInstanceOptions(d *schema.ResourceData) []option.VirtualInstanceO
addOptionIfChanged(d, "remount_on_resume", &options, func(a any) option.VirtualInstanceOption {
return option.WithRemountOnResume(a.(bool))
})
addOptionIfChanged(d, "mount_refresh_interval_seconds", &options, func(a any) option.VirtualInstanceOption {
// option.WithNoMountRefresh()
seconds := time.Duration(a.(int)) * time.Second
return option.WithMountRefreshInterval(seconds)
})

return options
}
Expand All @@ -254,9 +244,6 @@ func parseVirtualInstanceFields(vi openapi.VirtualInstance, d *schema.ResourceDa
if err := setValue(d, "auto_suspend_seconds", vi.GetAutoSuspendSecondsOk); err != nil {
return err
}
if err := setValue(d, "mount_refresh_interval_seconds", vi.GetMountRefreshIntervalSecondsOk); err != nil {
return err
}
if err := setValue(d, "state", vi.GetStateOk); err != nil {
return err
}
Expand Down

0 comments on commit 4560b4b

Please sign in to comment.