From eec1c75bb553aad4b06db9cc0f7525fdb2ce63da Mon Sep 17 00:00:00 2001 From: Bobby Iliev Date: Tue, 23 Jul 2024 08:51:55 +0300 Subject: [PATCH] Update to 0.8.5 (#116) --- CHANGELOG.md | 3 ++ .../pulumi-resource-materialize/schema.json | 33 ++++++++++++++++--- provider/go.mod | 2 +- provider/go.sum | 4 +-- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec24ac3..7d7d84c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ CHANGELOG ========= +## 0.3.5 2024-07-23 +Update to Terraform Provider [0.8.5](https://github.com/MaterializeInc/terraform-provider-materialize/releases/tag/v0.8.5). + ## 0.3.4 - 2024-07-16 Update to Terraform Provider [0.8.4](https://github.com/MaterializeInc/terraform-provider-materialize/releases/tag/v0.8.4). diff --git a/provider/cmd/pulumi-resource-materialize/schema.json b/provider/cmd/pulumi-resource-materialize/schema.json index eeea55f..4f8dcf2 100644 --- a/provider/cmd/pulumi-resource-materialize/schema.json +++ b/provider/cmd/pulumi-resource-materialize/schema.json @@ -134,8 +134,12 @@ "enabled": { "type": "boolean" }, - "rehydrationTimeEstimate": { + "hydrationTimeEstimate": { "type": "string" + }, + "rehydrationTimeEstimate": { + "type": "string", + "deprecationMessage": "Use `hydration_time_estimate` instead." } }, "type": "object" @@ -2128,12 +2132,31 @@ "materialize:index/SourceKafkaEnvelopeUpsertOptions:SourceKafkaEnvelopeUpsertOptions": { "properties": { "valueDecodingErrors": { - "type": "string", + "$ref": "#/types/materialize:index/SourceKafkaEnvelopeUpsertOptionsValueDecodingErrors:SourceKafkaEnvelopeUpsertOptionsValueDecodingErrors", "willReplaceOnChanges": true } }, "type": "object" }, + "materialize:index/SourceKafkaEnvelopeUpsertOptionsValueDecodingErrors:SourceKafkaEnvelopeUpsertOptionsValueDecodingErrors": { + "properties": { + "inline": { + "$ref": "#/types/materialize:index/SourceKafkaEnvelopeUpsertOptionsValueDecodingErrorsInline:SourceKafkaEnvelopeUpsertOptionsValueDecodingErrorsInline" + } + }, + "type": "object" + }, + "materialize:index/SourceKafkaEnvelopeUpsertOptionsValueDecodingErrorsInline:SourceKafkaEnvelopeUpsertOptionsValueDecodingErrorsInline": { + "properties": { + "alias": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, "materialize:index/SourceKafkaExposeProgress:SourceKafkaExposeProgress": { "properties": { "databaseName": { @@ -3263,7 +3286,7 @@ } }, "materialize:index/cloudRegion:CloudRegion": { - "description": "The region resource allows you to manage regions in Materialize. When a new region is created, it automatically includes an 'xsmall' quickstart cluster as part of the initialization process. Users are billed for this quickstart cluster from the moment the region is created. To avoid unnecessary charges, you can connect to the new region and drop the quickstart cluster if it is not needed. Please note that disabling a region cannot be achieved directly through this provider. If you need to disable a region, contact Materialize support for assistance. This process ensures that any necessary cleanup and billing adjustments are handled properly.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as materialize from \"@pulumi/materialize\";\n\nconst example = new materialize.CloudRegion(\"example\", {regionId: \"aws/us-east-1\"});\n```\n```python\nimport pulumi\nimport pulumi_materialize as materialize\n\nexample = materialize.CloudRegion(\"example\", region_id=\"aws/us-east-1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Materialize = Pulumi.Materialize;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Materialize.CloudRegion(\"example\", new()\n {\n RegionId = \"aws/us-east-1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-materialize/sdk/go/materialize\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := materialize.NewCloudRegion(ctx, \"example\", \u0026materialize.CloudRegionArgs{\n\t\t\tRegionId: pulumi.String(\"aws/us-east-1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.CloudRegion;\nimport com.pulumi.materialize.CloudRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CloudRegion(\"example\", CloudRegionArgs.builder() \n .regionId(\"aws/us-east-1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: materialize:CloudRegion\n properties:\n regionId: aws/us-east-1\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n\n\n```sh\n $ pulumi import materialize:index/cloudRegion:CloudRegion Regions can be imported using the `terraform import` command\n```\n\n\n\n```sh\n $ pulumi import materialize:index/cloudRegion:CloudRegion example_region aws/us-east-1\n```\n\n ", + "description": "The region resource allows you to manage regions in Materialize. When a new region is created, it automatically includes an 'xsmall' quickstart cluster as part of the initialization process. Users are billed for this quickstart cluster from the moment the region is created. To avoid unnecessary charges, you can connect to the new region and drop the quickstart cluster if it is not needed. Please note that disabling a region cannot be achieved directly through this provider. If you need to disable a region, contact Materialize support for assistance. This process ensures that any necessary cleanup and billing adjustments are handled properly.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as materialize from \"@pulumi/materialize\";\n\nconst example = new materialize.CloudRegion(\"example\", {regionId: \"aws/us-east-1\"});\n```\n```python\nimport pulumi\nimport pulumi_materialize as materialize\n\nexample = materialize.CloudRegion(\"example\", region_id=\"aws/us-east-1\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Materialize = Pulumi.Materialize;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new Materialize.CloudRegion(\"example\", new()\n {\n RegionId = \"aws/us-east-1\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-materialize/sdk/go/materialize\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := materialize.NewCloudRegion(ctx, \"example\", \u0026materialize.CloudRegionArgs{\n\t\t\tRegionId: pulumi.String(\"aws/us-east-1\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.CloudRegion;\nimport com.pulumi.materialize.CloudRegionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new CloudRegion(\"example\", CloudRegionArgs.builder() \n .regionId(\"aws/us-east-1\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: materialize:CloudRegion\n properties:\n regionId: aws/us-east-1\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRegions can be imported using the `aws/` prefix followed by the region name.\n\n```sh\n $ pulumi import materialize:index/cloudRegion:CloudRegion example_region aws/us-east-1\n```\n\n ", "properties": { "enabledAt": { "type": "string", @@ -9344,7 +9367,7 @@ } }, "materialize:index/sourceMysql:SourceMysql": { - "description": "A MySQL source describes a MySQL instance you want Materialize to read data from.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.SourceMysql;\nimport com.pulumi.materialize.SourceMysqlArgs;\nimport com.pulumi.materialize.inputs.SourceMysqlMysqlConnectionArgs;\nimport com.pulumi.materialize.inputs.SourceMysqlTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new SourceMysql(\"test\", SourceMysqlArgs.builder() \n .schemaName(materialize_schema.test().name())\n .databaseName(materialize_database.test().name())\n .clusterName(\"quickstart\")\n .mysqlConnection(SourceMysqlMysqlConnectionArgs.builder()\n .name(materialize_connection_mysql.test().name())\n .build())\n .tables( \n SourceMysqlTableArgs.builder()\n .name(\"shop.mysql_table1\")\n .alias(\"alias_mysql_table1\")\n .build(),\n SourceMysqlTableArgs.builder()\n .name(\"shop.mysql_table2\")\n .alias(\"alias_mysql_table2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: materialize:SourceMysql\n properties:\n schemaName: ${materialize_schema.test.name}\n databaseName: ${materialize_database.test.name}\n clusterName: quickstart\n mysqlConnection:\n name: ${materialize_connection_mysql.test.name}\n tables:\n - name: shop.mysql_table1\n alias: alias_mysql_table1\n - name: shop.mysql_table2\n alias: alias_mysql_table2\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nSources can be imported using the source id\n\n```sh\n $ pulumi import materialize:index/sourceMysql:SourceMysql example_source_mysql \u003cregion\u003e:\u003csource_id\u003e\n```\n\n Source id and information be found in the `mz_catalog.mz_sources` table The region is the region where the database is located (e.g. aws/us-east-1) ", + "description": "A MySQL source describes a MySQL instance you want Materialize to read data from.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as materialize from \"@pulumi/materialize\";\n\nconst test = new materialize.SourceMysql(\"test\", {\n schemaName: materialize_schema.test.name,\n databaseName: materialize_database.test.name,\n clusterName: \"quickstart\",\n mysqlConnection: {\n name: materialize_connection_mysql.test.name,\n },\n tables: [\n {\n upstreamName: \"mysql_table1\",\n upstreamSchemaName: \"shop\",\n name: \"mysql_table1_local\",\n },\n {\n upstreamName: \"mysql_table2\",\n upstreamSchemaName: \"shop\",\n name: \"mysql_table2_local\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_materialize as materialize\n\ntest = materialize.SourceMysql(\"test\",\n schema_name=materialize_schema[\"test\"][\"name\"],\n database_name=materialize_database[\"test\"][\"name\"],\n cluster_name=\"quickstart\",\n mysql_connection=materialize.SourceMysqlMysqlConnectionArgs(\n name=materialize_connection_mysql[\"test\"][\"name\"],\n ),\n tables=[\n materialize.SourceMysqlTableArgs(\n upstream_name=\"mysql_table1\",\n upstream_schema_name=\"shop\",\n name=\"mysql_table1_local\",\n ),\n materialize.SourceMysqlTableArgs(\n upstream_name=\"mysql_table2\",\n upstream_schema_name=\"shop\",\n name=\"mysql_table2_local\",\n ),\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Materialize = Pulumi.Materialize;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new Materialize.SourceMysql(\"test\", new()\n {\n SchemaName = materialize_schema.Test.Name,\n DatabaseName = materialize_database.Test.Name,\n ClusterName = \"quickstart\",\n MysqlConnection = new Materialize.Inputs.SourceMysqlMysqlConnectionArgs\n {\n Name = materialize_connection_mysql.Test.Name,\n },\n Tables = new[]\n {\n new Materialize.Inputs.SourceMysqlTableArgs\n {\n UpstreamName = \"mysql_table1\",\n UpstreamSchemaName = \"shop\",\n Name = \"mysql_table1_local\",\n },\n new Materialize.Inputs.SourceMysqlTableArgs\n {\n UpstreamName = \"mysql_table2\",\n UpstreamSchemaName = \"shop\",\n Name = \"mysql_table2_local\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-materialize/sdk/go/materialize\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := materialize.NewSourceMysql(ctx, \"test\", \u0026materialize.SourceMysqlArgs{\n\t\t\tSchemaName: pulumi.Any(materialize_schema.Test.Name),\n\t\t\tDatabaseName: pulumi.Any(materialize_database.Test.Name),\n\t\t\tClusterName: pulumi.String(\"quickstart\"),\n\t\t\tMysqlConnection: \u0026materialize.SourceMysqlMysqlConnectionArgs{\n\t\t\t\tName: pulumi.Any(materialize_connection_mysql.Test.Name),\n\t\t\t},\n\t\t\tTables: materialize.SourceMysqlTableArray{\n\t\t\t\t\u0026materialize.SourceMysqlTableArgs{\n\t\t\t\t\tUpstreamName: pulumi.String(\"mysql_table1\"),\n\t\t\t\t\tUpstreamSchemaName: pulumi.String(\"shop\"),\n\t\t\t\t\tName: pulumi.String(\"mysql_table1_local\"),\n\t\t\t\t},\n\t\t\t\t\u0026materialize.SourceMysqlTableArgs{\n\t\t\t\t\tUpstreamName: pulumi.String(\"mysql_table2\"),\n\t\t\t\t\tUpstreamSchemaName: pulumi.String(\"shop\"),\n\t\t\t\t\tName: pulumi.String(\"mysql_table2_local\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.SourceMysql;\nimport com.pulumi.materialize.SourceMysqlArgs;\nimport com.pulumi.materialize.inputs.SourceMysqlMysqlConnectionArgs;\nimport com.pulumi.materialize.inputs.SourceMysqlTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new SourceMysql(\"test\", SourceMysqlArgs.builder() \n .schemaName(materialize_schema.test().name())\n .databaseName(materialize_database.test().name())\n .clusterName(\"quickstart\")\n .mysqlConnection(SourceMysqlMysqlConnectionArgs.builder()\n .name(materialize_connection_mysql.test().name())\n .build())\n .tables( \n SourceMysqlTableArgs.builder()\n .upstreamName(\"mysql_table1\")\n .upstreamSchemaName(\"shop\")\n .name(\"mysql_table1_local\")\n .build(),\n SourceMysqlTableArgs.builder()\n .upstreamName(\"mysql_table2\")\n .upstreamSchemaName(\"shop\")\n .name(\"mysql_table2_local\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: materialize:SourceMysql\n properties:\n schemaName: ${materialize_schema.test.name}\n databaseName: ${materialize_database.test.name}\n clusterName: quickstart\n mysqlConnection:\n name: ${materialize_connection_mysql.test.name}\n tables:\n - upstreamName: mysql_table1\n upstreamSchemaName: shop\n name: mysql_table1_local\n - upstreamName: mysql_table2\n upstreamSchemaName: shop\n name: mysql_table2_local\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nSources can be imported using the source id\n\n```sh\n $ pulumi import materialize:index/sourceMysql:SourceMysql example_source_mysql \u003cregion\u003e:\u003csource_id\u003e\n```\n\n Source id and information be found in the `mz_catalog.mz_sources` table The region is the region where the database is located (e.g. aws/us-east-1) ", "properties": { "clusterName": { "type": "string", @@ -9568,7 +9591,7 @@ } }, "materialize:index/sourcePostgres:SourcePostgres": { - "description": "A Postgres source describes a PostgreSQL instance you want Materialize to read data from.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.SourcePostgres;\nimport com.pulumi.materialize.SourcePostgresArgs;\nimport com.pulumi.materialize.inputs.SourcePostgresPostgresConnectionArgs;\nimport com.pulumi.materialize.inputs.SourcePostgresTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleSourcePostgres = new SourcePostgres(\"exampleSourcePostgres\", SourcePostgresArgs.builder() \n .clusterName(\"quickstart\")\n .postgresConnection(SourcePostgresPostgresConnectionArgs.builder()\n .name(\"pg_connection\")\n .build())\n .publication(\"mz_source\")\n .schemaName(\"schema\")\n .tables( \n SourcePostgresTableArgs.builder()\n .alias(\"s1_table_1\")\n .name(\"schema1.table_1\")\n .build(),\n SourcePostgresTableArgs.builder()\n .alias(\"s2_table_1\")\n .name(\"schema2.table_1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleSourcePostgres:\n type: materialize:SourcePostgres\n properties:\n clusterName: quickstart\n postgresConnection:\n name: pg_connection\n publication: mz_source\n schemaName: schema\n tables:\n - alias: s1_table_1\n name: schema1.table_1\n - alias: s2_table_1\n name: schema2.table_1\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nSources can be imported using the source id\n\n```sh\n $ pulumi import materialize:index/sourcePostgres:SourcePostgres example_source_postgres \u003cregion\u003e:\u003csource_id\u003e\n```\n\n Source id and information be found in the `mz_catalog.mz_sources` table The region is the region where the database is located (e.g. aws/us-east-1) ", + "description": "A Postgres source describes a PostgreSQL instance you want Materialize to read data from.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as materialize from \"@pulumi/materialize\";\n\nconst exampleSourcePostgres = new materialize.SourcePostgres(\"exampleSourcePostgres\", {\n clusterName: \"quickstart\",\n postgresConnection: {\n name: \"pg_connection\",\n },\n publication: \"mz_source\",\n schemaName: \"schema\",\n tables: [\n {\n name: \"s1_table1\",\n upstreamName: \"table1\",\n upstreamSchemaName: \"schema1\",\n },\n {\n name: \"s2_table2\",\n upstreamName: \"table2\",\n upstreamSchemaName: \"schema2\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_materialize as materialize\n\nexample_source_postgres = materialize.SourcePostgres(\"exampleSourcePostgres\",\n cluster_name=\"quickstart\",\n postgres_connection=materialize.SourcePostgresPostgresConnectionArgs(\n name=\"pg_connection\",\n ),\n publication=\"mz_source\",\n schema_name=\"schema\",\n tables=[\n materialize.SourcePostgresTableArgs(\n name=\"s1_table1\",\n upstream_name=\"table1\",\n upstream_schema_name=\"schema1\",\n ),\n materialize.SourcePostgresTableArgs(\n name=\"s2_table2\",\n upstream_name=\"table2\",\n upstream_schema_name=\"schema2\",\n ),\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Materialize = Pulumi.Materialize;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleSourcePostgres = new Materialize.SourcePostgres(\"exampleSourcePostgres\", new()\n {\n ClusterName = \"quickstart\",\n PostgresConnection = new Materialize.Inputs.SourcePostgresPostgresConnectionArgs\n {\n Name = \"pg_connection\",\n },\n Publication = \"mz_source\",\n SchemaName = \"schema\",\n Tables = new[]\n {\n new Materialize.Inputs.SourcePostgresTableArgs\n {\n Name = \"s1_table1\",\n UpstreamName = \"table1\",\n UpstreamSchemaName = \"schema1\",\n },\n new Materialize.Inputs.SourcePostgresTableArgs\n {\n Name = \"s2_table2\",\n UpstreamName = \"table2\",\n UpstreamSchemaName = \"schema2\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-materialize/sdk/go/materialize\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := materialize.NewSourcePostgres(ctx, \"exampleSourcePostgres\", \u0026materialize.SourcePostgresArgs{\n\t\t\tClusterName: pulumi.String(\"quickstart\"),\n\t\t\tPostgresConnection: \u0026materialize.SourcePostgresPostgresConnectionArgs{\n\t\t\t\tName: pulumi.String(\"pg_connection\"),\n\t\t\t},\n\t\t\tPublication: pulumi.String(\"mz_source\"),\n\t\t\tSchemaName: pulumi.String(\"schema\"),\n\t\t\tTables: materialize.SourcePostgresTableArray{\n\t\t\t\t\u0026materialize.SourcePostgresTableArgs{\n\t\t\t\t\tName: pulumi.String(\"s1_table1\"),\n\t\t\t\t\tUpstreamName: pulumi.String(\"table1\"),\n\t\t\t\t\tUpstreamSchemaName: pulumi.String(\"schema1\"),\n\t\t\t\t},\n\t\t\t\t\u0026materialize.SourcePostgresTableArgs{\n\t\t\t\t\tName: pulumi.String(\"s2_table2\"),\n\t\t\t\t\tUpstreamName: pulumi.String(\"table2\"),\n\t\t\t\t\tUpstreamSchemaName: pulumi.String(\"schema2\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.materialize.SourcePostgres;\nimport com.pulumi.materialize.SourcePostgresArgs;\nimport com.pulumi.materialize.inputs.SourcePostgresPostgresConnectionArgs;\nimport com.pulumi.materialize.inputs.SourcePostgresTableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var exampleSourcePostgres = new SourcePostgres(\"exampleSourcePostgres\", SourcePostgresArgs.builder() \n .clusterName(\"quickstart\")\n .postgresConnection(SourcePostgresPostgresConnectionArgs.builder()\n .name(\"pg_connection\")\n .build())\n .publication(\"mz_source\")\n .schemaName(\"schema\")\n .tables( \n SourcePostgresTableArgs.builder()\n .name(\"s1_table1\")\n .upstreamName(\"table1\")\n .upstreamSchemaName(\"schema1\")\n .build(),\n SourcePostgresTableArgs.builder()\n .name(\"s2_table2\")\n .upstreamName(\"table2\")\n .upstreamSchemaName(\"schema2\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n exampleSourcePostgres:\n type: materialize:SourcePostgres\n properties:\n clusterName: quickstart\n postgresConnection:\n name: pg_connection\n publication: mz_source\n schemaName: schema\n tables:\n - name: s1_table1\n upstreamName: table1\n upstreamSchemaName: schema1\n - name: s2_table2\n upstreamName: table2\n upstreamSchemaName: schema2\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nSources can be imported using the source id\n\n```sh\n $ pulumi import materialize:index/sourcePostgres:SourcePostgres example_source_postgres \u003cregion\u003e:\u003csource_id\u003e\n```\n\n Source id and information be found in the `mz_catalog.mz_sources` table The region is the region where the database is located (e.g. aws/us-east-1) ", "properties": { "clusterName": { "type": "string", diff --git a/provider/go.mod b/provider/go.mod index 55c285b..6126da1 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -5,7 +5,7 @@ go 1.20 replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10 require ( - github.com/MaterializeInc/terraform-provider-materialize v0.8.4 + github.com/MaterializeInc/terraform-provider-materialize v0.8.5 github.com/pulumi/pulumi-terraform-bridge/v3 v3.59.0 github.com/pulumi/pulumi/sdk/v3 v3.81.0 ) diff --git a/provider/go.sum b/provider/go.sum index a5f9a1c..f6d64f9 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1257,8 +1257,8 @@ github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYr github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/MaterializeInc/terraform-provider-materialize v0.8.4 h1:KbEH7ZBke9TF13m7UFkL2k2aj7ugom7OLCiYWMNdTGU= -github.com/MaterializeInc/terraform-provider-materialize v0.8.4/go.mod h1:sjI7LGjeQGeK7s+nIUfeShsLhU2dwAHim9Cn6o1/9kg= +github.com/MaterializeInc/terraform-provider-materialize v0.8.5 h1:3a1LlZrAsrVptEvaftFfj+4lVCstsHZJ+HZAqP3pGXo= +github.com/MaterializeInc/terraform-provider-materialize v0.8.5/go.mod h1:sjI7LGjeQGeK7s+nIUfeShsLhU2dwAHim9Cn6o1/9kg= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=