Skip to content

Commit

Permalink
Merge branch 'main' into promote-features
Browse files Browse the repository at this point in the history
  • Loading branch information
morsapaes authored Dec 4, 2024
2 parents cb50316 + b9c0be4 commit 45a2b7d
Show file tree
Hide file tree
Showing 66 changed files with 2,877 additions and 1,817 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Bug
description: >
A bug in an existing feature. For example, "The `materialize_connection_kafka` resource throws an error when the `topic` attribute is set to an empty string."
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug report against the Materialize Terraform provider! Please fill out the sections below to help us understand and reproduce the issue.
- type: input
id: tf_version
attributes:
label: What version of the Materialize Terraform provider are you using?
description: |
From the command line, run: `terraform version`
placeholder: v0.8.0
validations:
required: true
- type: input
id: tf_cli_version
attributes:
label: What version of the Terraform CLI are you using?
description: |
From the command line, run: `terraform --version`
placeholder: v0.15.0
- type: input
id: mz_version
attributes:
label: What version of Materialize are you using?
description: |
From a SQL client connected to Materialize, run: `SELECT mz_version();`
placeholder: v0.100.0
validations:
required: true
- type: textarea
id: issue
attributes:
label: What is the issue?
description: |
Describe what you expect to happen vs. what actually happens.
If the issue is reproducible, **please share any helpful steps to reproduce it**. A precise set of instructions that trigger the issue greatly increases the likelihood that we will be able to find and fix it quickly!
validations:
required: true
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/02-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Feature
description: Suggest a new feature or improvement for the Materialize Terraform provider
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature! Please provide additional information below to help us understand your request.
- type: textarea
id: feature-request
attributes:
label: Feature request
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/03-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Documentation
description: A request for new or updated documentation for the Materialize Terraform provider. For example, "Add examples for using the `materialize_connection_kafka` resource with different configurations."
labels: [documentation]
body:
- type: markdown
attributes:
value: |
Thanks for your interest in helping us improve the Materialize Terraform provider documentation!
- type: textarea
id: documentation-request
attributes:
label: Documentation Request
description: Please describe the documentation you'd like to see added or updated for the Materialize Terraform provider.
placeholder: |
For example:
- Add examples for using the `materialize_connection_kafka` resource with different configurations.
- Update the documentation for the `materialize_view` resource to include information about comments.
- Create a troubleshooting guide for common issues when using the provider.
validations:
required: true
- type: textarea
id: affected-pages
attributes:
label: Affected Pages
description: |
If available, link any existing provider documentation pages relevant to your documentation change request.
placeholder: |
https://registry.terraform.io/providers/MaterializeInc/materialize/latest/docs/resources/database
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: |
Provide any additional context or information that might be helpful for understanding or implementing this documentation request.
validations:
required: false
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: Community Slack
url: https://materialize.com/s/chat
about: Meet the Materialize community on Slack.
- name: Security reports
url: https://materialize.com/security-disclosure/
about: >
If you've discovered a security issue, please review our responsible
disclosure policy.
16 changes: 15 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,18 @@ jobs:
go-version-file: "go.mod"
cache: true

- run: go test -v -cover ./...
- name: Run Tests
run: |
set -e
retries=3
count=0
until [ $count -ge $retries ]
do
go test -v -cover ./... && break
count=$((count+1))
echo "Retrying tests... Attempt $count of $retries"
done
if [ $count -ge $retries ]; then
echo "Tests failed after $retries attempts."
exit 1
fi
177 changes: 177 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,183 @@

* Remove outdated feature lifecycle annotations for features that are now Generally Available (GA).

## 0.8.11 - 2024-11-13

## Features

* Adding a new `materialize_network_policy` resource and data source [#669](https://github.com/MaterializeInc/terraform-provider-materialize/pull/669).

A network policy allows you to manage access to the system through IP-based rules.

* Example `materialize_network_policy` resource:

```hcl
resource "materialize_network_policy" "office_policy" {
name = "office_access_policy"
rule {
name = "new_york"
action = "allow"
direction = "ingress"
address = "8.2.3.4/28"
}
rule {
name = "minnesota"
action = "allow"
direction = "ingress"
address = "2.3.4.5/32"
}
comment = "Network policy for office locations"
}
```
* Example `materialize_network_policy` data source:
```hcl
data "materialize_network_policy" "all" {}
```
* Added support for the new `CREATENETWORKPOLICY` system privilege:
```hcl
resource "materialize_role" "test" {
name = "test_role"
}
resource "materialize_grant_system_privilege" "role_createnetworkpolicy" {
role_name = materialize_role.test.name
privilege = "CREATENETWORKPOLICY"
}
```
* An initial `default` network policy will be created.
This policy allows open access to the environment and can be altered by a `superuser`.
Use the `ALTER SYSTEM SET network_policy TO 'office_access_policy'` command
or the `materialize_system_parameter` resource to update the default network policy.
```hcl
resource "materialize_system_parameter" "system_parameter" {
name = "network_policy"
value = "office_access_policy"
}
```
## Bug Fixes
* Updated the cluster and cluster replica query builders to skip `DISK` property for `cc` and `C` clusters as this is enabled by default for those sizes [#671](https://github.com/MaterializeInc/terraform-provider-materialize/pull/671)
## Misc
* Upgrade from `pgx` v3 to v4 [#663](https://github.com/MaterializeInc/terraform-provider-materialize/pull/663)
* Routine dependency updates: [#668](https://github.com/MaterializeInc/terraform-provider-materialize/pull/668), [#667](https://github.com/MaterializeInc/terraform-provider-materialize/pull/667)
* Upgraded Go version from `1.22.0` to `1.22.7` for improved performance and security fixes [#669](https://github.com/MaterializeInc/terraform-provider-materialize/pull/669)
* Added `--bootstrap-builtin-analytics-cluster-replica-size` to the Docker compose file to fix failing tests [#671](https://github.com/MaterializeInc/terraform-provider-materialize/pull/671)
## 0.8.10 - 2024-10-7
## Features
* Add support for `partition_by` attribute in `materialize_sink_kafka` [#659](https://github.com/MaterializeInc/terraform-provider-materialize/pull/659)
* The `partition_by` attribute accepts a SQL expression used to partition the data in the Kafka sink. Can only be used with `ENVELOPE UPSERT`.
* Example usage:
```hcl
resource "materialize_sink_kafka" "orders_kafka_sink" {
name = "orders_sink"
kafka_connection {
name = "kafka_connection"
}
topic = "orders_topic"
partition_by = "column_name"
# Additional configuration...
}
```

## Misc

* Set `transaction_isolation` as conneciton option instead of executing a `SET` command [#660](https://github.com/MaterializeInc/terraform-provider-materialize/pull/660)
* Routine dependency updates: [#661](https://github.com/MaterializeInc/terraform-provider-materialize/pull/661)

## 0.8.9 - 2024-09-30

### BugFixes

* Explicitly set `TRANSACTION_ISOLATION` to `STRICT SERIALIZABLE` [#657](https://github.com/MaterializeInc/terraform-provider-materialize/pull/657)
* Fix user not found state status in the `materialize_user` resource [#638](https://github.com/MaterializeInc/terraform-provider-materialize/pull/638)
* Fix Inconsistent Error Handling in `ReadUser` in the `materialize_user` resource [#642](https://github.com/MaterializeInc/terraform-provider-materialize/pull/642)

### Misc

* Update Go version to 1.22 [#650](https://github.com/MaterializeInc/terraform-provider-materialize/pull/650)
* Switched tests to use a stable version of the Rust Frontegg mock service [#653](https://github.com/MaterializeInc/terraform-provider-materialize/pull/653)
* Improve the Cloud Mock Service [#651](https://github.com/MaterializeInc/terraform-provider-materialize/pull/651)
* Disable telemetry in CI [#640](https://github.com/MaterializeInc/terraform-provider-materialize/pull/640)

## 0.8.8 - 2024-08-26

### Features

* Add `wait_until_ready` option to `cluster` resources, which allows graceful cluster reconfiguration (i.e., with no downtime) for clusters with no sources or sinks. [#632](https://github.com/MaterializeInc/terraform-provider-materialize/pull/632)
* Example usage:
```hcl
resource "materialize_cluster" "cluster" {
name = var.mz_cluster
size = "25cc"
wait_until_ready {
enabled = true
timeout = "10m"
on_timeout = "COMMIT"
}
}
```

### Misc

* Unify the cluster alter commands [#628](https://github.com/MaterializeInc/terraform-provider-materialize/pull/628)
* Switched tests to use the Rust Frontegg mock service [#634](https://github.com/MaterializeInc/terraform-provider-materialize/pull/634)


## 0.8.7 - 2024-08-15

### Features

* Add support for AWS IAM authentication in `materialize_connection_kafka` [#627](https://github.com/MaterializeInc/terraform-provider-materialize/pull/627)
* Example usage:
```hcl
# Create an AWS connection for IAM authentication
resource "materialize_connection_aws" "msk_auth" {
name = "aws_msk"
assume_role_arn = "arn:aws:iam::123456789012:role/MaterializeMSK"
}
# Create a Kafka connection using AWS IAM authentication
resource "materialize_connection_kafka" "kafka_msk" {
name = "kafka_msk"
kafka_broker {
broker = "b-1.your-cluster-name.abcdef.c1.kafka.us-east-1.amazonaws.com:9098"
}
security_protocol = "SASL_SSL"
aws_connection {
name = materialize_connection_aws.msk_auth.name
database_name = materialize_connection_aws.msk_auth.database_name
schema_name = materialize_connection_aws.msk_auth.schema_name
}
}
```

### Bug Fixes

* Fix `materialize_connection_aws` read function issues caused by empty internal table [#630](https://github.com/MaterializeInc/terraform-provider-materialize/pull/630)
* Fix duplicate application name in the provider configuration [#626](https://github.com/MaterializeInc/terraform-provider-materialize/pull/626)

### Misc

* Add more information to import docs for all resources [#623](https://github.com/MaterializeInc/terraform-provider-materialize/pull/623)
* Routine dependency updates: [#631](https://github.com/MaterializeInc/terraform-provider-materialize/pull/631)

## 0.8.6 - 2024-07-31

### Features
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To run the acceptance tests which will simulate running Terraform commands you w

```bash
# Start all containers
docker-compose up -d --build
docker compose up -d --build
```

Add the following to your `hosts` file so that the provider can connect to the mock services:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine
FROM golang:1.22-alpine

COPY --from=hashicorp/terraform:1.8.2 /bin/terraform /bin/terraform

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repository contains a Terraform provider for managing resources in a [Mater

* Materialize >= 0.27
* [Terraform](https://www.terraform.io/downloads.html) >= 1.0.3
* (Development) [Go](https://golang.org/doc/install) >= 1.20
* (Development) [Go](https://golang.org/doc/install) >= 1.22

## Installation

Expand Down
Loading

0 comments on commit 45a2b7d

Please sign in to comment.