Skip to content

Commit

Permalink
Make cluster_name parameter required (#435)
Browse files Browse the repository at this point in the history
* Make cluster parameter required

* Terraform Docs

---------

Co-authored-by: bobbyiliev <[email protected]>
  • Loading branch information
bobbyiliev and bobbyiliev authored Jan 11, 2024
1 parent a6a57bb commit e6cde73
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ resource "materialize_index" "loadgen_index" {

### Required

- `cluster_name` (String) The cluster to maintain this index.
- `col_expr` (Block List, Min: 1) The expressions to use as the key for the index. (see [below for nested schema](#nestedblock--col_expr))
- `obj_name` (Block List, Min: 1, Max: 1) The name of the source, view, or materialized view on which you want to create an index. (see [below for nested schema](#nestedblock--obj_name))

### Optional

- `cluster_name` (String) The cluster to maintain this index. If not specified, defaults to the active cluster.
- `comment` (String) **Private Preview** Comment on an object in the database.
- `default` (Boolean) Creates a default index using all inferred columns are used.
- `method` (String) The name of the index method to use.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/materialized_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ resource "materialize_materialized_view" "simple_materialized_view" {

### Required

- `cluster_name` (String) The cluster to maintain the materialized view.
- `name` (String) The identifier for the materialized view.
- `statement` (String) The SQL statement for the materialized view.

### Optional

- `cluster_name` (String) The cluster to maintain the materialized view. If not specified, defaults to the quickstart cluster.
- `comment` (String) **Private Preview** Comment on an object in the database.
- `database_name` (String) The identifier for the materialized view database. Defaults to `MZ_DATABASE` environment variable if set or `materialize` if environment variable is not set.
- `not_null_assertion` (List of String) **Private Preview** A list of columns for which to create non-null assertions.
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/resource_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ var indexSchema = map[string]*schema.Schema{
"comment": CommentSchema(false),
"obj_name": IdentifierSchema("obj_name", "The name of the source, view, or materialized view on which you want to create an index.", true),
"cluster_name": {
Description: "The cluster to maintain this index. If not specified, defaults to the active cluster.",
Description: "The cluster to maintain this index.",
Type: schema.TypeString,
Optional: true,
Required: true,
ForceNew: true,
},
"method": {
Expand Down
5 changes: 2 additions & 3 deletions pkg/resources/resource_materialized_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ var materializedViewSchema = map[string]*schema.Schema{
"qualified_sql_name": QualifiedNameSchema("materialized view"),
"comment": CommentSchema(false),
"cluster_name": {
Description: "The cluster to maintain the materialized view. If not specified, defaults to the quickstart cluster.",
Description: "The cluster to maintain the materialized view.",
Type: schema.TypeString,
Optional: true,
Computed: true,
Required: true,
},
"not_null_assertion": {
Description: "**Private Preview** A list of columns for which to create non-null assertions.",
Expand Down

0 comments on commit e6cde73

Please sign in to comment.