From 628ead80fd9ebe8cb61661190f289caaac027e71 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Mon, 28 Oct 2024 18:42:30 +0100 Subject: [PATCH 1/2] make tfgen --- .pulumi-java-gen.version | 2 +- .upgrade-config.yml | 2 +- examples/go.mod | 7 +- examples/go.sum | 14 +- .../cmd/pulumi-resource-cockroach/schema.json | 205 ++++++++++++--- provider/go.mod | 57 ++-- provider/go.sum | 108 ++++---- provider/resources.go | 31 ++- provider/shim/go.mod | 56 +--- provider/shim/go.sum | 244 ++++++------------ sdk/go.mod | 3 +- sdk/go.sum | 6 +- 12 files changed, 376 insertions(+), 359 deletions(-) diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index 7092c7c..92e0c74 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.15.0 \ No newline at end of file +0.16.1 \ No newline at end of file diff --git a/.upgrade-config.yml b/.upgrade-config.yml index 71333d9..9579b1c 100644 --- a/.upgrade-config.yml +++ b/.upgrade-config.yml @@ -3,5 +3,5 @@ --- upstream-provider-name: terraform-provider-cockroach upstream-provider-org: cockroachdb -pulumi-infer-version: true remove-plugins: true +pr-assign: ringods diff --git a/examples/go.mod b/examples/go.mod index c3302a4..9b85a4b 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-xyz/examples go 1.22 -require github.com/pulumi/pulumi/pkg/v3 v3.129.0 +require github.com/pulumi/pulumi/pkg/v3 v3.136.1 require ( cloud.google.com/go v0.112.1 // indirect @@ -122,8 +122,8 @@ require ( github.com/pkg/term v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.9.1 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.129.0 // indirect + github.com/pulumi/esc v0.10.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.136.1 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect @@ -137,7 +137,6 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect diff --git a/examples/go.sum b/examples/go.sum index d9d59af..408d628 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -340,12 +340,12 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= -github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= -github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/pkg/v3 v3.129.0 h1:n4Jd4ctlvw3eqyHglb/yJKDtRqjOvdkCBfG5T+orU30= -github.com/pulumi/pulumi/pkg/v3 v3.129.0/go.mod h1:W3c7JgO064kUH5IfyQMCgmsAr5iwr3PO6KEeIQiO0dY= -github.com/pulumi/pulumi/sdk/v3 v3.129.0 h1:uZpTTwWTx7Mk8UT9FgatzxzArim47vZ6hzNCKvgvX6A= -github.com/pulumi/pulumi/sdk/v3 v3.129.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= +github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= +github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo= +github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -390,8 +390,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= diff --git a/provider/cmd/pulumi-resource-cockroach/schema.json b/provider/cmd/pulumi-resource-cockroach/schema.json index 06ac9f5..33f6031 100644 --- a/provider/cmd/pulumi-resource-cockroach/schema.json +++ b/provider/cmd/pulumi-resource-cockroach/schema.json @@ -381,13 +381,29 @@ }, "cockroach:index/PrivateEndpointServicesService:PrivateEndpointServicesService": { "properties": { + "availabilityZoneIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider.\n" + }, "aws": { - "$ref": "#/types/cockroach:index/PrivateEndpointServicesServiceAws:PrivateEndpointServicesServiceAws" + "$ref": "#/types/cockroach:index/PrivateEndpointServicesServiceAws:PrivateEndpointServicesServiceAws", + "deprecationMessage": "nested aws fields have been moved one level up. These fields will be removed in a future version" }, "cloudProvider": { "type": "string", "description": "Cloud provider associated with this service.\n" }, + "endpointServiceId": { + "type": "string", + "description": "Server side ID of the private endpoint connection.\n" + }, + "name": { + "type": "string", + "description": "Name of the endpoint service.\n" + }, "regionName": { "type": "string", "description": "Cloud provider region code associated with this service.\n" @@ -401,8 +417,11 @@ "language": { "nodejs": { "requiredOutputs": [ + "availabilityZoneIds", "aws", "cloudProvider", + "endpointServiceId", + "name", "regionName", "status" ] @@ -438,11 +457,32 @@ } } }, + "cockroach:index/UserRoleGrantRole:UserRoleGrantRole": { + "properties": { + "resourceId": { + "type": "string", + "description": "ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise.\n" + }, + "resourceType": { + "type": "string", + "description": "Type of resource. Allowed values are:\n * ORGANIZATION\n * CLUSTER\n * FOLDER\n" + }, + "roleName": { + "type": "string", + "description": "Name of the role to grant. Allowed values are:\n * BILLING_COORDINATOR\n * ORG_ADMIN\n * ORG_MEMBER\n * CLUSTER_ADMIN\n * CLUSTER_OPERATOR_WRITER\n * CLUSTER_DEVELOPER\n * CLUSTER_CREATOR\n * FOLDER_ADMIN\n * FOLDER_MOVER\n" + } + }, + "type": "object", + "required": [ + "resourceType", + "roleName" + ] + }, "cockroach:index/UserRoleGrantsRole:UserRoleGrantsRole": { "properties": { "resourceId": { "type": "string", - "description": "ID of the resource. Omit if resource_type is 'ORGANIZATION'.\n" + "description": "ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise.\n" }, "resourceType": { "type": "string", @@ -450,7 +490,7 @@ }, "roleName": { "type": "string", - "description": "Name of the role to grant. Allowed values are:\n * DEVELOPER\n * ADMIN\n * BILLING_COORDINATOR\n * ORG_ADMIN\n * ORG_MEMBER\n * CLUSTER_ADMIN\n * CLUSTER_OPERATOR_WRITER\n * CLUSTER_DEVELOPER\n * CLUSTER_CREATOR\n * FOLDER_ADMIN\n * FOLDER_MOVER\n" + "description": "Name of the role to grant. Allowed values are:\n * BILLING_COORDINATOR\n * ORG_ADMIN\n * ORG_MEMBER\n * CLUSTER_ADMIN\n * CLUSTER_OPERATOR_WRITER\n * CLUSTER_DEVELOPER\n * CLUSTER_CREATOR\n * FOLDER_ADMIN\n * FOLDER_MOVER\n" } }, "type": "object", @@ -649,7 +689,7 @@ }, "resources": { "cockroach:index/allowList:AllowList": { - "description": "List of IP ranges allowed to access the cluster.\n", + "description": "List of IP ranges allowed to access the cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst vpn = new cockroach.AllowList(\"vpn\", {\n name: \"vpn\",\n cidrIp: \"123.123.1.1\",\n cidrMask: 32,\n ui: true,\n sql: true,\n clusterId: staging.id,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nvpn = cockroach.AllowList(\"vpn\",\n name=\"vpn\",\n cidr_ip=\"123.123.1.1\",\n cidr_mask=32,\n ui=True,\n sql=True,\n cluster_id=staging[\"id\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var vpn = new Cockroach.AllowList(\"vpn\", new()\n {\n Name = \"vpn\",\n CidrIp = \"123.123.1.1\",\n CidrMask = 32,\n Ui = true,\n Sql = true,\n ClusterId = staging.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cockroach.NewAllowList(ctx, \"vpn\", \u0026cockroach.AllowListArgs{\n\t\t\tName: pulumi.String(\"vpn\"),\n\t\t\tCidrIp: pulumi.String(\"123.123.1.1\"),\n\t\t\tCidrMask: pulumi.Int(32),\n\t\t\tUi: pulumi.Bool(true),\n\t\t\tSql: pulumi.Bool(true),\n\t\t\tClusterId: pulumi.Any(staging.Id),\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.cockroach.AllowList;\nimport com.pulumi.cockroach.AllowListArgs;\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 vpn = new AllowList(\"vpn\", AllowListArgs.builder()\n .name(\"vpn\")\n .cidrIp(\"123.123.1.1\")\n .cidrMask(32)\n .ui(true)\n .sql(true)\n .clusterId(staging.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n vpn:\n type: cockroach:AllowList\n properties:\n name: vpn\n cidrIp: 123.123.1.1\n cidrMask: 32\n ui: true\n sql: true\n clusterId: ${staging.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003ccluster id\u003e:\u003ccidr ip\u003e/\u003ccidr mask\u003e\n\n```sh\n$ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32\n```\n\n", "properties": { "cidrIp": { "type": "string", @@ -745,7 +785,7 @@ } }, "cockroach:index/apiOidcConfig:ApiOidcConfig": { - "description": "Configuration to allow external OIDC providers to issue tokens for use with CC API.\n", + "description": "Configuration to allow external OIDC providers to issue tokens for use with CC API.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.cockroach.ApiOidcConfig;\nimport com.pulumi.cockroach.ApiOidcConfigArgs;\nimport com.pulumi.cockroach.inputs.ApiOidcConfigIdentityMapArgs;\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 ApiOidcConfig(\"example\", ApiOidcConfigArgs.builder()\n .issuer(\"https://accounts.google.com\")\n .audience(\"test_audience\")\n .jwks(\"{\\\"keys\\\":[{\\\"alg\\\":\\\"RS256\\\",\\\"e\\\":\\\"AQAB\\\",\\\"kid\\\":\\\"test_kid1\\\",\\\"kty\\\":\\\"RSA\\\",\\\"n\\\":\\\"09lq1lCEuteonwDJOhGTDak11ThplZuC9JEWQNdBnBSQwlkJQIE7A7nTBO0xTibcsh2HwYkC-N_Gs1jP4iwN3dRqnu5FwG2ct5mY8KLwJiHzToFC0MKenSFQCy0FviNtOnpiObcUlDvR2NDeNtMl_6SPzcQEt7GUTBBYZgoAxPmOgevki6ZNO6Y86xFqx3y6v8EPwW010AiC60r4AHGCTBhYF4uqmq5JH2UU4dDh9Udc-9LZxlSqPwJvnKDG2GjcnD8TsU3wjfEM_nRmx3dnXsrZUXYfNGtdv5dlHywf5AhkJmTavqcsJkgrNA-PNBghFMcCR816_kCIkCYWLWC5vQ\\\"}]}\")\n .claim(\"sub\")\n .identityMaps( \n ApiOidcConfigIdentityMapArgs.builder()\n .token_identity(\"token_identity\")\n .cc_identity(\"cc_identity\")\n .is_regex(false)\n .build(),\n ApiOidcConfigIdentityMapArgs.builder()\n .token_identity(\"(.*)\")\n .cc_identity(\"\\\\1@example.com\")\n .is_regex(true)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: cockroach:ApiOidcConfig\n properties:\n issuer: https://accounts.google.com\n audience: test_audience\n jwks: '{\"keys\":[{\"alg\":\"RS256\",\"e\":\"AQAB\",\"kid\":\"test_kid1\",\"kty\":\"RSA\",\"n\":\"09lq1lCEuteonwDJOhGTDak11ThplZuC9JEWQNdBnBSQwlkJQIE7A7nTBO0xTibcsh2HwYkC-N_Gs1jP4iwN3dRqnu5FwG2ct5mY8KLwJiHzToFC0MKenSFQCy0FviNtOnpiObcUlDvR2NDeNtMl_6SPzcQEt7GUTBBYZgoAxPmOgevki6ZNO6Y86xFqx3y6v8EPwW010AiC60r4AHGCTBhYF4uqmq5JH2UU4dDh9Udc-9LZxlSqPwJvnKDG2GjcnD8TsU3wjfEM_nRmx3dnXsrZUXYfNGtdv5dlHywf5AhkJmTavqcsJkgrNA-PNBghFMcCR816_kCIkCYWLWC5vQ\"}]}'\n claim: sub\n identityMaps:\n - token_identity: token_identity\n cc_identity: cc_identity\n is_regex: false\n - token_identity: (.*)\n cc_identity: \\1@example.com\n is_regex: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "audience": { "type": "string", @@ -839,7 +879,7 @@ } }, "cockroach:index/caCert:CaCert": { - "description": "Manages client CA certs.\n", + "description": "Manages client CA certs.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\n// The X509 certificate in PEM format.\nconst clientCertificate = config.require(\"clientCertificate\");\nconst prod = new cockroach.CaCert(\"prod\", {\n clusterId: prodCockroachCluster.id,\n x509PemCert: clientCertificate,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\n# The X509 certificate in PEM format.\nclient_certificate = config.require(\"clientCertificate\")\nprod = cockroach.CaCert(\"prod\",\n cluster_id=prod_cockroach_cluster[\"id\"],\n x509_pem_cert=client_certificate)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n // The X509 certificate in PEM format.\n var clientCertificate = config.Require(\"clientCertificate\");\n var prod = new Cockroach.CaCert(\"prod\", new()\n {\n ClusterId = prodCockroachCluster.Id,\n X509PemCert = clientCertificate,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\t// The X509 certificate in PEM format.\n\t\tclientCertificate := cfg.Require(\"clientCertificate\")\n\t\t_, err := cockroach.NewCaCert(ctx, \"prod\", \u0026cockroach.CaCertArgs{\n\t\t\tClusterId: pulumi.Any(prodCockroachCluster.Id),\n\t\t\tX509PemCert: pulumi.String(clientCertificate),\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.cockroach.CaCert;\nimport com.pulumi.cockroach.CaCertArgs;\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 final var config = ctx.config();\n final var clientCertificate = config.get(\"clientCertificate\");\n var prod = new CaCert(\"prod\", CaCertArgs.builder()\n .clusterId(prodCockroachCluster.id())\n .x509PemCert(clientCertificate)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clientCertificate:\n type: string\nresources:\n prod:\n type: cockroach:CaCert\n properties:\n clusterId: ${prodCockroachCluster.id}\n x509PemCert: ${clientCertificate}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "clusterId": { "type": "string", @@ -893,7 +933,7 @@ } }, "cockroach:index/cluster:Cluster": { - "description": "CockroachDB Cloud cluster. Can be Dedicated or Serverless.\n", + "description": "CockroachDB Cloud cluster. Can be Dedicated or Serverless.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.cockroach.Cluster;\nimport com.pulumi.cockroach.ClusterArgs;\nimport com.pulumi.cockroach.inputs.ClusterDedicatedArgs;\nimport com.pulumi.cockroach.inputs.ClusterRegionArgs;\nimport com.pulumi.cockroach.inputs.ClusterServerlessArgs;\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 dedicated = new Cluster(\"dedicated\", ClusterArgs.builder()\n .name(\"cockroach-dedicated\")\n .cloudProvider(\"GCP\")\n .dedicated(ClusterDedicatedArgs.builder()\n .storage_gib(15)\n .machine_type(\"n1-standard-4\")\n .build())\n .regions(ClusterRegionArgs.builder()\n .name(\"us-central1\")\n .node_count(1)\n .build())\n .build());\n\n var serverless = new Cluster(\"serverless\", ClusterArgs.builder()\n .name(\"cockroach-serverless\")\n .cloudProvider(\"GCP\")\n .serverless(ClusterServerlessArgs.builder()\n .spend_limit(1)\n .build())\n .regions(ClusterRegionArgs.builder()\n .name(\"us-east1\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dedicated:\n type: cockroach:Cluster\n properties:\n name: cockroach-dedicated\n cloudProvider: GCP\n dedicated:\n storage_gib: 15\n machine_type: n1-standard-4\n regions:\n - name: us-central1\n node_count: 1\n serverless:\n type: cockroach:Cluster\n properties:\n name: cockroach-serverless\n cloudProvider: GCP\n serverless:\n spend_limit: 1\n regions:\n - name: us-east1\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "accountId": { "type": "string", @@ -1063,7 +1103,7 @@ } }, "cockroach:index/cmek:Cmek": { - "description": "Customer-managed encryption keys (CMEK) resource for a single cluster.\n", + "description": "Customer-managed encryption keys (CMEK) resource for a single cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst dedicated = new cockroach.Cmek(\"dedicated\", {\n clusterId: dedicatedCockroachCluster.id,\n regions: [{\n region: \"us-central-1\",\n key: {\n authPrincipal: \"arn:aws:iam::account:role/role-name-with-path\",\n type: \"AWS_KMS\",\n uri: \"arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\",\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\ndedicated = cockroach.Cmek(\"dedicated\",\n cluster_id=dedicated_cockroach_cluster[\"id\"],\n regions=[{\n \"region\": \"us-central-1\",\n \"key\": {\n \"auth_principal\": \"arn:aws:iam::account:role/role-name-with-path\",\n \"type\": \"AWS_KMS\",\n \"uri\": \"arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\",\n },\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var dedicated = new Cockroach.Cmek(\"dedicated\", new()\n {\n ClusterId = dedicatedCockroachCluster.Id,\n Regions = new[]\n {\n new Cockroach.Inputs.CmekRegionArgs\n {\n Region = \"us-central-1\",\n Key = new Cockroach.Inputs.CmekRegionKeyArgs\n {\n AuthPrincipal = \"arn:aws:iam::account:role/role-name-with-path\",\n Type = \"AWS_KMS\",\n Uri = \"arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\",\n },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cockroach.NewCmek(ctx, \"dedicated\", \u0026cockroach.CmekArgs{\n\t\t\tClusterId: pulumi.Any(dedicatedCockroachCluster.Id),\n\t\t\tRegions: cockroach.CmekRegionArray{\n\t\t\t\t\u0026cockroach.CmekRegionArgs{\n\t\t\t\t\tRegion: pulumi.String(\"us-central-1\"),\n\t\t\t\t\tKey: \u0026cockroach.CmekRegionKeyArgs{\n\t\t\t\t\t\tAuthPrincipal: pulumi.String(\"arn:aws:iam::account:role/role-name-with-path\"),\n\t\t\t\t\t\tType: pulumi.String(\"AWS_KMS\"),\n\t\t\t\t\t\tUri: pulumi.String(\"arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\"),\n\t\t\t\t\t},\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.cockroach.Cmek;\nimport com.pulumi.cockroach.CmekArgs;\nimport com.pulumi.cockroach.inputs.CmekRegionArgs;\nimport com.pulumi.cockroach.inputs.CmekRegionKeyArgs;\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 dedicated = new Cmek(\"dedicated\", CmekArgs.builder()\n .clusterId(dedicatedCockroachCluster.id())\n .regions(CmekRegionArgs.builder()\n .region(\"us-central-1\")\n .key(CmekRegionKeyArgs.builder()\n .authPrincipal(\"arn:aws:iam::account:role/role-name-with-path\")\n .type(\"AWS_KMS\")\n .uri(\"arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\")\n .build())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n dedicated:\n type: cockroach:Cmek\n properties:\n clusterId: ${dedicatedCockroachCluster.id}\n regions:\n - region: us-central-1\n key:\n authPrincipal: arn:aws:iam::account:role/role-name-with-path\n type: AWS_KMS\n uri: arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "additionalRegions": { "type": "array", @@ -1148,7 +1188,7 @@ } }, "cockroach:index/database:Database": { - "description": "CockroachDB database.\n", + "description": "CockroachDB database.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst cockroach = new cockroach.Database(\"cockroach\", {\n name: \"example-database\",\n clusterId: clusterId,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ncockroach = cockroach.Database(\"cockroach\",\n name=\"example-database\",\n cluster_id=cluster_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var cockroach = new Cockroach.Database(\"cockroach\", new()\n {\n Name = \"example-database\",\n ClusterId = clusterId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\t_, err := cockroach.NewDatabase(ctx, \"cockroach\", \u0026cockroach.DatabaseArgs{\n\t\t\tName: pulumi.String(\"example-database\"),\n\t\t\tClusterId: pulumi.String(clusterId),\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.cockroach.Database;\nimport com.pulumi.cockroach.DatabaseArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n var cockroach = new Database(\"cockroach\", DatabaseArgs.builder()\n .name(\"example-database\")\n .clusterId(clusterId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\nresources:\n cockroach:\n type: cockroach:Database\n properties:\n name: example-database\n clusterId: ${clusterId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003ccluster id\u003e:\u003cdatabase name\u003e\n\n```sh\n$ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase\n```\n\n", "properties": { "clusterId": { "type": "string", @@ -1202,7 +1242,7 @@ } }, "cockroach:index/finalizeVersionUpgrade:FinalizeVersionUpgrade": { - "description": "Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade.\n", + "description": "Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst cockroachVersion = config.require(\"cockroachVersion\");\nconst cockroach = new cockroach.FinalizeVersionUpgrade(\"cockroach\", {\n clusterId: clusterId,\n cockroachVersion: cockroachVersion,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ncockroach_version = config.require(\"cockroachVersion\")\ncockroach = cockroach.FinalizeVersionUpgrade(\"cockroach\",\n cluster_id=cluster_id,\n cockroach_version=cockroach_version)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var cockroachVersion = config.Require(\"cockroachVersion\");\n var cockroach = new Cockroach.FinalizeVersionUpgrade(\"cockroach\", new()\n {\n ClusterId = clusterId,\n CockroachVersion = cockroachVersion,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\tcockroachVersion := cfg.Require(\"cockroachVersion\")\n\t\t_, err := cockroach.NewFinalizeVersionUpgrade(ctx, \"cockroach\", \u0026cockroach.FinalizeVersionUpgradeArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tCockroachVersion: pulumi.String(cockroachVersion),\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.cockroach.FinalizeVersionUpgrade;\nimport com.pulumi.cockroach.FinalizeVersionUpgradeArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var cockroachVersion = config.get(\"cockroachVersion\");\n var cockroach = new FinalizeVersionUpgrade(\"cockroach\", FinalizeVersionUpgradeArgs.builder()\n .clusterId(clusterId)\n .cockroachVersion(cockroachVersion)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n cockroachVersion:\n type: string\nresources:\n cockroach:\n type: cockroach:FinalizeVersionUpgrade\n properties:\n clusterId: ${clusterId}\n cockroachVersion: ${cockroachVersion}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "clusterId": { "type": "string", @@ -1247,7 +1287,7 @@ } }, "cockroach:index/folder:Folder": { - "description": "CockroachDB Cloud folder.\n", + "description": "CockroachDB Cloud folder.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst aTeam = new cockroach.Folder(\"a_team\", {\n name: \"a-team\",\n parentId: \"root\",\n});\nconst aTeamDev = new cockroach.Folder(\"a_team_dev\", {\n name: \"dev\",\n parentId: aTeam.id,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\na_team = cockroach.Folder(\"a_team\",\n name=\"a-team\",\n parent_id=\"root\")\na_team_dev = cockroach.Folder(\"a_team_dev\",\n name=\"dev\",\n parent_id=a_team.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var aTeam = new Cockroach.Folder(\"a_team\", new()\n {\n Name = \"a-team\",\n ParentId = \"root\",\n });\n\n var aTeamDev = new Cockroach.Folder(\"a_team_dev\", new()\n {\n Name = \"dev\",\n ParentId = aTeam.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taTeam, err := cockroach.NewFolder(ctx, \"a_team\", \u0026cockroach.FolderArgs{\n\t\t\tName: pulumi.String(\"a-team\"),\n\t\t\tParentId: pulumi.String(\"root\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cockroach.NewFolder(ctx, \"a_team_dev\", \u0026cockroach.FolderArgs{\n\t\t\tName: pulumi.String(\"dev\"),\n\t\t\tParentId: aTeam.ID(),\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.cockroach.Folder;\nimport com.pulumi.cockroach.FolderArgs;\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 aTeam = new Folder(\"aTeam\", FolderArgs.builder()\n .name(\"a-team\")\n .parentId(\"root\")\n .build());\n\n var aTeamDev = new Folder(\"aTeamDev\", FolderArgs.builder()\n .name(\"dev\")\n .parentId(aTeam.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n aTeam:\n type: cockroach:Folder\n name: a_team\n properties:\n name: a-team\n parentId: root\n aTeamDev:\n type: cockroach:Folder\n name: a_team_dev\n properties:\n name: dev\n parentId: ${aTeam.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "name": { "type": "string", @@ -1292,7 +1332,7 @@ } }, "cockroach:index/logExportConfig:LogExportConfig": { - "description": "Log Export configuration for a cluster.\n", + "description": "Log Export configuration for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.cockroach.LogExportConfig;\nimport com.pulumi.cockroach.LogExportConfigArgs;\nimport com.pulumi.cockroach.inputs.LogExportConfigGroupArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var authPrincipal = config.get(\"authPrincipal\");\n var example = new LogExportConfig(\"example\", LogExportConfigArgs.builder()\n .clusterId(clusterId)\n .authPrincipal(authPrincipal)\n .logName(\"example\")\n .type(\"GCP_CLOUD_LOGGING\")\n .redact(true)\n .groups( \n LogExportConfigGroupArgs.builder()\n .log_name(\"sql\")\n .channels( \n \"SQL_SCHEMA\",\n \"SQL_EXEC\")\n .redact(false)\n .build(),\n LogExportConfigGroupArgs.builder()\n .log_name(\"devops\")\n .channels( \n \"OPS\",\n \"HEALTH\",\n \"STORAGE\")\n .min_level(\"WARNING\")\n .build())\n .omittedChannels(\"SQL_PERF\")\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n authPrincipal:\n type: string\nresources:\n example:\n type: cockroach:LogExportConfig\n properties:\n clusterId: ${clusterId}\n authPrincipal: ${authPrincipal}\n logName: example\n type: GCP_CLOUD_LOGGING\n redact: true\n groups:\n - log_name: sql\n channels:\n - SQL_SCHEMA\n - SQL_EXEC\n redact: false\n - log_name: devops\n channels:\n - OPS\n - HEALTH\n - STORAGE\n min_level: WARNING\n omittedChannels:\n - SQL_PERF\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "authPrincipal": { "type": "string", @@ -1465,7 +1505,7 @@ } }, "cockroach:index/maintenanceWindow:MaintenanceWindow": { - "description": "Maintenance window configuration for a cluster.\n", + "description": "Maintenance window configuration for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst offsetDuration = config.getNumber(\"offsetDuration\") || 172800;\nconst windowDuration = config.getNumber(\"windowDuration\") || 21600;\nconst example = new cockroach.MaintenanceWindow(\"example\", {\n clusterId: clusterId,\n offsetDuration: offsetDuration,\n windowDuration: windowDuration,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\noffset_duration = config.get_float(\"offsetDuration\")\nif offset_duration is None:\n offset_duration = 172800\nwindow_duration = config.get_float(\"windowDuration\")\nif window_duration is None:\n window_duration = 21600\nexample = cockroach.MaintenanceWindow(\"example\",\n cluster_id=cluster_id,\n offset_duration=offset_duration,\n window_duration=window_duration)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var offsetDuration = config.GetDouble(\"offsetDuration\") ?? 172800;\n var windowDuration = config.GetDouble(\"windowDuration\") ?? 21600;\n var example = new Cockroach.MaintenanceWindow(\"example\", new()\n {\n ClusterId = clusterId,\n OffsetDuration = offsetDuration,\n WindowDuration = windowDuration,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\toffsetDuration := float64(172800)\n\t\tif param := cfg.GetFloat64(\"offsetDuration\"); param != 0 {\n\t\t\toffsetDuration = param\n\t\t}\n\t\twindowDuration := float64(21600)\n\t\tif param := cfg.GetFloat64(\"windowDuration\"); param != 0 {\n\t\t\twindowDuration = param\n\t\t}\n\t\t_, err := cockroach.NewMaintenanceWindow(ctx, \"example\", \u0026cockroach.MaintenanceWindowArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tOffsetDuration: pulumi.Float64(offsetDuration),\n\t\t\tWindowDuration: pulumi.Float64(windowDuration),\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.cockroach.MaintenanceWindow;\nimport com.pulumi.cockroach.MaintenanceWindowArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var offsetDuration = config.get(\"offsetDuration\").orElse(172800);\n final var windowDuration = config.get(\"windowDuration\").orElse(21600);\n var example = new MaintenanceWindow(\"example\", MaintenanceWindowArgs.builder()\n .clusterId(clusterId)\n .offsetDuration(offsetDuration)\n .windowDuration(windowDuration)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n offsetDuration:\n type: number\n default: 172800\n windowDuration:\n type: number\n default: 21600\nresources:\n example:\n type: cockroach:MaintenanceWindow\n properties:\n clusterId: ${clusterId}\n offsetDuration: ${offsetDuration}\n windowDuration: ${windowDuration}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "clusterId": { "type": "string", @@ -1524,7 +1564,7 @@ } }, "cockroach:index/metricExportCloudwatchConfig:MetricExportCloudwatchConfig": { - "description": "Amazon CloudWatch metric export configuration for a cluster.\n", + "description": "Amazon CloudWatch metric export configuration for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst roleArn = config.require(\"roleArn\");\nconst logGroupName = config.require(\"logGroupName\");\nconst awsRegion = config.require(\"awsRegion\");\nconst example = new cockroach.MetricExportCloudwatchConfig(\"example\", {\n clusterId: clusterId,\n roleArn: roleArn,\n logGroupName: logGroupName,\n targetRegion: awsRegion,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\nrole_arn = config.require(\"roleArn\")\nlog_group_name = config.require(\"logGroupName\")\naws_region = config.require(\"awsRegion\")\nexample = cockroach.MetricExportCloudwatchConfig(\"example\",\n cluster_id=cluster_id,\n role_arn=role_arn,\n log_group_name=log_group_name,\n target_region=aws_region)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var roleArn = config.Require(\"roleArn\");\n var logGroupName = config.Require(\"logGroupName\");\n var awsRegion = config.Require(\"awsRegion\");\n var example = new Cockroach.MetricExportCloudwatchConfig(\"example\", new()\n {\n ClusterId = clusterId,\n RoleArn = roleArn,\n LogGroupName = logGroupName,\n TargetRegion = awsRegion,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\troleArn := cfg.Require(\"roleArn\")\n\t\tlogGroupName := cfg.Require(\"logGroupName\")\n\t\tawsRegion := cfg.Require(\"awsRegion\")\n\t\t_, err := cockroach.NewMetricExportCloudwatchConfig(ctx, \"example\", \u0026cockroach.MetricExportCloudwatchConfigArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tRoleArn: pulumi.String(roleArn),\n\t\t\tLogGroupName: pulumi.String(logGroupName),\n\t\t\tTargetRegion: pulumi.String(awsRegion),\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.cockroach.MetricExportCloudwatchConfig;\nimport com.pulumi.cockroach.MetricExportCloudwatchConfigArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var roleArn = config.get(\"roleArn\");\n final var logGroupName = config.get(\"logGroupName\");\n final var awsRegion = config.get(\"awsRegion\");\n var example = new MetricExportCloudwatchConfig(\"example\", MetricExportCloudwatchConfigArgs.builder()\n .clusterId(clusterId)\n .roleArn(roleArn)\n .logGroupName(logGroupName)\n .targetRegion(awsRegion)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n roleArn:\n type: string\n logGroupName:\n type: string\n awsRegion:\n type: string\nresources:\n example:\n type: cockroach:MetricExportCloudwatchConfig\n properties:\n clusterId: ${clusterId}\n roleArn: ${roleArn}\n logGroupName: ${logGroupName}\n targetRegion: ${awsRegion}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "clusterId": { "type": "string", @@ -1613,7 +1653,7 @@ } }, "cockroach:index/metricExportDatadogConfig:MetricExportDatadogConfig": { - "description": "DataDog metric export configuration for a cluster.\n", + "description": "DataDog metric export configuration for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst datadogSite = config.require(\"datadogSite\");\nconst datadogApiKey = config.require(\"datadogApiKey\");\nconst example = new cockroach.MetricExportDatadogConfig(\"example\", {\n clusterId: clusterId,\n site: datadogSite,\n apiKey: datadogApiKey,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ndatadog_site = config.require(\"datadogSite\")\ndatadog_api_key = config.require(\"datadogApiKey\")\nexample = cockroach.MetricExportDatadogConfig(\"example\",\n cluster_id=cluster_id,\n site=datadog_site,\n api_key=datadog_api_key)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var datadogSite = config.Require(\"datadogSite\");\n var datadogApiKey = config.Require(\"datadogApiKey\");\n var example = new Cockroach.MetricExportDatadogConfig(\"example\", new()\n {\n ClusterId = clusterId,\n Site = datadogSite,\n ApiKey = datadogApiKey,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\tdatadogSite := cfg.Require(\"datadogSite\")\n\t\tdatadogApiKey := cfg.Require(\"datadogApiKey\")\n\t\t_, err := cockroach.NewMetricExportDatadogConfig(ctx, \"example\", \u0026cockroach.MetricExportDatadogConfigArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tSite: pulumi.String(datadogSite),\n\t\t\tApiKey: pulumi.String(datadogApiKey),\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.cockroach.MetricExportDatadogConfig;\nimport com.pulumi.cockroach.MetricExportDatadogConfigArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var datadogSite = config.get(\"datadogSite\");\n final var datadogApiKey = config.get(\"datadogApiKey\");\n var example = new MetricExportDatadogConfig(\"example\", MetricExportDatadogConfigArgs.builder()\n .clusterId(clusterId)\n .site(datadogSite)\n .apiKey(datadogApiKey)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n datadogSite:\n type: string\n datadogApiKey:\n type: string\nresources:\n example:\n type: cockroach:MetricExportDatadogConfig\n properties:\n clusterId: ${clusterId}\n site: ${datadogSite}\n apiKey: ${datadogApiKey}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { "apiKey": { "type": "string", @@ -1693,7 +1733,7 @@ } }, "cockroach:index/privateEndpointConnection:PrivateEndpointConnection": { - "description": "AWS PrivateLink Endpoint Connection.\n", + "description": "Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network.\n\n## Import\n\nformat: \u003ccluster id\u003e:\u003cconnection id\u003e\n\n```sh\n$ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc\n```\n\n", "properties": { "cloudProvider": { "type": "string", @@ -1704,7 +1744,7 @@ }, "endpointId": { "type": "string", - "description": "Client side ID of the PrivateLink connection.\n" + "description": "Client side ID of the Private Endpoint Connection.\n" }, "regionName": { "type": "string", @@ -1712,7 +1752,7 @@ }, "serviceId": { "type": "string", - "description": "Server side ID of the PrivateLink connection.\n" + "description": "Server side ID of the Private Endpoint Connection.\n" } }, "required": [ @@ -1728,7 +1768,7 @@ }, "endpointId": { "type": "string", - "description": "Client side ID of the PrivateLink connection.\n" + "description": "Client side ID of the Private Endpoint Connection.\n" } }, "requiredInputs": [ @@ -1747,7 +1787,7 @@ }, "endpointId": { "type": "string", - "description": "Client side ID of the PrivateLink connection.\n" + "description": "Client side ID of the Private Endpoint Connection.\n" }, "regionName": { "type": "string", @@ -1755,14 +1795,14 @@ }, "serviceId": { "type": "string", - "description": "Server side ID of the PrivateLink connection.\n" + "description": "Server side ID of the Private Endpoint Connection.\n" } }, "type": "object" } }, "cockroach:index/privateEndpointServices:PrivateEndpointServices": { - "description": "PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP).\n", + "description": "PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst cockroach = new cockroach.PrivateEndpointServices(\"cockroach\", {clusterId: clusterId});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ncockroach = cockroach.PrivateEndpointServices(\"cockroach\", cluster_id=cluster_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var cockroach = new Cockroach.PrivateEndpointServices(\"cockroach\", new()\n {\n ClusterId = clusterId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\t_, err := cockroach.NewPrivateEndpointServices(ctx, \"cockroach\", \u0026cockroach.PrivateEndpointServicesArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\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.cockroach.PrivateEndpointServices;\nimport com.pulumi.cockroach.PrivateEndpointServicesArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n var cockroach = new PrivateEndpointServices(\"cockroach\", PrivateEndpointServicesArgs.builder()\n .clusterId(clusterId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\nresources:\n cockroach:\n type: cockroach:PrivateEndpointServices\n properties:\n clusterId: ${clusterId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003ccluster id\u003e\n\n```sh\n$ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d\n```\n\n", "properties": { "clusterId": { "type": "string" @@ -1803,7 +1843,7 @@ } }, "cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner": { - "description": "Private Endpoint Trusted Owner.\n", + "description": "Private Endpoint Trusted Owner.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst example = new cockroach.PrivateEndpointTrustedOwner(\"example\", {\n clusterId: clusterId,\n type: \"AWS_ACCOUNT_ID\",\n externalOwnerId: \"012345678901\",\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\nexample = cockroach.PrivateEndpointTrustedOwner(\"example\",\n cluster_id=cluster_id,\n type=\"AWS_ACCOUNT_ID\",\n external_owner_id=\"012345678901\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var example = new Cockroach.PrivateEndpointTrustedOwner(\"example\", new()\n {\n ClusterId = clusterId,\n Type = \"AWS_ACCOUNT_ID\",\n ExternalOwnerId = \"012345678901\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\t_, err := cockroach.NewPrivateEndpointTrustedOwner(ctx, \"example\", \u0026cockroach.PrivateEndpointTrustedOwnerArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tType: pulumi.String(\"AWS_ACCOUNT_ID\"),\n\t\t\tExternalOwnerId: pulumi.String(\"012345678901\"),\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.cockroach.PrivateEndpointTrustedOwner;\nimport com.pulumi.cockroach.PrivateEndpointTrustedOwnerArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n var example = new PrivateEndpointTrustedOwner(\"example\", PrivateEndpointTrustedOwnerArgs.builder()\n .clusterId(clusterId)\n .type(\"AWS_ACCOUNT_ID\")\n .externalOwnerId(\"012345678901\")\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\nresources:\n example:\n type: cockroach:PrivateEndpointTrustedOwner\n properties:\n clusterId: ${clusterId}\n type: AWS_ACCOUNT_ID\n externalOwnerId: '012345678901'\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003ccluster id\u003e:\u003cowner id\u003e\n\n```sh\n$ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49\n```\n\n", "properties": { "clusterId": { "type": "string", @@ -1871,7 +1911,7 @@ } }, "cockroach:index/sqlUser:SqlUser": { - "description": "CockroachDB SQL user.\n", + "description": "CockroachDB SQL user.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst sqlUserPassword = config.require(\"sqlUserPassword\");\nconst cockroach = new cockroach.SqlUser(\"cockroach\", {\n name: \"example-sql-user\",\n password: sqlUserPassword,\n clusterId: clusterId,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\nsql_user_password = config.require(\"sqlUserPassword\")\ncockroach = cockroach.SqlUser(\"cockroach\",\n name=\"example-sql-user\",\n password=sql_user_password,\n cluster_id=cluster_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var sqlUserPassword = config.Require(\"sqlUserPassword\");\n var cockroach = new Cockroach.SqlUser(\"cockroach\", new()\n {\n Name = \"example-sql-user\",\n Password = sqlUserPassword,\n ClusterId = clusterId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\tsqlUserPassword := cfg.Require(\"sqlUserPassword\")\n\t\t_, err := cockroach.NewSqlUser(ctx, \"cockroach\", \u0026cockroach.SqlUserArgs{\n\t\t\tName: pulumi.String(\"example-sql-user\"),\n\t\t\tPassword: pulumi.String(sqlUserPassword),\n\t\t\tClusterId: pulumi.String(clusterId),\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.cockroach.SqlUser;\nimport com.pulumi.cockroach.SqlUserArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var sqlUserPassword = config.get(\"sqlUserPassword\");\n var cockroach = new SqlUser(\"cockroach\", SqlUserArgs.builder()\n .name(\"example-sql-user\")\n .password(sqlUserPassword)\n .clusterId(clusterId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n # Remember that even variables marked sensitive will show up\n # in the Terraform state file. Always follow best practices\n # when managing sensitive info.\n # https://developer.hashicorp.com/terraform/tutorials/configuration-language/sensitive-variables#sensitive-values-in-state\n sqlUserPassword:\n type: string\nresources:\n cockroach:\n type: cockroach:SqlUser\n properties:\n name: example-sql-user\n password: ${sqlUserPassword}\n clusterId: ${clusterId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003ccluster id\u003e:\u003csql user name\u003e\n\n```sh\n$ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill\n```\n\n", "properties": { "clusterId": { "type": "string" @@ -1924,8 +1964,50 @@ "type": "object" } }, + "cockroach:index/userRoleGrant:UserRoleGrant": { + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.cockroach.UserRoleGrant;\nimport com.pulumi.cockroach.UserRoleGrantArgs;\nimport com.pulumi.cockroach.inputs.UserRoleGrantRoleArgs;\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 final var config = ctx.config();\n final var userId = config.get(\"userId\");\n var adminGrant = new UserRoleGrant(\"adminGrant\", UserRoleGrantArgs.builder()\n .userId(userId)\n .role(UserRoleGrantRoleArgs.builder()\n .role_name(\"CLUSTER_ADMIN\")\n .resource_type(\"CLUSTER\")\n .resource_id(example.id())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n userId:\n type: string\nresources:\n adminGrant:\n type: cockroach:UserRoleGrant\n name: admin_grant\n properties:\n userId: ${userId}\n role:\n role_name: CLUSTER_ADMIN\n resource_type: CLUSTER\n resource_id: ${example.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nCluster and folder level role grants can be imported using:\n\n\u003cuser_id\u003e,\u003crole_name\u003e,\u003cresource_type\u003e,\u003cresource_id\u003e\n\n```sh\n$ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831\n```\n\nOrganization level grants can omit the resource_id\n\n```sh\n$ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION\n```\n\n", + "properties": { + "role": { + "$ref": "#/types/cockroach:index/UserRoleGrantRole:UserRoleGrantRole" + }, + "userId": { + "type": "string", + "description": "ID of the user to grant these roles to.\n" + } + }, + "required": [ + "role", + "userId" + ], + "inputProperties": { + "role": { + "$ref": "#/types/cockroach:index/UserRoleGrantRole:UserRoleGrantRole" + }, + "userId": { + "type": "string", + "description": "ID of the user to grant these roles to.\n" + } + }, + "requiredInputs": [ + "role", + "userId" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering UserRoleGrant resources.\n", + "properties": { + "role": { + "$ref": "#/types/cockroach:index/UserRoleGrantRole:UserRoleGrantRole" + }, + "userId": { + "type": "string", + "description": "ID of the user to grant these roles to.\n" + } + }, + "type": "object" + } + }, "cockroach:index/userRoleGrants:UserRoleGrants": { - "description": "Role grants for a single user.\n", + "description": "## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.cockroach.UserRoleGrants;\nimport com.pulumi.cockroach.UserRoleGrantsArgs;\nimport com.pulumi.cockroach.inputs.UserRoleGrantsRoleArgs;\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 final var config = ctx.config();\n final var userId = config.get(\"userId\");\n var cockroach = new UserRoleGrants(\"cockroach\", UserRoleGrantsArgs.builder()\n .userId(userId)\n .roles( \n UserRoleGrantsRoleArgs.builder()\n .role_name(\"ORG_ADMIN\")\n .resource_type(\"ORGANIZATION\")\n .resource_id(\"\")\n .build(),\n UserRoleGrantsRoleArgs.builder()\n .role_name(\"CLUSTER_ADMIN\")\n .resource_type(\"CLUSTER\")\n .resource_id(prod.id())\n .build(),\n UserRoleGrantsRoleArgs.builder()\n .role_name(\"FOLDER_ADMIN\")\n .resource_type(\"FOLDER\")\n .resource_id(dev.id())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n userId:\n type: string\nresources:\n cockroach:\n type: cockroach:UserRoleGrants\n properties:\n userId: ${userId}\n roles:\n - role_name: ORG_ADMIN\n resource_type: ORGANIZATION\n resource_id:\n - role_name: CLUSTER_ADMIN\n resource_type: CLUSTER\n resource_id: ${prod.id}\n - role_name: FOLDER_ADMIN\n resource_type: FOLDER\n resource_id: ${dev.id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nformat: \u003cuser id\u003e\n\n```sh\n$ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d\n```\n\n", "properties": { "roles": { "type": "array", @@ -1976,28 +2058,42 @@ } }, "cockroach:index/versionDeferral:VersionDeferral": { - "description": "Configure minor version upgrade deferral for a cluster.\n", + "description": "Configure minor version upgrade deferral for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumiverse/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst offsetDuration = config.get(\"offsetDuration\") || \"FIXED_DEFERRAL\";\nconst example = new cockroach.VersionDeferral(\"example\", {\n clusterId: clusterId,\n deferralPolicy: offsetDuration,\n});\n```\n```python\nimport pulumi\nimport pulumiverse_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\noffset_duration = config.get(\"offsetDuration\")\nif offset_duration is None:\n offset_duration = \"FIXED_DEFERRAL\"\nexample = cockroach.VersionDeferral(\"example\",\n cluster_id=cluster_id,\n deferral_policy=offset_duration)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumiverse.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var offsetDuration = config.Get(\"offsetDuration\") ?? \"FIXED_DEFERRAL\";\n var example = new Cockroach.VersionDeferral(\"example\", new()\n {\n ClusterId = clusterId,\n DeferralPolicy = offsetDuration,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\toffsetDuration := \"FIXED_DEFERRAL\"\n\t\tif param := cfg.Get(\"offsetDuration\"); param != \"\" {\n\t\t\toffsetDuration = param\n\t\t}\n\t\t_, err := cockroach.NewVersionDeferral(ctx, \"example\", \u0026cockroach.VersionDeferralArgs{\n\t\t\tClusterId: pulumi.String(clusterId),\n\t\t\tDeferralPolicy: pulumi.String(offsetDuration),\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.cockroach.VersionDeferral;\nimport com.pulumi.cockroach.VersionDeferralArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var offsetDuration = config.get(\"offsetDuration\").orElse(\"FIXED_DEFERRAL\");\n var example = new VersionDeferral(\"example\", VersionDeferralArgs.builder()\n .clusterId(clusterId)\n .deferralPolicy(offsetDuration)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n offsetDuration:\n type: string\n default: FIXED_DEFERRAL\nresources:\n example:\n type: cockroach:VersionDeferral\n properties:\n clusterId: ${clusterId}\n deferralPolicy: ${offsetDuration}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { + "clusterId": { + "type": "string", + "description": "Cluster ID.\n" + }, "deferralPolicy": { "type": "string", "description": "The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately.\n" } }, "required": [ - "deferralPolicy" + "deferralPolicy", + "clusterId" ], "inputProperties": { + "clusterId": { + "type": "string", + "description": "Cluster ID.\n" + }, "deferralPolicy": { "type": "string", "description": "The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately.\n" } }, "requiredInputs": [ - "deferralPolicy" + "deferralPolicy", + "clusterId" ], "stateInputs": { "description": "Input properties used for looking up and filtering VersionDeferral resources.\n", "properties": { + "clusterId": { + "type": "string", + "description": "Cluster ID.\n" + }, "deferralPolicy": { "type": "string", "description": "The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately.\n" @@ -2009,7 +2105,7 @@ }, "functions": { "cockroach:index/getClusterCert:getClusterCert": { - "description": "TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/\u003ccluster name\u003e-ca.crt` on MacOS or Linux, or `$env:appdata\\CockroachCloud\\certs\\\u003ccluster name\u003e-ca.crt` on Windows. \n\nServerless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\\postgresql\\root.crt` on Windows.\n", + "description": "TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/\u003ccluster name\u003e-ca.crt` on MacOS or Linux, or `$env:appdata\\CockroachCloud\\certs\\\u003ccluster name\u003e-ca.crt` on Windows. \n\nServerless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\\postgresql\\root.crt` on Windows.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst cockroach = cockroach.getClusterCert({\n id: clusterId,\n});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ncockroach = cockroach.get_cluster_cert(id=cluster_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var cockroach = Cockroach.GetClusterCert.Invoke(new()\n {\n Id = clusterId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\t_, err := cockroach.GetClusterCert(ctx, \u0026cockroach.GetClusterCertArgs{\n\t\t\tId: clusterId,\n\t\t}, nil)\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.cockroach.CockroachFunctions;\nimport com.pulumi.cockroach.inputs.GetClusterCertArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var cockroach = CockroachFunctions.getClusterCert(GetClusterCertArgs.builder()\n .id(clusterId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\nvariables:\n cockroach:\n fn::invoke:\n Function: cockroach:getClusterCert\n Arguments:\n id: ${clusterId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getClusterCert.\n", "properties": { @@ -2043,7 +2139,7 @@ } }, "cockroach:index/getCockroachCluster:getCockroachCluster": { - "description": "CockroachDB Cloud cluster. Can be Dedicated or Serverless.\n", + "description": "CockroachDB Cloud cluster. Can be Dedicated or Serverless.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst cockroach = cockroach.getCockroachCluster({\n id: clusterId,\n});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\ncockroach = cockroach.get_cockroach_cluster(id=cluster_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var cockroach = Cockroach.GetCockroachCluster.Invoke(new()\n {\n Id = clusterId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\t_, err := cockroach.GetCockroachCluster(ctx, \u0026cockroach.GetCockroachClusterArgs{\n\t\t\tId: clusterId,\n\t\t}, nil)\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.cockroach.CockroachFunctions;\nimport com.pulumi.cockroach.inputs.GetCockroachClusterArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var cockroach = CockroachFunctions.getCockroachCluster(GetCockroachClusterArgs.builder()\n .id(clusterId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\nvariables:\n cockroach:\n fn::invoke:\n Function: cockroach:getCockroachCluster\n Arguments:\n id: ${clusterId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getCockroachCluster.\n", "properties": { @@ -2125,7 +2221,7 @@ } }, "cockroach:index/getConnectionString:getConnectionString": { - "description": "Generic connection string for a cluster.\n", + "description": "Generic connection string for a cluster.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst config = new pulumi.Config();\nconst clusterId = config.require(\"clusterId\");\nconst sqlUserName = config.require(\"sqlUserName\");\nconst sqlUserPassword = config.require(\"sqlUserPassword\");\nconst database = config.require(\"database\");\nconst os = config.require(\"os\");\nconst cockroach = cockroach.getConnectionString({\n id: clusterId,\n sqlUser: sqlUserName,\n password: sqlUserPassword,\n database: database,\n os: os,\n});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nconfig = pulumi.Config()\ncluster_id = config.require(\"clusterId\")\nsql_user_name = config.require(\"sqlUserName\")\nsql_user_password = config.require(\"sqlUserPassword\")\ndatabase = config.require(\"database\")\nos = config.require(\"os\")\ncockroach = cockroach.get_connection_string(id=cluster_id,\n sql_user=sql_user_name,\n password=sql_user_password,\n database=database,\n os=os)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var clusterId = config.Require(\"clusterId\");\n var sqlUserName = config.Require(\"sqlUserName\");\n var sqlUserPassword = config.Require(\"sqlUserPassword\");\n var database = config.Require(\"database\");\n var os = config.Require(\"os\");\n var cockroach = Cockroach.GetConnectionString.Invoke(new()\n {\n Id = clusterId,\n SqlUser = sqlUserName,\n Password = sqlUserPassword,\n Database = database,\n Os = os,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tclusterId := cfg.Require(\"clusterId\")\n\t\tsqlUserName := cfg.Require(\"sqlUserName\")\n\t\tsqlUserPassword := cfg.Require(\"sqlUserPassword\")\n\t\tdatabase := cfg.Require(\"database\")\n\t\tos := cfg.Require(\"os\")\n\t\t_, err := cockroach.GetConnectionString(ctx, \u0026cockroach.GetConnectionStringArgs{\n\t\t\tId: clusterId,\n\t\t\tSqlUser: pulumi.StringRef(sqlUserName),\n\t\t\tPassword: pulumi.StringRef(sqlUserPassword),\n\t\t\tDatabase: pulumi.StringRef(database),\n\t\t\tOs: pulumi.StringRef(os),\n\t\t}, nil)\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.cockroach.CockroachFunctions;\nimport com.pulumi.cockroach.inputs.GetConnectionStringArgs;\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 final var config = ctx.config();\n final var clusterId = config.get(\"clusterId\");\n final var sqlUserName = config.get(\"sqlUserName\");\n final var sqlUserPassword = config.get(\"sqlUserPassword\");\n final var database = config.get(\"database\");\n final var os = config.get(\"os\");\n final var cockroach = CockroachFunctions.getConnectionString(GetConnectionStringArgs.builder()\n .id(clusterId)\n .sqlUser(sqlUserName)\n .password(sqlUserPassword)\n .database(database)\n .os(os)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n clusterId:\n type: string\n sqlUserName:\n type: string\n sqlUserPassword:\n type: string\n database:\n type: string\n os:\n type: string\nvariables:\n cockroach:\n fn::invoke:\n Function: cockroach:getConnectionString\n Arguments:\n id: ${clusterId}\n sqlUser: ${sqlUserName}\n password: ${sqlUserPassword}\n database: ${database}\n os: ${os}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getConnectionString.\n", "properties": { @@ -2187,8 +2283,51 @@ "type": "object" } }, + "cockroach:index/getFolder:getFolder": { + "description": "A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst config = new pulumi.Config();\nconst prodFolderId = config.require(\"prodFolderId\");\nconst team1 = cockroach.getFolder({\n path: \"/prod/team1\",\n});\nconst prod = cockroach.getFolder({\n id: prodFolderId,\n});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nconfig = pulumi.Config()\nprod_folder_id = config.require(\"prodFolderId\")\nteam1 = cockroach.get_folder(path=\"/prod/team1\")\nprod = cockroach.get_folder(id=prod_folder_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var prodFolderId = config.Require(\"prodFolderId\");\n var team1 = Cockroach.GetFolder.Invoke(new()\n {\n Path = \"/prod/team1\",\n });\n\n var prod = Cockroach.GetFolder.Invoke(new()\n {\n Id = prodFolderId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\tprodFolderId := cfg.Require(\"prodFolderId\")\n\t\t_, err := cockroach.LookupFolder(ctx, \u0026cockroach.LookupFolderArgs{\n\t\t\tPath: pulumi.StringRef(\"/prod/team1\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = cockroach.LookupFolder(ctx, \u0026cockroach.LookupFolderArgs{\n\t\t\tId: pulumi.StringRef(prodFolderId),\n\t\t}, nil)\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.cockroach.CockroachFunctions;\nimport com.pulumi.cockroach.inputs.GetFolderArgs;\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 final var config = ctx.config();\n final var prodFolderId = config.get(\"prodFolderId\");\n final var team1 = CockroachFunctions.getFolder(GetFolderArgs.builder()\n .path(\"/prod/team1\")\n .build());\n\n final var prod = CockroachFunctions.getFolder(GetFolderArgs.builder()\n .id(prodFolderId)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n prodFolderId:\n type: string\nvariables:\n team1:\n fn::invoke:\n Function: cockroach:getFolder\n Arguments:\n path: /prod/team1\n prod:\n fn::invoke:\n Function: cockroach:getFolder\n Arguments:\n id: ${prodFolderId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getFolder.\n", + "properties": { + "id": { + "type": "string", + "description": "The id the folder.\n" + }, + "path": { + "type": "string", + "description": "An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2)\n" + } + }, + "type": "object" + }, + "outputs": { + "description": "A collection of values returned by getFolder.\n", + "properties": { + "id": { + "description": "The id the folder.\n", + "type": "string" + }, + "name": { + "description": "Name of the folder.\n", + "type": "string" + }, + "parentId": { + "description": "The ID of the folders's parent folder. 'root' is used for a folder at the root level.\n", + "type": "string" + }, + "path": { + "description": "An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2)\n", + "type": "string" + } + }, + "required": [ + "name", + "parentId" + ], + "type": "object" + } + }, "cockroach:index/getOrganization:getOrganization": { - "description": "Information about the organization associated with the user's API key.\n", + "description": "Information about the organization associated with the user's API key.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst prod = cockroach.getOrganization({});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nprod = cockroach.get_organization()\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var prod = Cockroach.GetOrganization.Invoke();\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := cockroach.GetOrganization(ctx, map[string]interface{}{}, nil)\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.cockroach.CockroachFunctions;\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 final var prod = CockroachFunctions.getOrganization();\n\n }\n}\n```\n```yaml\nvariables:\n prod:\n fn::invoke:\n Function: cockroach:getOrganization\n Arguments: {}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "outputs": { "description": "A collection of values returned by getOrganization.\n", "properties": { @@ -2219,7 +2358,7 @@ } }, "cockroach:index/getPersonUser:getPersonUser": { - "description": "Information about an individual user.\n", + "description": "Information about an individual user.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as cockroach from \"@pulumi/cockroach\";\n\nconst config = new pulumi.Config();\nconst emailAddress = config.require(\"emailAddress\");\nconst cockroach = cockroach.getPersonUser({\n email: emailAddress,\n});\n```\n```python\nimport pulumi\nimport pulumi_cockroach as cockroach\n\nconfig = pulumi.Config()\nemail_address = config.require(\"emailAddress\")\ncockroach = cockroach.get_person_user(email=email_address)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Cockroach = Pulumi.Cockroach;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var config = new Config();\n var emailAddress = config.Require(\"emailAddress\");\n var cockroach = Cockroach.GetPersonUser.Invoke(new()\n {\n Email = emailAddress,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config\"\n\t\"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tcfg := config.New(ctx, \"\")\n\t\temailAddress := cfg.Require(\"emailAddress\")\n\t\t_, err := cockroach.GetPersonUser(ctx, \u0026cockroach.GetPersonUserArgs{\n\t\t\tEmail: emailAddress,\n\t\t}, nil)\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.cockroach.CockroachFunctions;\nimport com.pulumi.cockroach.inputs.GetPersonUserArgs;\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 final var config = ctx.config();\n final var emailAddress = config.get(\"emailAddress\");\n final var cockroach = CockroachFunctions.getPersonUser(GetPersonUserArgs.builder()\n .email(emailAddress)\n .build());\n\n }\n}\n```\n```yaml\nconfiguration:\n emailAddress:\n type: string\nvariables:\n cockroach:\n fn::invoke:\n Function: cockroach:getPersonUser\n Arguments:\n email: ${emailAddress}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getPersonUser.\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index b6b0b85..c328b00 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -1,12 +1,14 @@ module github.com/pulumiverse/pulumi-cockroach/provider -go 1.22 +go 1.22.0 + +toolchain go1.23.2 require ( github.com/cockroachdb/terraform-provider-cockroach/shim v0.0.0 - github.com/pulumi/pulumi-terraform-bridge/pf v0.42.1 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.1 - github.com/pulumi/pulumi/sdk/v3 v3.129.0 + github.com/pulumi/pulumi-terraform-bridge/pf v0.46.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1 + github.com/pulumi/pulumi/sdk/v3 v3.136.1 ) replace ( @@ -16,8 +18,7 @@ replace ( require ( cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute v1.25.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/kms v1.15.7 // indirect cloud.google.com/go/logging v1.9.0 // indirect @@ -68,8 +69,8 @@ require ( github.com/charmbracelet/lipgloss v0.7.1 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0 // indirect - github.com/cockroachdb/terraform-provider-cockroach v1.3.1 // indirect + github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0 // indirect + github.com/cockroachdb/terraform-provider-cockroach v1.5.0 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -89,10 +90,9 @@ require ( github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -103,13 +103,12 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect @@ -118,16 +117,12 @@ require ( github.com/hashicorp/go-sockaddr v1.0.6 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.6.3 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.19.1 // indirect + github.com/hashicorp/hcl/v2 v2.20.0 // indirect github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect - github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.20.0 // indirect - github.com/hashicorp/terraform-json v0.21.0 // indirect - github.com/hashicorp/terraform-plugin-framework v1.11.0 // indirect + github.com/hashicorp/terraform-plugin-framework v1.12.0 // indirect github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.23.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.24.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect github.com/hashicorp/terraform-registry-address v0.2.3 // indirect @@ -177,12 +172,11 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect - github.com/pulumi/esc v0.9.1 // indirect + github.com/pulumi/esc v0.10.0 // indirect github.com/pulumi/inflector v0.1.1 // indirect - github.com/pulumi/pulumi-java/pkg v0.14.0 // indirect - github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect - github.com/pulumi/pulumi-yaml v1.9.2 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.129.0 // indirect + github.com/pulumi/pulumi-java/pkg v0.16.1 // indirect + github.com/pulumi/pulumi-yaml v1.10.3 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.136.1 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect @@ -202,11 +196,9 @@ require ( github.com/stretchr/testify v1.9.0 // indirect github.com/teekennedy/goldmark-markdown v0.3.0 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ulikunitz/xz v0.5.10 // indirect - github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect @@ -214,7 +206,7 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yuin/goldmark v1.7.4 // indirect - github.com/zclconf/go-cty v1.14.2 // indirect + github.com/zclconf/go-cty v1.14.3 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect @@ -228,7 +220,7 @@ require ( golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.27.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.22.0 // indirect @@ -237,12 +229,11 @@ require ( golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.169.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect - google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/grpc v1.66.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/frand v1.4.2 // indirect diff --git a/provider/go.sum b/provider/go.sum index a4ad4ac..e6c4db4 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -70,10 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.25.0 h1:H1/4SqSUhjPFE7L5ddzHOfY2bCAvjwNRZPNl6Ni5oYU= -cloud.google.com/go/compute v1.25.0/go.mod h1:GR7F0ZPZH8EhChlMo9FkLd7eUTwEymjqQagxzilIxIE= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -239,8 +237,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuW github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= +github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= +github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= @@ -335,10 +333,10 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0 h1:KKokmhXa5nzHXrP8kc81BZ6ciOewcT8FKqofS2yoR1s= -github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0/go.mod h1:oG9ylbcVGOF7IbVAW2nx5F6ry9a2dZD1H9rd+qd4P60= -github.com/cockroachdb/terraform-provider-cockroach v1.3.1 h1:MlK5eF0MdYvSDxp/YJlt+itttBmN11iEx0C/wDj4pgo= -github.com/cockroachdb/terraform-provider-cockroach v1.3.1/go.mod h1:iAzk6Np9leV3h502RAj+lBAxWON7e9uKePE4lECf2JU= +github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0 h1:sChoEfkpNaAurC9I11WSZQ16sn4r9OeA931cfzElk+U= +github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0/go.mod h1:oG9ylbcVGOF7IbVAW2nx5F6ry9a2dZD1H9rd+qd4P60= +github.com/cockroachdb/terraform-provider-cockroach v1.5.0 h1:JyY1Igb7SOXVV1qYDT65mnn2DtsLaankWFcLIV9s7X0= +github.com/cockroachdb/terraform-provider-cockroach v1.5.0/go.mod h1:soR3R/HyHHcQvfnf/OhPePDdDB9xlo/7Pn7MlxQMpVs= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -376,8 +374,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= @@ -409,8 +407,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -536,7 +534,6 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= @@ -548,8 +545,8 @@ github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= -github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= +github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU= github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= @@ -562,7 +559,6 @@ github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9 github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-sockaddr v1.0.6 h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEyqO4u9I= github.com/hashicorp/go-sockaddr v1.0.6/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= @@ -573,8 +569,8 @@ github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkm github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= -github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= +github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 h1:T1Q6ag9tCwun16AW+XK3tAql24P4uTGUMIn1/92WsQQ= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -583,16 +579,18 @@ github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8J github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw= github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U= github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= -github.com/hashicorp/terraform-plugin-framework v1.11.0 h1:M7+9zBArexHFXDx/pKTxjE6n/2UCXY6b8FIq9ZYhwfE= -github.com/hashicorp/terraform-plugin-framework v1.11.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= +github.com/hashicorp/terraform-plugin-framework v1.12.0 h1:7HKaueHPaikX5/7cbC1r9d1m12iYHY+FlNZEGxQ42CQ= +github.com/hashicorp/terraform-plugin-framework v1.12.0/go.mod h1:N/IOQ2uYjW60Jp39Cp3mw7I/OpC/GfZ0385R0YibmkE= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= -github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co= -github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= +github.com/hashicorp/terraform-plugin-go v0.24.0 h1:2WpHhginCdVhFIrWHxDEg6RBn3YaWzR2o6qUeIEat2U= +github.com/hashicorp/terraform-plugin-go v0.24.0/go.mod h1:tUQ53lAsOyYSckFGEefGC5C8BAaO0ENqzFd3bQeuYQg= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0= github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= +github.com/hashicorp/terraform-plugin-testing v1.7.0 h1:I6aeCyZ30z4NiI3tzyDoO6fS7YxP5xSL1ceOon3gTe8= +github.com/hashicorp/terraform-plugin-testing v1.7.0/go.mod h1:sbAreCleJNOCz+y5vVHV8EJkIWZKi/t4ndKiUjM9vao= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= @@ -742,26 +740,24 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= -github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= -github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= +github.com/pulumi/esc v0.10.0 h1:jzBKzkLVW0mePeanDRfqSQoCJ5yrkux0jIwAkUxpRKE= +github.com/pulumi/esc v0.10.0/go.mod h1:2Bfa+FWj/xl8CKqRTWbWgDX0SOD4opdQgvYSURTGK2c= github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+SobA= github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY= -github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2pHgxQ8= -github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= -github.com/pulumi/pulumi-java/pkg v0.14.0 h1:CKL7lLF81Fq6VRhA5TNFsSMnHraTNCUzIhqCzYX8Wzk= -github.com/pulumi/pulumi-java/pkg v0.14.0/go.mod h1:VybuJMWJtJc9ZNbt1kcYH4TbpocMx9mEi7YWL2Co99c= -github.com/pulumi/pulumi-terraform-bridge/pf v0.42.1 h1:IMn3MmvoO66iptcU5kBdun60PqwNJBJ20A4hD3AqkDE= -github.com/pulumi/pulumi-terraform-bridge/pf v0.42.1/go.mod h1:SXxx1PJNNdGoD4/CxELgy0F46uzcTbDkz63DJsjIRXE= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.1 h1:FLQknb6r3r/uaj1XLbouFF88eF1Fk0h4JOVS9kHKDRY= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.1/go.mod h1:JAxygKR/XGW6zIv6iOP6sHAYjZ7OCtqU7j6Od1lUk38= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= -github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= -github.com/pulumi/pulumi-yaml v1.9.2 h1:BCUuRPA1USmFXrExiHRU8yJ+OiphLYnroPxKRgGCJrs= -github.com/pulumi/pulumi-yaml v1.9.2/go.mod h1:sIh/Oa/NLRGTojevh8D2/cPDPvo2j9iXegVDQIKKfw4= -github.com/pulumi/pulumi/pkg/v3 v3.129.0 h1:n4Jd4ctlvw3eqyHglb/yJKDtRqjOvdkCBfG5T+orU30= -github.com/pulumi/pulumi/pkg/v3 v3.129.0/go.mod h1:W3c7JgO064kUH5IfyQMCgmsAr5iwr3PO6KEeIQiO0dY= -github.com/pulumi/pulumi/sdk/v3 v3.129.0 h1:uZpTTwWTx7Mk8UT9FgatzxzArim47vZ6hzNCKvgvX6A= -github.com/pulumi/pulumi/sdk/v3 v3.129.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/providertest v0.1.2 h1:9pJS9MeNkMyGwyNeHmvh8QqLgJy39Nk2/ym5u7r13ng= +github.com/pulumi/providertest v0.1.2/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= +github.com/pulumi/pulumi-java/pkg v0.16.1 h1:orHnDWFbpOERwaBLry9f+6nqPX7x0MsrIkaa5QDGAns= +github.com/pulumi/pulumi-java/pkg v0.16.1/go.mod h1:QH0DihZkWYle9XFc+LJ76m4hUo+fA3RdyaM90pqOaSM= +github.com/pulumi/pulumi-terraform-bridge/pf v0.46.0 h1:B95rH9t8LSZdEApF8sDogjSz67exG2KY3jGr87zwJek= +github.com/pulumi/pulumi-terraform-bridge/pf v0.46.0/go.mod h1:i75vRSbpf4YizD+ynNkLgp0sgZhm2N7xapPaBBiiZXA= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1 h1:EEf5W3buVR5pcCKTXGouDS1/oY6TqVUIRKLksl5h4Es= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.93.1/go.mod h1:jNpOSGkfTeZSnSjpGBHHiyllciCEDRqFaZhLUpQPlpo= +github.com/pulumi/pulumi-yaml v1.10.3 h1:j5cjPiE32ILmjrWnC1cfZ0MWdqCZ8fg9wlaWk7HOtM4= +github.com/pulumi/pulumi-yaml v1.10.3/go.mod h1:MFMQXkaUP5YQUKVJ6Z/aagZDl2f8hdU9oGaJfTcMf1Y= +github.com/pulumi/pulumi/pkg/v3 v3.136.1 h1:zA8aJZ7qI0QgZkBKjjQaYHEcigK6pZfrbfG38imXzWo= +github.com/pulumi/pulumi/pkg/v3 v3.136.1/go.mod h1:Iz8QIs07AbEdrO52hEIEM5C4VBDUYFH2NdM9u2xxBxY= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -829,8 +825,6 @@ github.com/teekennedy/goldmark-markdown v0.3.0 h1:ik9/biVGCwGWFg8dQ3KVm2pQ/wiiG0 github.com/teekennedy/goldmark-markdown v0.3.0/go.mod h1:kMhDz8La77A9UHvJGsxejd0QUflN9sS+QXCqnhmxmNo= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= @@ -860,8 +854,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= -github.com/zclconf/go-cty v1.14.2 h1:kTG7lqmBou0Zkx35r6HJHUQTvaRPr5bIAf3AoHS0izI= -github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= +github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= @@ -1036,8 +1030,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1161,7 +1155,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -1409,10 +1402,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 h1:ImUcDPHjTrAqNhlOkSocDLfG9rrNHH7w7uoKWPaWZ8s= google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7/go.mod h1:/3XmxOjePkvmKrHuBy4zNFw7IzxJXtAgdpXi8Ll990U= -google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 h1:oqta3O3AnlWbmIE3bFnWbu4bRxZjfbWCp0cKSuZh01E= -google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 h1:8EeVk1VKMD+GD/neyEHGmz7pFblqPjHoi+PGQIlLx2s= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1448,8 +1441,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= -google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1466,8 +1459,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1486,6 +1479,7 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/provider/resources.go b/provider/resources.go index 8068dd4..d168974 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -12,6 +12,7 @@ import ( tfpfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" "github.com/pulumiverse/pulumi-cockroach/provider/pkg/version" @@ -52,6 +53,10 @@ func cockroachResource(mod string, res string) tokens.Type { //go:embed cmd/pulumi-resource-cockroach/bridge-metadata.json var bridgeMetadata []byte +func computeIDField(field resource.PropertyKey) tfbridge.ComputeID { + return tfbridge.DelegateIDField(field, "cockroach", "https://github.com/pulumiverse/pulumi-cockroach") +} + // Provider returns additional overlaid schema and metadata associated with the tls package. func Provider() tfbridge.ProviderInfo { info := tfbridge.ProviderInfo{ @@ -80,6 +85,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_cluster": { Tok: cockroachResource(cockroachMod, "Cluster"), @@ -89,6 +95,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_cmek": { Tok: cockroachResource(cockroachMod, "Cmek"), @@ -98,6 +105,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_database": {Tok: cockroachResource(cockroachMod, "Database")}, "cockroach_folder": {Tok: cockroachResource(cockroachMod, "Folder")}, @@ -109,6 +117,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_log_export_config": { Tok: cockroachResource(cockroachMod, "LogExportConfig"), @@ -118,6 +127,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_maintenance_window": { Tok: cockroachResource(cockroachMod, "MaintenanceWindow"), @@ -127,6 +137,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_metric_export_cloudwatch_config": { Tok: cockroachResource(cockroachMod, "MetricExportCloudwatchConfig"), @@ -136,6 +147,7 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_metric_export_datadog_config": { Tok: cockroachResource(cockroachMod, "MetricExportDatadogConfig"), @@ -145,14 +157,28 @@ func Provider() tfbridge.ProviderInfo { Type: "string", }, }, + ComputeID: computeIDField("id"), }, "cockroach_private_endpoint_connection": {Tok: cockroachResource(cockroachMod, "PrivateEndpointConnection")}, "cockroach_private_endpoint_services": {Tok: cockroachResource(cockroachMod, "PrivateEndpointServices")}, "cockroach_private_endpoint_trusted_owner": {Tok: cockroachResource(cockroachMod, "PrivateEndpointTrustedOwner")}, "cockroach_sql_user": {Tok: cockroachResource(cockroachMod, "SqlUser")}, - "cockroach_user_role_grants": {Tok: cockroachResource(cockroachMod, "UserRoleGrants")}, - "cockroach_version_deferral": {Tok: cockroachResource(cockroachMod, "VersionDeferral")}, + "cockroach_user_role_grant": { + Tok: cockroachResource(cockroachMod, "UserRoleGrant"), + ComputeID: computeIDField("id"), + }, + "cockroach_user_role_grants": {Tok: cockroachResource(cockroachMod, "UserRoleGrants")}, + "cockroach_version_deferral": { + Tok: cockroachResource(cockroachMod, "VersionDeferral"), + Fields: map[string]*tfbridge.SchemaInfo{ + "id": { + Name: "clusterId", + Type: "string", + }, + }, + ComputeID: computeIDField("id"), + }, }, DataSources: map[string]*tfbridge.DataSourceInfo{ "cockroach_cluster": {Tok: cockroachDataSource(cockroachMod, "getCockroachCluster")}, @@ -160,6 +186,7 @@ func Provider() tfbridge.ProviderInfo { "cockroach_connection_string": {Tok: cockroachDataSource(cockroachMod, "getConnectionString")}, "cockroach_organization": {Tok: cockroachDataSource(cockroachMod, "getOrganization")}, "cockroach_person_user": {Tok: cockroachDataSource(cockroachMod, "getPersonUser")}, + "cockroach_folder": {Tok: cockroachDataSource(cockroachMod, "getFolder")}, }, JavaScript: &tfbridge.JavaScriptInfo{ PackageName: "@pulumiverse/cockroach", diff --git a/provider/shim/go.mod b/provider/shim/go.mod index ae28af9..39fbb72 100644 --- a/provider/shim/go.mod +++ b/provider/shim/go.mod @@ -3,61 +3,33 @@ module github.com/cockroachdb/terraform-provider-cockroach/shim go 1.22 require ( - github.com/cockroachdb/terraform-provider-cockroach v1.3.1 - github.com/hashicorp/terraform-plugin-framework v1.3.3 + github.com/cockroachdb/terraform-provider-cockroach v1.5.0 + github.com/hashicorp/terraform-plugin-framework v1.6.1 ) require ( github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0 // indirect + github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-checkpoint v0.5.0 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect - github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.4.0 // indirect - github.com/hashicorp/hcl/v2 v2.16.2 // indirect - github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.17.3 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect + github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.22.0 // indirect github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 // indirect - github.com/hashicorp/terraform-registry-address v0.2.1 // indirect - github.com/hashicorp/terraform-svchost v0.1.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect + github.com/kr/pretty v0.1.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/oklog/run v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/testify v1.8.3 // indirect - github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/sys v0.18.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/provider/shim/go.sum b/provider/shim/go.sum index 0dc25a2..2613ea8 100644 --- a/provider/shim/go.sum +++ b/provider/shim/go.sum @@ -1,137 +1,94 @@ -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0 h1:nHGfwXmFvJrSR9xu8qL7BkO4DqTHXE9N5vPhgY2I+j0= +github.com/ProtonMail/go-crypto v1.1.0-alpha.0/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0 h1:KKokmhXa5nzHXrP8kc81BZ6ciOewcT8FKqofS2yoR1s= -github.com/cockroachdb/cockroach-cloud-sdk-go v1.7.0/go.mod h1:oG9ylbcVGOF7IbVAW2nx5F6ry9a2dZD1H9rd+qd4P60= -github.com/cockroachdb/terraform-provider-cockroach v1.3.1 h1:MlK5eF0MdYvSDxp/YJlt+itttBmN11iEx0C/wDj4pgo= -github.com/cockroachdb/terraform-provider-cockroach v1.3.1/go.mod h1:iAzk6Np9leV3h502RAj+lBAxWON7e9uKePE4lECf2JU= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0 h1:sChoEfkpNaAurC9I11WSZQ16sn4r9OeA931cfzElk+U= +github.com/cockroachdb/cockroach-cloud-sdk-go v1.9.0/go.mod h1:oG9ylbcVGOF7IbVAW2nx5F6ry9a2dZD1H9rd+qd4P60= +github.com/cockroachdb/terraform-provider-cockroach v1.5.0 h1:JyY1Igb7SOXVV1qYDT65mnn2DtsLaankWFcLIV9s7X0= +github.com/cockroachdb/terraform-provider-cockroach v1.5.0/go.mod h1:soR3R/HyHHcQvfnf/OhPePDdDB9xlo/7Pn7MlxQMpVs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I= +github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= -github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= -github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= -github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= +github.com/hashicorp/hc-install v0.6.3 h1:yE/r1yJvWbtrJ0STwScgEnCanb0U9v7zp0Gbkmcoxqs= +github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= +github.com/hashicorp/hcl/v2 v2.20.0 h1:l++cRs/5jQOiKVvqXZm/P1ZEfVXJmvLS9WSVxkaeTb4= +github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= -github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-framework v1.3.3 h1:D18BlA8gdV4+W8WKhUqxudiYomPZHv94FFzyoSCKC8Q= -github.com/hashicorp/terraform-plugin-framework v1.3.3/go.mod h1:2gGDpWiTI0irr9NSTLFAKlTi6KwGti3AoU19rFqU30o= -github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 h1:4L0tmy/8esP6OcvocVymw52lY0HyQ5OxB7VNl7k4bS0= -github.com/hashicorp/terraform-plugin-framework-validators v0.10.0/go.mod h1:qdQJCdimB9JeX2YwOpItEu+IrfoJjWQ5PhLpAOMDQAE= -github.com/hashicorp/terraform-plugin-go v0.18.0 h1:IwTkOS9cOW1ehLd/rG0y+u/TGLK9y6fGoBjXVUquzpE= -github.com/hashicorp/terraform-plugin-go v0.18.0/go.mod h1:l7VK+2u5Kf2y+A+742GX0ouLut3gttudmvMgN0PA74Y= +github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo= +github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw= +github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U= +github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk= +github.com/hashicorp/terraform-plugin-framework v1.6.1 h1:hw2XrmUu8d8jVL52ekxim2IqDc+2Kpekn21xZANARLU= +github.com/hashicorp/terraform-plugin-framework v1.6.1/go.mod h1:aJI+n/hBPhz1J+77GdgNfk5svW12y7fmtxe/5L5IuwI= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= +github.com/hashicorp/terraform-plugin-go v0.22.0 h1:1OS1Jk5mO0f5hrziWJGXXIxBrMe2j/B8E+DVGw43Xmc= +github.com/hashicorp/terraform-plugin-go v0.22.0/go.mod h1:mPULV91VKss7sik6KFEcEu7HuTogMLLO/EvWCuFkRVE= github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1/go.mod h1:+tNlb0wkfdsDJ7JEiERLz4HzM19HyiuIoGzTsM7rPpw= -github.com/hashicorp/terraform-registry-address v0.2.1 h1:QuTf6oJ1+WSflJw6WYOHhLgwUiQ0FrROpHPYFtwTYWM= -github.com/hashicorp/terraform-registry-address v0.2.1/go.mod h1:BSE9fIFzp0qWsJUUyGquo4ldV9k2n+psif6NYkBRS3Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 h1:qHprzXy/As0rxedphECBEQAh3R4yp6pKksKHcqZx5G8= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0/go.mod h1:H+8tjs9TjV2w57QFVSMBQacf8k/E1XwLXGCARgViC6A= +github.com/hashicorp/terraform-plugin-testing v1.7.0 h1:I6aeCyZ30z4NiI3tzyDoO6fS7YxP5xSL1ceOon3gTe8= +github.com/hashicorp/terraform-plugin-testing v1.7.0/go.mod h1:sbAreCleJNOCz+y5vVHV8EJkIWZKi/t4ndKiUjM9vao= +github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= +github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -140,109 +97,52 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= -github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +github.com/zclconf/go-cty v1.14.3 h1:1JXy1XroaGrzZuG6X9dt7HL6s9AwbY+l4UNL8o5B6ho= +github.com/zclconf/go-cty v1.14.3/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/go.mod b/sdk/go.mod index 547b95f..5b55aa4 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.129.0 + github.com/pulumi/pulumi/sdk/v3 v3.136.1 ) require ( @@ -68,7 +68,6 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect diff --git a/sdk/go.sum b/sdk/go.sum index fdd7dcf..ecce3b2 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.129.0 h1:uZpTTwWTx7Mk8UT9FgatzxzArim47vZ6hzNCKvgvX6A= -github.com/pulumi/pulumi/sdk/v3 v3.129.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/sdk/v3 v3.136.1 h1:VJWTgdBrLvvzIkMbGq/epNEfT65P9gTvw14UF/I7hTI= +github.com/pulumi/pulumi/sdk/v3 v3.136.1/go.mod h1:PvKsX88co8XuwuPdzolMvew5lZV+4JmZfkeSjj7A6dI= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -185,8 +185,6 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= -github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7/go.mod h1:UxoP3EypF8JfGEjAII8jx1q8rQyDnX8qdTCs/UQBVIE= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= From 5d4b505fd8f87598c7646ae9d591d9f1a019b277 Mon Sep 17 00:00:00 2001 From: Ringo De Smet Date: Mon, 28 Oct 2024 18:43:01 +0100 Subject: [PATCH 2/2] make build_sdks --- sdk/dotnet/AllowList.cs | 31 ++ sdk/dotnet/CaCert.cs | 22 + sdk/dotnet/Cmek.cs | 31 ++ sdk/dotnet/Database.cs | 29 ++ sdk/dotnet/FinalizeVersionUpgrade.cs | 22 + sdk/dotnet/Folder.cs | 25 + sdk/dotnet/GetClusterCert.cs | 40 ++ sdk/dotnet/GetCockroachCluster.cs | 40 ++ sdk/dotnet/GetConnectionString.cs | 56 +++ sdk/dotnet/GetFolder.cs | 156 ++++++ sdk/dotnet/GetOrganization.cs | 30 ++ sdk/dotnet/GetPersonUser.cs | 40 ++ .../PrivateEndpointServicesServiceArgs.cs | 24 + .../PrivateEndpointServicesServiceGetArgs.cs | 24 + sdk/dotnet/Inputs/UserRoleGrantRoleArgs.cs | 51 ++ sdk/dotnet/Inputs/UserRoleGrantRoleGetArgs.cs | 51 ++ sdk/dotnet/Inputs/UserRoleGrantsRoleArgs.cs | 4 +- .../Inputs/UserRoleGrantsRoleGetArgs.cs | 4 +- sdk/dotnet/MaintenanceWindow.cs | 24 + sdk/dotnet/MetricExportCloudwatchConfig.cs | 26 + sdk/dotnet/MetricExportDatadogConfig.cs | 24 + .../Outputs/PrivateEndpointServicesService.cs | 21 + sdk/dotnet/Outputs/UserRoleGrantRole.cs | 55 +++ sdk/dotnet/Outputs/UserRoleGrantsRole.cs | 4 +- sdk/dotnet/PrivateEndpointConnection.cs | 20 +- sdk/dotnet/PrivateEndpointServices.cs | 30 +- sdk/dotnet/PrivateEndpointTrustedOwner.cs | 30 ++ sdk/dotnet/SqlUser.cs | 31 ++ sdk/dotnet/UserRoleGrant.cs | 122 +++++ sdk/dotnet/UserRoleGrants.cs | 10 +- sdk/dotnet/VersionDeferral.cs | 40 ++ sdk/go/cockroach/allowList.go | 39 ++ sdk/go/cockroach/caCert.go | 31 ++ sdk/go/cockroach/cmek.go | 36 ++ sdk/go/cockroach/database.go | 38 ++ sdk/go/cockroach/finalizeVersionUpgrade.go | 31 ++ sdk/go/cockroach/folder.go | 34 ++ sdk/go/cockroach/getClusterCert.go | 47 +- sdk/go/cockroach/getCockroachCluster.go | 47 +- sdk/go/cockroach/getConnectionString.go | 55 ++- sdk/go/cockroach/getFolder.go | 148 ++++++ sdk/go/cockroach/getOrganization.go | 42 +- sdk/go/cockroach/getPersonUser.go | 47 +- sdk/go/cockroach/init.go | 7 + sdk/go/cockroach/maintenanceWindow.go | 39 ++ .../cockroach/metricExportCloudwatchConfig.go | 35 ++ sdk/go/cockroach/metricExportDatadogConfig.go | 33 ++ sdk/go/cockroach/privateEndpointConnection.go | 30 +- sdk/go/cockroach/privateEndpointServices.go | 39 +- .../cockroach/privateEndpointTrustedOwner.go | 39 ++ sdk/go/cockroach/pulumiTypes.go | 269 +++++++++- sdk/go/cockroach/sqlUser.go | 40 ++ sdk/go/cockroach/userRoleGrant.go | 247 ++++++++++ sdk/go/cockroach/userRoleGrants.go | 10 +- sdk/go/cockroach/versionDeferral.go | 52 ++ sdk/nodejs/allowList.ts | 24 + sdk/nodejs/caCert.ts | 15 + sdk/nodejs/cmek.ts | 19 + sdk/nodejs/database.ts | 22 + sdk/nodejs/finalizeVersionUpgrade.ts | 15 + sdk/nodejs/folder.ts | 16 + sdk/nodejs/getClusterCert.ts | 32 +- sdk/nodejs/getCockroachCluster.ts | 32 +- sdk/nodejs/getConnectionString.ts | 52 +- sdk/nodejs/getFolder.ts | 110 +++++ sdk/nodejs/getOrganization.ts | 23 +- sdk/nodejs/getPersonUser.ts | 32 +- sdk/nodejs/index.ts | 13 + sdk/nodejs/maintenanceWindow.ts | 17 + sdk/nodejs/metricExportCloudwatchConfig.ts | 19 + sdk/nodejs/metricExportDatadogConfig.ts | 17 + sdk/nodejs/privateEndpointConnection.ts | 20 +- sdk/nodejs/privateEndpointServices.ts | 21 +- sdk/nodejs/privateEndpointTrustedOwner.ts | 23 + sdk/nodejs/sqlUser.ts | 24 + sdk/nodejs/tsconfig.json | 2 + sdk/nodejs/types/input.ts | 46 +- sdk/nodejs/types/output.ts | 46 +- sdk/nodejs/userRoleGrant.ts | 113 +++++ sdk/nodejs/userRoleGrants.ts | 10 +- sdk/nodejs/versionDeferral.ts | 32 ++ sdk/python/pulumiverse_cockroach/__init__.py | 10 + sdk/python/pulumiverse_cockroach/_inputs.py | 465 +++++++++++++++++- .../pulumiverse_cockroach/_utilities.py | 2 +- .../pulumiverse_cockroach/allow_list.py | 51 ++ .../pulumiverse_cockroach/api_oidc_config.py | 5 + sdk/python/pulumiverse_cockroach/ca_cert.py | 33 ++ sdk/python/pulumiverse_cockroach/cluster.py | 5 + sdk/python/pulumiverse_cockroach/cmek.py | 41 ++ .../pulumiverse_cockroach/config/__init__.pyi | 5 + .../pulumiverse_cockroach/config/vars.py | 5 + sdk/python/pulumiverse_cockroach/database.py | 47 ++ .../finalize_version_upgrade.py | 33 ++ sdk/python/pulumiverse_cockroach/folder.py | 33 ++ .../pulumiverse_cockroach/get_cluster_cert.py | 38 +- .../get_cockroach_cluster.py | 50 +- .../get_connection_string.py | 63 ++- .../pulumiverse_cockroach/get_folder.py | 152 ++++++ .../pulumiverse_cockroach/get_organization.py | 35 +- .../pulumiverse_cockroach/get_person_user.py | 38 +- .../log_export_config.py | 5 + .../maintenance_window.py | 45 ++ .../metric_export_cloudwatch_config.py | 41 ++ .../metric_export_datadog_config.py | 37 ++ sdk/python/pulumiverse_cockroach/outputs.py | 143 +++++- .../private_endpoint_connection.py | 47 +- .../private_endpoint_services.py | 47 +- .../private_endpoint_trusted_owner.py | 49 ++ sdk/python/pulumiverse_cockroach/provider.py | 5 + sdk/python/pulumiverse_cockroach/sql_user.py | 51 ++ .../pulumiverse_cockroach/user_role_grant.py | 220 +++++++++ .../pulumiverse_cockroach/user_role_grants.py | 25 +- .../pulumiverse_cockroach/version_deferral.py | 85 ++++ sdk/python/pyproject.toml | 2 +- 114 files changed, 5115 insertions(+), 145 deletions(-) create mode 100644 sdk/dotnet/GetFolder.cs create mode 100644 sdk/dotnet/Inputs/UserRoleGrantRoleArgs.cs create mode 100644 sdk/dotnet/Inputs/UserRoleGrantRoleGetArgs.cs create mode 100644 sdk/dotnet/Outputs/UserRoleGrantRole.cs create mode 100644 sdk/dotnet/UserRoleGrant.cs create mode 100644 sdk/go/cockroach/getFolder.go create mode 100644 sdk/go/cockroach/userRoleGrant.go create mode 100644 sdk/nodejs/getFolder.ts create mode 100644 sdk/nodejs/userRoleGrant.ts create mode 100644 sdk/python/pulumiverse_cockroach/get_folder.py create mode 100644 sdk/python/pulumiverse_cockroach/user_role_grant.py diff --git a/sdk/dotnet/AllowList.cs b/sdk/dotnet/AllowList.cs index eb1fdfb..9bab7f8 100644 --- a/sdk/dotnet/AllowList.cs +++ b/sdk/dotnet/AllowList.cs @@ -12,6 +12,37 @@ namespace Pulumiverse.Cockroach { /// /// List of IP ranges allowed to access the cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var vpn = new Cockroach.AllowList("vpn", new() + /// { + /// Name = "vpn", + /// CidrIp = "123.123.1.1", + /// CidrMask = 32, + /// Ui = true, + /// Sql = true, + /// ClusterId = staging.Id, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format: <cluster id>:<cidr ip>/<cidr mask> + /// + /// ```sh + /// $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32 + /// ``` /// [CockroachResourceType("cockroach:index/allowList:AllowList")] public partial class AllowList : global::Pulumi.CustomResource diff --git a/sdk/dotnet/CaCert.cs b/sdk/dotnet/CaCert.cs index 38fc9f4..3cb87d9 100644 --- a/sdk/dotnet/CaCert.cs +++ b/sdk/dotnet/CaCert.cs @@ -12,6 +12,28 @@ namespace Pulumiverse.Cockroach { /// /// Manages client CA certs. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// // The X509 certificate in PEM format. + /// var clientCertificate = config.Require("clientCertificate"); + /// var prod = new Cockroach.CaCert("prod", new() + /// { + /// ClusterId = prodCockroachCluster.Id, + /// X509PemCert = clientCertificate, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/caCert:CaCert")] public partial class CaCert : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Cmek.cs b/sdk/dotnet/Cmek.cs index 12a0094..ef12aad 100644 --- a/sdk/dotnet/Cmek.cs +++ b/sdk/dotnet/Cmek.cs @@ -12,6 +12,37 @@ namespace Pulumiverse.Cockroach { /// /// Customer-managed encryption keys (CMEK) resource for a single cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var dedicated = new Cockroach.Cmek("dedicated", new() + /// { + /// ClusterId = dedicatedCockroachCluster.Id, + /// Regions = new[] + /// { + /// new Cockroach.Inputs.CmekRegionArgs + /// { + /// Region = "us-central-1", + /// Key = new Cockroach.Inputs.CmekRegionKeyArgs + /// { + /// AuthPrincipal = "arn:aws:iam::account:role/role-name-with-path", + /// Type = "AWS_KMS", + /// Uri = "arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key", + /// }, + /// }, + /// }, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/cmek:Cmek")] public partial class Cmek : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Database.cs b/sdk/dotnet/Database.cs index 2d4c196..5e47864 100644 --- a/sdk/dotnet/Database.cs +++ b/sdk/dotnet/Database.cs @@ -12,6 +12,35 @@ namespace Pulumiverse.Cockroach { /// /// CockroachDB database. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = new Cockroach.Database("cockroach", new() + /// { + /// Name = "example-database", + /// ClusterId = clusterId, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format: <cluster id>:<database name> + /// + /// ```sh + /// $ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase + /// ``` /// [CockroachResourceType("cockroach:index/database:Database")] public partial class Database : global::Pulumi.CustomResource diff --git a/sdk/dotnet/FinalizeVersionUpgrade.cs b/sdk/dotnet/FinalizeVersionUpgrade.cs index b9014c3..8b730c6 100644 --- a/sdk/dotnet/FinalizeVersionUpgrade.cs +++ b/sdk/dotnet/FinalizeVersionUpgrade.cs @@ -12,6 +12,28 @@ namespace Pulumiverse.Cockroach { /// /// Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroachVersion = config.Require("cockroachVersion"); + /// var cockroach = new Cockroach.FinalizeVersionUpgrade("cockroach", new() + /// { + /// ClusterId = clusterId, + /// CockroachVersion = cockroachVersion, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/finalizeVersionUpgrade:FinalizeVersionUpgrade")] public partial class FinalizeVersionUpgrade : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Folder.cs b/sdk/dotnet/Folder.cs index 68a228f..840cfc8 100644 --- a/sdk/dotnet/Folder.cs +++ b/sdk/dotnet/Folder.cs @@ -12,6 +12,31 @@ namespace Pulumiverse.Cockroach { /// /// CockroachDB Cloud folder. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var aTeam = new Cockroach.Folder("a_team", new() + /// { + /// Name = "a-team", + /// ParentId = "root", + /// }); + /// + /// var aTeamDev = new Cockroach.Folder("a_team_dev", new() + /// { + /// Name = "dev", + /// ParentId = aTeam.Id, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/folder:Folder")] public partial class Folder : global::Pulumi.CustomResource diff --git a/sdk/dotnet/GetClusterCert.cs b/sdk/dotnet/GetClusterCert.cs index 648d10b..6ce45ef 100644 --- a/sdk/dotnet/GetClusterCert.cs +++ b/sdk/dotnet/GetClusterCert.cs @@ -16,6 +16,26 @@ public static class GetClusterCert /// TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/<cluster name>-ca.crt` on MacOS or Linux, or `$env:appdata\CockroachCloud\certs\<cluster name>-ca.crt` on Windows. /// /// Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\postgresql\root.crt` on Windows. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = Cockroach.GetClusterCert.Invoke(new() + /// { + /// Id = clusterId, + /// }); + /// + /// }); + /// ``` /// public static Task InvokeAsync(GetClusterCertArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getClusterCert:getClusterCert", args ?? new GetClusterCertArgs(), options.WithDefaults()); @@ -24,6 +44,26 @@ public static Task InvokeAsync(GetClusterCertArgs args, In /// TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/<cluster name>-ca.crt` on MacOS or Linux, or `$env:appdata\CockroachCloud\certs\<cluster name>-ca.crt` on Windows. /// /// Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\postgresql\root.crt` on Windows. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = Cockroach.GetClusterCert.Invoke(new() + /// { + /// Id = clusterId, + /// }); + /// + /// }); + /// ``` /// public static Output Invoke(GetClusterCertInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getClusterCert:getClusterCert", args ?? new GetClusterCertInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetCockroachCluster.cs b/sdk/dotnet/GetCockroachCluster.cs index be5c3b4..efb7823 100644 --- a/sdk/dotnet/GetCockroachCluster.cs +++ b/sdk/dotnet/GetCockroachCluster.cs @@ -14,12 +14,52 @@ public static class GetCockroachCluster { /// /// CockroachDB Cloud cluster. Can be Dedicated or Serverless. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = Cockroach.GetCockroachCluster.Invoke(new() + /// { + /// Id = clusterId, + /// }); + /// + /// }); + /// ``` /// public static Task InvokeAsync(GetCockroachClusterArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getCockroachCluster:getCockroachCluster", args ?? new GetCockroachClusterArgs(), options.WithDefaults()); /// /// CockroachDB Cloud cluster. Can be Dedicated or Serverless. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = Cockroach.GetCockroachCluster.Invoke(new() + /// { + /// Id = clusterId, + /// }); + /// + /// }); + /// ``` /// public static Output Invoke(GetCockroachClusterInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getCockroachCluster:getCockroachCluster", args ?? new GetCockroachClusterInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetConnectionString.cs b/sdk/dotnet/GetConnectionString.cs index 7ea83fa..751eda9 100644 --- a/sdk/dotnet/GetConnectionString.cs +++ b/sdk/dotnet/GetConnectionString.cs @@ -14,12 +14,68 @@ public static class GetConnectionString { /// /// Generic connection string for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var sqlUserName = config.Require("sqlUserName"); + /// var sqlUserPassword = config.Require("sqlUserPassword"); + /// var database = config.Require("database"); + /// var os = config.Require("os"); + /// var cockroach = Cockroach.GetConnectionString.Invoke(new() + /// { + /// Id = clusterId, + /// SqlUser = sqlUserName, + /// Password = sqlUserPassword, + /// Database = database, + /// Os = os, + /// }); + /// + /// }); + /// ``` /// public static Task InvokeAsync(GetConnectionStringArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getConnectionString:getConnectionString", args ?? new GetConnectionStringArgs(), options.WithDefaults()); /// /// Generic connection string for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var sqlUserName = config.Require("sqlUserName"); + /// var sqlUserPassword = config.Require("sqlUserPassword"); + /// var database = config.Require("database"); + /// var os = config.Require("os"); + /// var cockroach = Cockroach.GetConnectionString.Invoke(new() + /// { + /// Id = clusterId, + /// SqlUser = sqlUserName, + /// Password = sqlUserPassword, + /// Database = database, + /// Os = os, + /// }); + /// + /// }); + /// ``` /// public static Output Invoke(GetConnectionStringInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getConnectionString:getConnectionString", args ?? new GetConnectionStringInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/GetFolder.cs b/sdk/dotnet/GetFolder.cs new file mode 100644 index 0000000..3e60e3d --- /dev/null +++ b/sdk/dotnet/GetFolder.cs @@ -0,0 +1,156 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Cockroach +{ + public static class GetFolder + { + /// + /// A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var prodFolderId = config.Require("prodFolderId"); + /// var team1 = Cockroach.GetFolder.Invoke(new() + /// { + /// Path = "/prod/team1", + /// }); + /// + /// var prod = Cockroach.GetFolder.Invoke(new() + /// { + /// Id = prodFolderId, + /// }); + /// + /// }); + /// ``` + /// + public static Task InvokeAsync(GetFolderArgs? args = null, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getFolder:getFolder", args ?? new GetFolderArgs(), options.WithDefaults()); + + /// + /// A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var prodFolderId = config.Require("prodFolderId"); + /// var team1 = Cockroach.GetFolder.Invoke(new() + /// { + /// Path = "/prod/team1", + /// }); + /// + /// var prod = Cockroach.GetFolder.Invoke(new() + /// { + /// Id = prodFolderId, + /// }); + /// + /// }); + /// ``` + /// + public static Output Invoke(GetFolderInvokeArgs? args = null, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getFolder:getFolder", args ?? new GetFolderInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetFolderArgs : global::Pulumi.InvokeArgs + { + /// + /// The id the folder. + /// + [Input("id")] + public string? Id { get; set; } + + /// + /// An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + /// + [Input("path")] + public string? Path { get; set; } + + public GetFolderArgs() + { + } + public static new GetFolderArgs Empty => new GetFolderArgs(); + } + + public sealed class GetFolderInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The id the folder. + /// + [Input("id")] + public Input? Id { get; set; } + + /// + /// An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + /// + [Input("path")] + public Input? Path { get; set; } + + public GetFolderInvokeArgs() + { + } + public static new GetFolderInvokeArgs Empty => new GetFolderInvokeArgs(); + } + + + [OutputType] + public sealed class GetFolderResult + { + /// + /// The id the folder. + /// + public readonly string? Id; + /// + /// Name of the folder. + /// + public readonly string Name; + /// + /// The ID of the folders's parent folder. 'root' is used for a folder at the root level. + /// + public readonly string ParentId; + /// + /// An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + /// + public readonly string? Path; + + [OutputConstructor] + private GetFolderResult( + string? id, + + string name, + + string parentId, + + string? path) + { + Id = id; + Name = name; + ParentId = parentId; + Path = path; + } + } +} diff --git a/sdk/dotnet/GetOrganization.cs b/sdk/dotnet/GetOrganization.cs index da1ab86..7bdce9d 100644 --- a/sdk/dotnet/GetOrganization.cs +++ b/sdk/dotnet/GetOrganization.cs @@ -14,12 +14,42 @@ public static class GetOrganization { /// /// Information about the organization associated with the user's API key. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var prod = Cockroach.GetOrganization.Invoke(); + /// + /// }); + /// ``` /// public static Task InvokeAsync(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getOrganization:getOrganization", InvokeArgs.Empty, options.WithDefaults()); /// /// Information about the organization associated with the user's API key. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var prod = Cockroach.GetOrganization.Invoke(); + /// + /// }); + /// ``` /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getOrganization:getOrganization", InvokeArgs.Empty, options.WithDefaults()); diff --git a/sdk/dotnet/GetPersonUser.cs b/sdk/dotnet/GetPersonUser.cs index a7cf268..75db322 100644 --- a/sdk/dotnet/GetPersonUser.cs +++ b/sdk/dotnet/GetPersonUser.cs @@ -14,12 +14,52 @@ public static class GetPersonUser { /// /// Information about an individual user. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var emailAddress = config.Require("emailAddress"); + /// var cockroach = Cockroach.GetPersonUser.Invoke(new() + /// { + /// Email = emailAddress, + /// }); + /// + /// }); + /// ``` /// public static Task InvokeAsync(GetPersonUserArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.InvokeAsync("cockroach:index/getPersonUser:getPersonUser", args ?? new GetPersonUserArgs(), options.WithDefaults()); /// /// Information about an individual user. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumi.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var emailAddress = config.Require("emailAddress"); + /// var cockroach = Cockroach.GetPersonUser.Invoke(new() + /// { + /// Email = emailAddress, + /// }); + /// + /// }); + /// ``` /// public static Output Invoke(GetPersonUserInvokeArgs args, InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("cockroach:index/getPersonUser:getPersonUser", args ?? new GetPersonUserInvokeArgs(), options.WithDefaults()); diff --git a/sdk/dotnet/Inputs/PrivateEndpointServicesServiceArgs.cs b/sdk/dotnet/Inputs/PrivateEndpointServicesServiceArgs.cs index a13b7e0..af8af6a 100644 --- a/sdk/dotnet/Inputs/PrivateEndpointServicesServiceArgs.cs +++ b/sdk/dotnet/Inputs/PrivateEndpointServicesServiceArgs.cs @@ -13,6 +13,18 @@ namespace Pulumiverse.Cockroach.Inputs public sealed class PrivateEndpointServicesServiceArgs : global::Pulumi.ResourceArgs { + [Input("availabilityZoneIds")] + private InputList? _availabilityZoneIds; + + /// + /// Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + /// + public InputList AvailabilityZoneIds + { + get => _availabilityZoneIds ?? (_availabilityZoneIds = new InputList()); + set => _availabilityZoneIds = value; + } + [Input("aws")] public Input? Aws { get; set; } @@ -22,6 +34,18 @@ public sealed class PrivateEndpointServicesServiceArgs : global::Pulumi.Resource [Input("cloudProvider")] public Input? CloudProvider { get; set; } + /// + /// Server side ID of the private endpoint connection. + /// + [Input("endpointServiceId")] + public Input? EndpointServiceId { get; set; } + + /// + /// Name of the endpoint service. + /// + [Input("name")] + public Input? Name { get; set; } + /// /// Cloud provider region code associated with this service. /// diff --git a/sdk/dotnet/Inputs/PrivateEndpointServicesServiceGetArgs.cs b/sdk/dotnet/Inputs/PrivateEndpointServicesServiceGetArgs.cs index b752ae2..0cdcfca 100644 --- a/sdk/dotnet/Inputs/PrivateEndpointServicesServiceGetArgs.cs +++ b/sdk/dotnet/Inputs/PrivateEndpointServicesServiceGetArgs.cs @@ -13,6 +13,18 @@ namespace Pulumiverse.Cockroach.Inputs public sealed class PrivateEndpointServicesServiceGetArgs : global::Pulumi.ResourceArgs { + [Input("availabilityZoneIds")] + private InputList? _availabilityZoneIds; + + /// + /// Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + /// + public InputList AvailabilityZoneIds + { + get => _availabilityZoneIds ?? (_availabilityZoneIds = new InputList()); + set => _availabilityZoneIds = value; + } + [Input("aws")] public Input? Aws { get; set; } @@ -22,6 +34,18 @@ public sealed class PrivateEndpointServicesServiceGetArgs : global::Pulumi.Resou [Input("cloudProvider")] public Input? CloudProvider { get; set; } + /// + /// Server side ID of the private endpoint connection. + /// + [Input("endpointServiceId")] + public Input? EndpointServiceId { get; set; } + + /// + /// Name of the endpoint service. + /// + [Input("name")] + public Input? Name { get; set; } + /// /// Cloud provider region code associated with this service. /// diff --git a/sdk/dotnet/Inputs/UserRoleGrantRoleArgs.cs b/sdk/dotnet/Inputs/UserRoleGrantRoleArgs.cs new file mode 100644 index 0000000..05e8534 --- /dev/null +++ b/sdk/dotnet/Inputs/UserRoleGrantRoleArgs.cs @@ -0,0 +1,51 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Cockroach.Inputs +{ + + public sealed class UserRoleGrantRoleArgs : global::Pulumi.ResourceArgs + { + /// + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + /// + [Input("resourceId")] + public Input? ResourceId { get; set; } + + /// + /// Type of resource. Allowed values are: + /// * ORGANIZATION + /// * CLUSTER + /// * FOLDER + /// + [Input("resourceType", required: true)] + public Input ResourceType { get; set; } = null!; + + /// + /// Name of the role to grant. Allowed values are: + /// * BILLING_COORDINATOR + /// * ORG_ADMIN + /// * ORG_MEMBER + /// * CLUSTER_ADMIN + /// * CLUSTER_OPERATOR_WRITER + /// * CLUSTER_DEVELOPER + /// * CLUSTER_CREATOR + /// * FOLDER_ADMIN + /// * FOLDER_MOVER + /// + [Input("roleName", required: true)] + public Input RoleName { get; set; } = null!; + + public UserRoleGrantRoleArgs() + { + } + public static new UserRoleGrantRoleArgs Empty => new UserRoleGrantRoleArgs(); + } +} diff --git a/sdk/dotnet/Inputs/UserRoleGrantRoleGetArgs.cs b/sdk/dotnet/Inputs/UserRoleGrantRoleGetArgs.cs new file mode 100644 index 0000000..097a547 --- /dev/null +++ b/sdk/dotnet/Inputs/UserRoleGrantRoleGetArgs.cs @@ -0,0 +1,51 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Cockroach.Inputs +{ + + public sealed class UserRoleGrantRoleGetArgs : global::Pulumi.ResourceArgs + { + /// + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + /// + [Input("resourceId")] + public Input? ResourceId { get; set; } + + /// + /// Type of resource. Allowed values are: + /// * ORGANIZATION + /// * CLUSTER + /// * FOLDER + /// + [Input("resourceType", required: true)] + public Input ResourceType { get; set; } = null!; + + /// + /// Name of the role to grant. Allowed values are: + /// * BILLING_COORDINATOR + /// * ORG_ADMIN + /// * ORG_MEMBER + /// * CLUSTER_ADMIN + /// * CLUSTER_OPERATOR_WRITER + /// * CLUSTER_DEVELOPER + /// * CLUSTER_CREATOR + /// * FOLDER_ADMIN + /// * FOLDER_MOVER + /// + [Input("roleName", required: true)] + public Input RoleName { get; set; } = null!; + + public UserRoleGrantRoleGetArgs() + { + } + public static new UserRoleGrantRoleGetArgs Empty => new UserRoleGrantRoleGetArgs(); + } +} diff --git a/sdk/dotnet/Inputs/UserRoleGrantsRoleArgs.cs b/sdk/dotnet/Inputs/UserRoleGrantsRoleArgs.cs index 0698e3b..62330d9 100644 --- a/sdk/dotnet/Inputs/UserRoleGrantsRoleArgs.cs +++ b/sdk/dotnet/Inputs/UserRoleGrantsRoleArgs.cs @@ -14,7 +14,7 @@ namespace Pulumiverse.Cockroach.Inputs public sealed class UserRoleGrantsRoleArgs : global::Pulumi.ResourceArgs { /// - /// ID of the resource. Omit if resource_type is 'ORGANIZATION'. + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. /// [Input("resourceId")] public Input? ResourceId { get; set; } @@ -30,8 +30,6 @@ public sealed class UserRoleGrantsRoleArgs : global::Pulumi.ResourceArgs /// /// Name of the role to grant. Allowed values are: - /// * DEVELOPER - /// * ADMIN /// * BILLING_COORDINATOR /// * ORG_ADMIN /// * ORG_MEMBER diff --git a/sdk/dotnet/Inputs/UserRoleGrantsRoleGetArgs.cs b/sdk/dotnet/Inputs/UserRoleGrantsRoleGetArgs.cs index c885029..24dfb84 100644 --- a/sdk/dotnet/Inputs/UserRoleGrantsRoleGetArgs.cs +++ b/sdk/dotnet/Inputs/UserRoleGrantsRoleGetArgs.cs @@ -14,7 +14,7 @@ namespace Pulumiverse.Cockroach.Inputs public sealed class UserRoleGrantsRoleGetArgs : global::Pulumi.ResourceArgs { /// - /// ID of the resource. Omit if resource_type is 'ORGANIZATION'. + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. /// [Input("resourceId")] public Input? ResourceId { get; set; } @@ -30,8 +30,6 @@ public sealed class UserRoleGrantsRoleGetArgs : global::Pulumi.ResourceArgs /// /// Name of the role to grant. Allowed values are: - /// * DEVELOPER - /// * ADMIN /// * BILLING_COORDINATOR /// * ORG_ADMIN /// * ORG_MEMBER diff --git a/sdk/dotnet/MaintenanceWindow.cs b/sdk/dotnet/MaintenanceWindow.cs index 756aba7..390ab50 100644 --- a/sdk/dotnet/MaintenanceWindow.cs +++ b/sdk/dotnet/MaintenanceWindow.cs @@ -12,6 +12,30 @@ namespace Pulumiverse.Cockroach { /// /// Maintenance window configuration for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var offsetDuration = config.GetDouble("offsetDuration") ?? 172800; + /// var windowDuration = config.GetDouble("windowDuration") ?? 21600; + /// var example = new Cockroach.MaintenanceWindow("example", new() + /// { + /// ClusterId = clusterId, + /// OffsetDuration = offsetDuration, + /// WindowDuration = windowDuration, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/maintenanceWindow:MaintenanceWindow")] public partial class MaintenanceWindow : global::Pulumi.CustomResource diff --git a/sdk/dotnet/MetricExportCloudwatchConfig.cs b/sdk/dotnet/MetricExportCloudwatchConfig.cs index 466da05..3c8c122 100644 --- a/sdk/dotnet/MetricExportCloudwatchConfig.cs +++ b/sdk/dotnet/MetricExportCloudwatchConfig.cs @@ -12,6 +12,32 @@ namespace Pulumiverse.Cockroach { /// /// Amazon CloudWatch metric export configuration for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var roleArn = config.Require("roleArn"); + /// var logGroupName = config.Require("logGroupName"); + /// var awsRegion = config.Require("awsRegion"); + /// var example = new Cockroach.MetricExportCloudwatchConfig("example", new() + /// { + /// ClusterId = clusterId, + /// RoleArn = roleArn, + /// LogGroupName = logGroupName, + /// TargetRegion = awsRegion, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/metricExportCloudwatchConfig:MetricExportCloudwatchConfig")] public partial class MetricExportCloudwatchConfig : global::Pulumi.CustomResource diff --git a/sdk/dotnet/MetricExportDatadogConfig.cs b/sdk/dotnet/MetricExportDatadogConfig.cs index 0b3f428..0a5be1c 100644 --- a/sdk/dotnet/MetricExportDatadogConfig.cs +++ b/sdk/dotnet/MetricExportDatadogConfig.cs @@ -12,6 +12,30 @@ namespace Pulumiverse.Cockroach { /// /// DataDog metric export configuration for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var datadogSite = config.Require("datadogSite"); + /// var datadogApiKey = config.Require("datadogApiKey"); + /// var example = new Cockroach.MetricExportDatadogConfig("example", new() + /// { + /// ClusterId = clusterId, + /// Site = datadogSite, + /// ApiKey = datadogApiKey, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/metricExportDatadogConfig:MetricExportDatadogConfig")] public partial class MetricExportDatadogConfig : global::Pulumi.CustomResource diff --git a/sdk/dotnet/Outputs/PrivateEndpointServicesService.cs b/sdk/dotnet/Outputs/PrivateEndpointServicesService.cs index 69d227f..dad8976 100644 --- a/sdk/dotnet/Outputs/PrivateEndpointServicesService.cs +++ b/sdk/dotnet/Outputs/PrivateEndpointServicesService.cs @@ -14,12 +14,24 @@ namespace Pulumiverse.Cockroach.Outputs [OutputType] public sealed class PrivateEndpointServicesService { + /// + /// Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + /// + public readonly ImmutableArray AvailabilityZoneIds; public readonly Outputs.PrivateEndpointServicesServiceAws? Aws; /// /// Cloud provider associated with this service. /// public readonly string? CloudProvider; /// + /// Server side ID of the private endpoint connection. + /// + public readonly string? EndpointServiceId; + /// + /// Name of the endpoint service. + /// + public readonly string? Name; + /// /// Cloud provider region code associated with this service. /// public readonly string? RegionName; @@ -30,16 +42,25 @@ public sealed class PrivateEndpointServicesService [OutputConstructor] private PrivateEndpointServicesService( + ImmutableArray availabilityZoneIds, + Outputs.PrivateEndpointServicesServiceAws? aws, string? cloudProvider, + string? endpointServiceId, + + string? name, + string? regionName, string? status) { + AvailabilityZoneIds = availabilityZoneIds; Aws = aws; CloudProvider = cloudProvider; + EndpointServiceId = endpointServiceId; + Name = name; RegionName = regionName; Status = status; } diff --git a/sdk/dotnet/Outputs/UserRoleGrantRole.cs b/sdk/dotnet/Outputs/UserRoleGrantRole.cs new file mode 100644 index 0000000..7e21cf2 --- /dev/null +++ b/sdk/dotnet/Outputs/UserRoleGrantRole.cs @@ -0,0 +1,55 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Cockroach.Outputs +{ + + [OutputType] + public sealed class UserRoleGrantRole + { + /// + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + /// + public readonly string? ResourceId; + /// + /// Type of resource. Allowed values are: + /// * ORGANIZATION + /// * CLUSTER + /// * FOLDER + /// + public readonly string ResourceType; + /// + /// Name of the role to grant. Allowed values are: + /// * BILLING_COORDINATOR + /// * ORG_ADMIN + /// * ORG_MEMBER + /// * CLUSTER_ADMIN + /// * CLUSTER_OPERATOR_WRITER + /// * CLUSTER_DEVELOPER + /// * CLUSTER_CREATOR + /// * FOLDER_ADMIN + /// * FOLDER_MOVER + /// + public readonly string RoleName; + + [OutputConstructor] + private UserRoleGrantRole( + string? resourceId, + + string resourceType, + + string roleName) + { + ResourceId = resourceId; + ResourceType = resourceType; + RoleName = roleName; + } + } +} diff --git a/sdk/dotnet/Outputs/UserRoleGrantsRole.cs b/sdk/dotnet/Outputs/UserRoleGrantsRole.cs index 30a045e..b053330 100644 --- a/sdk/dotnet/Outputs/UserRoleGrantsRole.cs +++ b/sdk/dotnet/Outputs/UserRoleGrantsRole.cs @@ -15,7 +15,7 @@ namespace Pulumiverse.Cockroach.Outputs public sealed class UserRoleGrantsRole { /// - /// ID of the resource. Omit if resource_type is 'ORGANIZATION'. + /// ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. /// public readonly string? ResourceId; /// @@ -27,8 +27,6 @@ public sealed class UserRoleGrantsRole public readonly string ResourceType; /// /// Name of the role to grant. Allowed values are: - /// * DEVELOPER - /// * ADMIN /// * BILLING_COORDINATOR /// * ORG_ADMIN /// * ORG_MEMBER diff --git a/sdk/dotnet/PrivateEndpointConnection.cs b/sdk/dotnet/PrivateEndpointConnection.cs index 4f38537..9402c48 100644 --- a/sdk/dotnet/PrivateEndpointConnection.cs +++ b/sdk/dotnet/PrivateEndpointConnection.cs @@ -11,7 +11,15 @@ namespace Pulumiverse.Cockroach { /// - /// AWS PrivateLink Endpoint Connection. + /// Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network. + /// + /// ## Import + /// + /// format: <cluster id>:<connection id> + /// + /// ```sh + /// $ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc + /// ``` /// [CockroachResourceType("cockroach:index/privateEndpointConnection:PrivateEndpointConnection")] public partial class PrivateEndpointConnection : global::Pulumi.CustomResource @@ -26,7 +34,7 @@ public partial class PrivateEndpointConnection : global::Pulumi.CustomResource public Output ClusterId { get; private set; } = null!; /// - /// Client side ID of the PrivateLink connection. + /// Client side ID of the Private Endpoint Connection. /// [Output("endpointId")] public Output EndpointId { get; private set; } = null!; @@ -38,7 +46,7 @@ public partial class PrivateEndpointConnection : global::Pulumi.CustomResource public Output RegionName { get; private set; } = null!; /// - /// Server side ID of the PrivateLink connection. + /// Server side ID of the Private Endpoint Connection. /// [Output("serviceId")] public Output ServiceId { get; private set; } = null!; @@ -94,7 +102,7 @@ public sealed class PrivateEndpointConnectionArgs : global::Pulumi.ResourceArgs public Input ClusterId { get; set; } = null!; /// - /// Client side ID of the PrivateLink connection. + /// Client side ID of the Private Endpoint Connection. /// [Input("endpointId", required: true)] public Input EndpointId { get; set; } = null!; @@ -117,7 +125,7 @@ public sealed class PrivateEndpointConnectionState : global::Pulumi.ResourceArgs public Input? ClusterId { get; set; } /// - /// Client side ID of the PrivateLink connection. + /// Client side ID of the Private Endpoint Connection. /// [Input("endpointId")] public Input? EndpointId { get; set; } @@ -129,7 +137,7 @@ public sealed class PrivateEndpointConnectionState : global::Pulumi.ResourceArgs public Input? RegionName { get; set; } /// - /// Server side ID of the PrivateLink connection. + /// Server side ID of the Private Endpoint Connection. /// [Input("serviceId")] public Input? ServiceId { get; set; } diff --git a/sdk/dotnet/PrivateEndpointServices.cs b/sdk/dotnet/PrivateEndpointServices.cs index fbfe7b7..4c616c9 100644 --- a/sdk/dotnet/PrivateEndpointServices.cs +++ b/sdk/dotnet/PrivateEndpointServices.cs @@ -11,7 +11,35 @@ namespace Pulumiverse.Cockroach { /// - /// PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP). + /// PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var cockroach = new Cockroach.PrivateEndpointServices("cockroach", new() + /// { + /// ClusterId = clusterId, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format: <cluster id> + /// + /// ```sh + /// $ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + /// ``` /// [CockroachResourceType("cockroach:index/privateEndpointServices:PrivateEndpointServices")] public partial class PrivateEndpointServices : global::Pulumi.CustomResource diff --git a/sdk/dotnet/PrivateEndpointTrustedOwner.cs b/sdk/dotnet/PrivateEndpointTrustedOwner.cs index fe12b37..cb89eae 100644 --- a/sdk/dotnet/PrivateEndpointTrustedOwner.cs +++ b/sdk/dotnet/PrivateEndpointTrustedOwner.cs @@ -12,6 +12,36 @@ namespace Pulumiverse.Cockroach { /// /// Private Endpoint Trusted Owner. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var example = new Cockroach.PrivateEndpointTrustedOwner("example", new() + /// { + /// ClusterId = clusterId, + /// Type = "AWS_ACCOUNT_ID", + /// ExternalOwnerId = "012345678901", + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format: <cluster id>:<owner id> + /// + /// ```sh + /// $ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49 + /// ``` /// [CockroachResourceType("cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner")] public partial class PrivateEndpointTrustedOwner : global::Pulumi.CustomResource diff --git a/sdk/dotnet/SqlUser.cs b/sdk/dotnet/SqlUser.cs index 49df0bb..58fed92 100644 --- a/sdk/dotnet/SqlUser.cs +++ b/sdk/dotnet/SqlUser.cs @@ -12,6 +12,37 @@ namespace Pulumiverse.Cockroach { /// /// CockroachDB SQL user. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var sqlUserPassword = config.Require("sqlUserPassword"); + /// var cockroach = new Cockroach.SqlUser("cockroach", new() + /// { + /// Name = "example-sql-user", + /// Password = sqlUserPassword, + /// ClusterId = clusterId, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// format: <cluster id>:<sql user name> + /// + /// ```sh + /// $ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill + /// ``` /// [CockroachResourceType("cockroach:index/sqlUser:SqlUser")] public partial class SqlUser : global::Pulumi.CustomResource diff --git a/sdk/dotnet/UserRoleGrant.cs b/sdk/dotnet/UserRoleGrant.cs new file mode 100644 index 0000000..02403ae --- /dev/null +++ b/sdk/dotnet/UserRoleGrant.cs @@ -0,0 +1,122 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; +using Pulumi; + +namespace Pulumiverse.Cockroach +{ + /// + /// ## Example Usage + /// + /// ## Import + /// + /// Cluster and folder level role grants can be imported using: + /// + /// <user_id>,<role_name>,<resource_type>,<resource_id> + /// + /// ```sh + /// $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831 + /// ``` + /// + /// Organization level grants can omit the resource_id + /// + /// ```sh + /// $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION + /// ``` + /// + [CockroachResourceType("cockroach:index/userRoleGrant:UserRoleGrant")] + public partial class UserRoleGrant : global::Pulumi.CustomResource + { + [Output("role")] + public Output Role { get; private set; } = null!; + + /// + /// ID of the user to grant these roles to. + /// + [Output("userId")] + public Output UserId { get; private set; } = null!; + + + /// + /// Create a UserRoleGrant resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public UserRoleGrant(string name, UserRoleGrantArgs args, CustomResourceOptions? options = null) + : base("cockroach:index/userRoleGrant:UserRoleGrant", name, args ?? new UserRoleGrantArgs(), MakeResourceOptions(options, "")) + { + } + + private UserRoleGrant(string name, Input id, UserRoleGrantState? state = null, CustomResourceOptions? options = null) + : base("cockroach:index/userRoleGrant:UserRoleGrant", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + PluginDownloadURL = "github://api.github.com/pulumiverse", + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing UserRoleGrant resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static UserRoleGrant Get(string name, Input id, UserRoleGrantState? state = null, CustomResourceOptions? options = null) + { + return new UserRoleGrant(name, id, state, options); + } + } + + public sealed class UserRoleGrantArgs : global::Pulumi.ResourceArgs + { + [Input("role", required: true)] + public Input Role { get; set; } = null!; + + /// + /// ID of the user to grant these roles to. + /// + [Input("userId", required: true)] + public Input UserId { get; set; } = null!; + + public UserRoleGrantArgs() + { + } + public static new UserRoleGrantArgs Empty => new UserRoleGrantArgs(); + } + + public sealed class UserRoleGrantState : global::Pulumi.ResourceArgs + { + [Input("role")] + public Input? Role { get; set; } + + /// + /// ID of the user to grant these roles to. + /// + [Input("userId")] + public Input? UserId { get; set; } + + public UserRoleGrantState() + { + } + public static new UserRoleGrantState Empty => new UserRoleGrantState(); + } +} diff --git a/sdk/dotnet/UserRoleGrants.cs b/sdk/dotnet/UserRoleGrants.cs index 47616c3..c2b9ee1 100644 --- a/sdk/dotnet/UserRoleGrants.cs +++ b/sdk/dotnet/UserRoleGrants.cs @@ -11,7 +11,15 @@ namespace Pulumiverse.Cockroach { /// - /// Role grants for a single user. + /// ## Example Usage + /// + /// ## Import + /// + /// format: <user id> + /// + /// ```sh + /// $ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + /// ``` /// [CockroachResourceType("cockroach:index/userRoleGrants:UserRoleGrants")] public partial class UserRoleGrants : global::Pulumi.CustomResource diff --git a/sdk/dotnet/VersionDeferral.cs b/sdk/dotnet/VersionDeferral.cs index 8bbf6d0..3dfddc0 100644 --- a/sdk/dotnet/VersionDeferral.cs +++ b/sdk/dotnet/VersionDeferral.cs @@ -12,10 +12,38 @@ namespace Pulumiverse.Cockroach { /// /// Configure minor version upgrade deferral for a cluster. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Cockroach = Pulumiverse.Cockroach; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var config = new Config(); + /// var clusterId = config.Require("clusterId"); + /// var offsetDuration = config.Get("offsetDuration") ?? "FIXED_DEFERRAL"; + /// var example = new Cockroach.VersionDeferral("example", new() + /// { + /// ClusterId = clusterId, + /// DeferralPolicy = offsetDuration, + /// }); + /// + /// }); + /// ``` /// [CockroachResourceType("cockroach:index/versionDeferral:VersionDeferral")] public partial class VersionDeferral : global::Pulumi.CustomResource { + /// + /// Cluster ID. + /// + [Output("clusterId")] + public Output ClusterId { get; private set; } = null!; + /// /// The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. /// @@ -69,6 +97,12 @@ public static VersionDeferral Get(string name, Input id, VersionDeferral public sealed class VersionDeferralArgs : global::Pulumi.ResourceArgs { + /// + /// Cluster ID. + /// + [Input("clusterId", required: true)] + public Input ClusterId { get; set; } = null!; + /// /// The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. /// @@ -83,6 +117,12 @@ public VersionDeferralArgs() public sealed class VersionDeferralState : global::Pulumi.ResourceArgs { + /// + /// Cluster ID. + /// + [Input("clusterId")] + public Input? ClusterId { get; set; } + /// /// The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. /// diff --git a/sdk/go/cockroach/allowList.go b/sdk/go/cockroach/allowList.go index d1641ad..aa387fb 100644 --- a/sdk/go/cockroach/allowList.go +++ b/sdk/go/cockroach/allowList.go @@ -13,6 +13,45 @@ import ( ) // List of IP ranges allowed to access the cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := cockroach.NewAllowList(ctx, "vpn", &cockroach.AllowListArgs{ +// Name: pulumi.String("vpn"), +// CidrIp: pulumi.String("123.123.1.1"), +// CidrMask: pulumi.Int(32), +// Ui: pulumi.Bool(true), +// Sql: pulumi.Bool(true), +// ClusterId: pulumi.Any(staging.Id), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format: :/ +// +// ```sh +// $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32 +// ``` type AllowList struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/caCert.go b/sdk/go/cockroach/caCert.go index ca91707..ff6ef07 100644 --- a/sdk/go/cockroach/caCert.go +++ b/sdk/go/cockroach/caCert.go @@ -13,6 +13,37 @@ import ( ) // Manages client CA certs. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// // The X509 certificate in PEM format. +// clientCertificate := cfg.Require("clientCertificate") +// _, err := cockroach.NewCaCert(ctx, "prod", &cockroach.CaCertArgs{ +// ClusterId: pulumi.Any(prodCockroachCluster.Id), +// X509PemCert: pulumi.String(clientCertificate), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type CaCert struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/cmek.go b/sdk/go/cockroach/cmek.go index 9ab52b7..52d5eec 100644 --- a/sdk/go/cockroach/cmek.go +++ b/sdk/go/cockroach/cmek.go @@ -13,6 +13,42 @@ import ( ) // Customer-managed encryption keys (CMEK) resource for a single cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := cockroach.NewCmek(ctx, "dedicated", &cockroach.CmekArgs{ +// ClusterId: pulumi.Any(dedicatedCockroachCluster.Id), +// Regions: cockroach.CmekRegionArray{ +// &cockroach.CmekRegionArgs{ +// Region: pulumi.String("us-central-1"), +// Key: &cockroach.CmekRegionKeyArgs{ +// AuthPrincipal: pulumi.String("arn:aws:iam::account:role/role-name-with-path"), +// Type: pulumi.String("AWS_KMS"), +// Uri: pulumi.String("arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key"), +// }, +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type Cmek struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/database.go b/sdk/go/cockroach/database.go index eff64d3..ccbfe1a 100644 --- a/sdk/go/cockroach/database.go +++ b/sdk/go/cockroach/database.go @@ -13,6 +13,44 @@ import ( ) // CockroachDB database. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// _, err := cockroach.NewDatabase(ctx, "cockroach", &cockroach.DatabaseArgs{ +// Name: pulumi.String("example-database"), +// ClusterId: pulumi.String(clusterId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format: : +// +// ```sh +// $ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase +// ``` type Database struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/finalizeVersionUpgrade.go b/sdk/go/cockroach/finalizeVersionUpgrade.go index 8d019b5..6b6f63f 100644 --- a/sdk/go/cockroach/finalizeVersionUpgrade.go +++ b/sdk/go/cockroach/finalizeVersionUpgrade.go @@ -13,6 +13,37 @@ import ( ) // Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// cockroachVersion := cfg.Require("cockroachVersion") +// _, err := cockroach.NewFinalizeVersionUpgrade(ctx, "cockroach", &cockroach.FinalizeVersionUpgradeArgs{ +// ClusterId: pulumi.String(clusterId), +// CockroachVersion: pulumi.String(cockroachVersion), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type FinalizeVersionUpgrade struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/folder.go b/sdk/go/cockroach/folder.go index db99bb2..26821f3 100644 --- a/sdk/go/cockroach/folder.go +++ b/sdk/go/cockroach/folder.go @@ -13,6 +13,40 @@ import ( ) // CockroachDB Cloud folder. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// aTeam, err := cockroach.NewFolder(ctx, "a_team", &cockroach.FolderArgs{ +// Name: pulumi.String("a-team"), +// ParentId: pulumi.String("root"), +// }) +// if err != nil { +// return err +// } +// _, err = cockroach.NewFolder(ctx, "a_team_dev", &cockroach.FolderArgs{ +// Name: pulumi.String("dev"), +// ParentId: aTeam.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type Folder struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/getClusterCert.go b/sdk/go/cockroach/getClusterCert.go index 6ac76be..fd40954 100644 --- a/sdk/go/cockroach/getClusterCert.go +++ b/sdk/go/cockroach/getClusterCert.go @@ -14,6 +14,35 @@ import ( // TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/-ca.crt` on MacOS or Linux, or `$env:appdata\CockroachCloud\certs\-ca.crt` on Windows. // // Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\postgresql\root.crt` on Windows. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// _, err := cockroach.GetClusterCert(ctx, &cockroach.GetClusterCertArgs{ +// Id: clusterId, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetClusterCert(ctx *pulumi.Context, args *GetClusterCertArgs, opts ...pulumi.InvokeOption) (*GetClusterCertResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetClusterCertResult @@ -40,14 +69,20 @@ type GetClusterCertResult struct { func GetClusterCertOutput(ctx *pulumi.Context, args GetClusterCertOutputArgs, opts ...pulumi.InvokeOption) GetClusterCertResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). - ApplyT(func(v interface{}) (GetClusterCertResult, error) { + ApplyT(func(v interface{}) (GetClusterCertResultOutput, error) { args := v.(GetClusterCertArgs) - r, err := GetClusterCert(ctx, &args, opts...) - var s GetClusterCertResult - if r != nil { - s = *r + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetClusterCertResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getClusterCert:getClusterCert", args, &rv, "", opts...) + if err != nil { + return GetClusterCertResultOutput{}, err + } + + output := pulumi.ToOutput(rv).(GetClusterCertResultOutput) + if secret { + return pulumi.ToSecret(output).(GetClusterCertResultOutput), nil } - return s, err + return output, nil }).(GetClusterCertResultOutput) } diff --git a/sdk/go/cockroach/getCockroachCluster.go b/sdk/go/cockroach/getCockroachCluster.go index 00f797a..db7138a 100644 --- a/sdk/go/cockroach/getCockroachCluster.go +++ b/sdk/go/cockroach/getCockroachCluster.go @@ -12,6 +12,35 @@ import ( ) // CockroachDB Cloud cluster. Can be Dedicated or Serverless. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// _, err := cockroach.GetCockroachCluster(ctx, &cockroach.GetCockroachClusterArgs{ +// Id: clusterId, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetCockroachCluster(ctx *pulumi.Context, args *GetCockroachClusterArgs, opts ...pulumi.InvokeOption) (*GetCockroachClusterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCockroachClusterResult @@ -47,14 +76,20 @@ type GetCockroachClusterResult struct { func GetCockroachClusterOutput(ctx *pulumi.Context, args GetCockroachClusterOutputArgs, opts ...pulumi.InvokeOption) GetCockroachClusterResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). - ApplyT(func(v interface{}) (GetCockroachClusterResult, error) { + ApplyT(func(v interface{}) (GetCockroachClusterResultOutput, error) { args := v.(GetCockroachClusterArgs) - r, err := GetCockroachCluster(ctx, &args, opts...) - var s GetCockroachClusterResult - if r != nil { - s = *r + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetCockroachClusterResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getCockroachCluster:getCockroachCluster", args, &rv, "", opts...) + if err != nil { + return GetCockroachClusterResultOutput{}, err } - return s, err + + output := pulumi.ToOutput(rv).(GetCockroachClusterResultOutput) + if secret { + return pulumi.ToSecret(output).(GetCockroachClusterResultOutput), nil + } + return output, nil }).(GetCockroachClusterResultOutput) } diff --git a/sdk/go/cockroach/getConnectionString.go b/sdk/go/cockroach/getConnectionString.go index b248b03..5a9b442 100644 --- a/sdk/go/cockroach/getConnectionString.go +++ b/sdk/go/cockroach/getConnectionString.go @@ -12,6 +12,43 @@ import ( ) // Generic connection string for a cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// sqlUserName := cfg.Require("sqlUserName") +// sqlUserPassword := cfg.Require("sqlUserPassword") +// database := cfg.Require("database") +// os := cfg.Require("os") +// _, err := cockroach.GetConnectionString(ctx, &cockroach.GetConnectionStringArgs{ +// Id: clusterId, +// SqlUser: pulumi.StringRef(sqlUserName), +// Password: pulumi.StringRef(sqlUserPassword), +// Database: pulumi.StringRef(database), +// Os: pulumi.StringRef(os), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetConnectionString(ctx *pulumi.Context, args *GetConnectionStringArgs, opts ...pulumi.InvokeOption) (*GetConnectionStringResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetConnectionStringResult @@ -44,14 +81,20 @@ type GetConnectionStringResult struct { func GetConnectionStringOutput(ctx *pulumi.Context, args GetConnectionStringOutputArgs, opts ...pulumi.InvokeOption) GetConnectionStringResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). - ApplyT(func(v interface{}) (GetConnectionStringResult, error) { + ApplyT(func(v interface{}) (GetConnectionStringResultOutput, error) { args := v.(GetConnectionStringArgs) - r, err := GetConnectionString(ctx, &args, opts...) - var s GetConnectionStringResult - if r != nil { - s = *r + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetConnectionStringResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getConnectionString:getConnectionString", args, &rv, "", opts...) + if err != nil { + return GetConnectionStringResultOutput{}, err } - return s, err + + output := pulumi.ToOutput(rv).(GetConnectionStringResultOutput) + if secret { + return pulumi.ToSecret(output).(GetConnectionStringResultOutput), nil + } + return output, nil }).(GetConnectionStringResultOutput) } diff --git a/sdk/go/cockroach/getFolder.go b/sdk/go/cockroach/getFolder.go new file mode 100644 index 0000000..e6fdbf2 --- /dev/null +++ b/sdk/go/cockroach/getFolder.go @@ -0,0 +1,148 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package cockroach + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach/internal" +) + +// A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// prodFolderId := cfg.Require("prodFolderId") +// _, err := cockroach.LookupFolder(ctx, &cockroach.LookupFolderArgs{ +// Path: pulumi.StringRef("/prod/team1"), +// }, nil) +// if err != nil { +// return err +// } +// _, err = cockroach.LookupFolder(ctx, &cockroach.LookupFolderArgs{ +// Id: pulumi.StringRef(prodFolderId), +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func LookupFolder(ctx *pulumi.Context, args *LookupFolderArgs, opts ...pulumi.InvokeOption) (*LookupFolderResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupFolderResult + err := ctx.Invoke("cockroach:index/getFolder:getFolder", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getFolder. +type LookupFolderArgs struct { + // The id the folder. + Id *string `pulumi:"id"` + // An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + Path *string `pulumi:"path"` +} + +// A collection of values returned by getFolder. +type LookupFolderResult struct { + // The id the folder. + Id *string `pulumi:"id"` + // Name of the folder. + Name string `pulumi:"name"` + // The ID of the folders's parent folder. 'root' is used for a folder at the root level. + ParentId string `pulumi:"parentId"` + // An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + Path *string `pulumi:"path"` +} + +func LookupFolderOutput(ctx *pulumi.Context, args LookupFolderOutputArgs, opts ...pulumi.InvokeOption) LookupFolderResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (LookupFolderResultOutput, error) { + args := v.(LookupFolderArgs) + opts = internal.PkgInvokeDefaultOpts(opts) + var rv LookupFolderResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getFolder:getFolder", args, &rv, "", opts...) + if err != nil { + return LookupFolderResultOutput{}, err + } + + output := pulumi.ToOutput(rv).(LookupFolderResultOutput) + if secret { + return pulumi.ToSecret(output).(LookupFolderResultOutput), nil + } + return output, nil + }).(LookupFolderResultOutput) +} + +// A collection of arguments for invoking getFolder. +type LookupFolderOutputArgs struct { + // The id the folder. + Id pulumi.StringPtrInput `pulumi:"id"` + // An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + Path pulumi.StringPtrInput `pulumi:"path"` +} + +func (LookupFolderOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*LookupFolderArgs)(nil)).Elem() +} + +// A collection of values returned by getFolder. +type LookupFolderResultOutput struct{ *pulumi.OutputState } + +func (LookupFolderResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*LookupFolderResult)(nil)).Elem() +} + +func (o LookupFolderResultOutput) ToLookupFolderResultOutput() LookupFolderResultOutput { + return o +} + +func (o LookupFolderResultOutput) ToLookupFolderResultOutputWithContext(ctx context.Context) LookupFolderResultOutput { + return o +} + +// The id the folder. +func (o LookupFolderResultOutput) Id() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupFolderResult) *string { return v.Id }).(pulumi.StringPtrOutput) +} + +// Name of the folder. +func (o LookupFolderResultOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v LookupFolderResult) string { return v.Name }).(pulumi.StringOutput) +} + +// The ID of the folders's parent folder. 'root' is used for a folder at the root level. +func (o LookupFolderResultOutput) ParentId() pulumi.StringOutput { + return o.ApplyT(func(v LookupFolderResult) string { return v.ParentId }).(pulumi.StringOutput) +} + +// An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) +func (o LookupFolderResultOutput) Path() pulumi.StringPtrOutput { + return o.ApplyT(func(v LookupFolderResult) *string { return v.Path }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterOutputType(LookupFolderResultOutput{}) +} diff --git a/sdk/go/cockroach/getOrganization.go b/sdk/go/cockroach/getOrganization.go index e27495e..8e0540c 100644 --- a/sdk/go/cockroach/getOrganization.go +++ b/sdk/go/cockroach/getOrganization.go @@ -12,6 +12,30 @@ import ( ) // Information about the organization associated with the user's API key. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := cockroach.GetOrganization(ctx, map[string]interface{}{}, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetOrganization(ctx *pulumi.Context, opts ...pulumi.InvokeOption) (*GetOrganizationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetOrganizationResult @@ -35,13 +59,19 @@ type GetOrganizationResult struct { } func GetOrganizationOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetOrganizationResultOutput { - return pulumi.ToOutput(0).ApplyT(func(int) (GetOrganizationResult, error) { - r, err := GetOrganization(ctx, opts...) - var s GetOrganizationResult - if r != nil { - s = *r + return pulumi.ToOutput(0).ApplyT(func(int) (GetOrganizationResultOutput, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetOrganizationResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getOrganization:getOrganization", nil, &rv, "", opts...) + if err != nil { + return GetOrganizationResultOutput{}, err } - return s, err + + output := pulumi.ToOutput(rv).(GetOrganizationResultOutput) + if secret { + return pulumi.ToSecret(output).(GetOrganizationResultOutput), nil + } + return output, nil }).(GetOrganizationResultOutput) } diff --git a/sdk/go/cockroach/getPersonUser.go b/sdk/go/cockroach/getPersonUser.go index ac2124c..5d4fbec 100644 --- a/sdk/go/cockroach/getPersonUser.go +++ b/sdk/go/cockroach/getPersonUser.go @@ -12,6 +12,35 @@ import ( ) // Information about an individual user. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// emailAddress := cfg.Require("emailAddress") +// _, err := cockroach.GetPersonUser(ctx, &cockroach.GetPersonUserArgs{ +// Email: emailAddress, +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` func GetPersonUser(ctx *pulumi.Context, args *GetPersonUserArgs, opts ...pulumi.InvokeOption) (*GetPersonUserResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPersonUserResult @@ -38,14 +67,20 @@ type GetPersonUserResult struct { func GetPersonUserOutput(ctx *pulumi.Context, args GetPersonUserOutputArgs, opts ...pulumi.InvokeOption) GetPersonUserResultOutput { return pulumi.ToOutputWithContext(context.Background(), args). - ApplyT(func(v interface{}) (GetPersonUserResult, error) { + ApplyT(func(v interface{}) (GetPersonUserResultOutput, error) { args := v.(GetPersonUserArgs) - r, err := GetPersonUser(ctx, &args, opts...) - var s GetPersonUserResult - if r != nil { - s = *r + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetPersonUserResult + secret, err := ctx.InvokePackageRaw("cockroach:index/getPersonUser:getPersonUser", args, &rv, "", opts...) + if err != nil { + return GetPersonUserResultOutput{}, err } - return s, err + + output := pulumi.ToOutput(rv).(GetPersonUserResultOutput) + if secret { + return pulumi.ToSecret(output).(GetPersonUserResultOutput), nil + } + return output, nil }).(GetPersonUserResultOutput) } diff --git a/sdk/go/cockroach/init.go b/sdk/go/cockroach/init.go index 6ef7cdd..ac971ee 100644 --- a/sdk/go/cockroach/init.go +++ b/sdk/go/cockroach/init.go @@ -53,6 +53,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &PrivateEndpointTrustedOwner{} case "cockroach:index/sqlUser:SqlUser": r = &SqlUser{} + case "cockroach:index/userRoleGrant:UserRoleGrant": + r = &UserRoleGrant{} case "cockroach:index/userRoleGrants:UserRoleGrants": r = &UserRoleGrants{} case "cockroach:index/versionDeferral:VersionDeferral": @@ -168,6 +170,11 @@ func init() { "index/sqlUser", &module{version}, ) + pulumi.RegisterResourceModule( + "cockroach", + "index/userRoleGrant", + &module{version}, + ) pulumi.RegisterResourceModule( "cockroach", "index/userRoleGrants", diff --git a/sdk/go/cockroach/maintenanceWindow.go b/sdk/go/cockroach/maintenanceWindow.go index 02ce59f..f3dd093 100644 --- a/sdk/go/cockroach/maintenanceWindow.go +++ b/sdk/go/cockroach/maintenanceWindow.go @@ -13,6 +13,45 @@ import ( ) // Maintenance window configuration for a cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// offsetDuration := float64(172800) +// if param := cfg.GetFloat64("offsetDuration"); param != 0 { +// offsetDuration = param +// } +// windowDuration := float64(21600) +// if param := cfg.GetFloat64("windowDuration"); param != 0 { +// windowDuration = param +// } +// _, err := cockroach.NewMaintenanceWindow(ctx, "example", &cockroach.MaintenanceWindowArgs{ +// ClusterId: pulumi.String(clusterId), +// OffsetDuration: pulumi.Float64(offsetDuration), +// WindowDuration: pulumi.Float64(windowDuration), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type MaintenanceWindow struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/metricExportCloudwatchConfig.go b/sdk/go/cockroach/metricExportCloudwatchConfig.go index 65fa98d..a9bdb02 100644 --- a/sdk/go/cockroach/metricExportCloudwatchConfig.go +++ b/sdk/go/cockroach/metricExportCloudwatchConfig.go @@ -13,6 +13,41 @@ import ( ) // Amazon CloudWatch metric export configuration for a cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// roleArn := cfg.Require("roleArn") +// logGroupName := cfg.Require("logGroupName") +// awsRegion := cfg.Require("awsRegion") +// _, err := cockroach.NewMetricExportCloudwatchConfig(ctx, "example", &cockroach.MetricExportCloudwatchConfigArgs{ +// ClusterId: pulumi.String(clusterId), +// RoleArn: pulumi.String(roleArn), +// LogGroupName: pulumi.String(logGroupName), +// TargetRegion: pulumi.String(awsRegion), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type MetricExportCloudwatchConfig struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/metricExportDatadogConfig.go b/sdk/go/cockroach/metricExportDatadogConfig.go index 10a8efd..e6f7c54 100644 --- a/sdk/go/cockroach/metricExportDatadogConfig.go +++ b/sdk/go/cockroach/metricExportDatadogConfig.go @@ -13,6 +13,39 @@ import ( ) // DataDog metric export configuration for a cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// datadogSite := cfg.Require("datadogSite") +// datadogApiKey := cfg.Require("datadogApiKey") +// _, err := cockroach.NewMetricExportDatadogConfig(ctx, "example", &cockroach.MetricExportDatadogConfigArgs{ +// ClusterId: pulumi.String(clusterId), +// Site: pulumi.String(datadogSite), +// ApiKey: pulumi.String(datadogApiKey), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type MetricExportDatadogConfig struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/privateEndpointConnection.go b/sdk/go/cockroach/privateEndpointConnection.go index 515e9e8..9f00f3b 100644 --- a/sdk/go/cockroach/privateEndpointConnection.go +++ b/sdk/go/cockroach/privateEndpointConnection.go @@ -12,18 +12,26 @@ import ( "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach/internal" ) -// AWS PrivateLink Endpoint Connection. +// Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network. +// +// ## Import +// +// format: : +// +// ```sh +// $ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc +// ``` type PrivateEndpointConnection struct { pulumi.CustomResourceState // Cloud provider associated with this connection. CloudProvider pulumi.StringOutput `pulumi:"cloudProvider"` ClusterId pulumi.StringOutput `pulumi:"clusterId"` - // Client side ID of the PrivateLink connection. + // Client side ID of the Private Endpoint Connection. EndpointId pulumi.StringOutput `pulumi:"endpointId"` // Cloud provider region code associated with this connection. RegionName pulumi.StringOutput `pulumi:"regionName"` - // Server side ID of the PrivateLink connection. + // Server side ID of the Private Endpoint Connection. ServiceId pulumi.StringOutput `pulumi:"serviceId"` } @@ -66,11 +74,11 @@ type privateEndpointConnectionState struct { // Cloud provider associated with this connection. CloudProvider *string `pulumi:"cloudProvider"` ClusterId *string `pulumi:"clusterId"` - // Client side ID of the PrivateLink connection. + // Client side ID of the Private Endpoint Connection. EndpointId *string `pulumi:"endpointId"` // Cloud provider region code associated with this connection. RegionName *string `pulumi:"regionName"` - // Server side ID of the PrivateLink connection. + // Server side ID of the Private Endpoint Connection. ServiceId *string `pulumi:"serviceId"` } @@ -78,11 +86,11 @@ type PrivateEndpointConnectionState struct { // Cloud provider associated with this connection. CloudProvider pulumi.StringPtrInput ClusterId pulumi.StringPtrInput - // Client side ID of the PrivateLink connection. + // Client side ID of the Private Endpoint Connection. EndpointId pulumi.StringPtrInput // Cloud provider region code associated with this connection. RegionName pulumi.StringPtrInput - // Server side ID of the PrivateLink connection. + // Server side ID of the Private Endpoint Connection. ServiceId pulumi.StringPtrInput } @@ -92,14 +100,14 @@ func (PrivateEndpointConnectionState) ElementType() reflect.Type { type privateEndpointConnectionArgs struct { ClusterId string `pulumi:"clusterId"` - // Client side ID of the PrivateLink connection. + // Client side ID of the Private Endpoint Connection. EndpointId string `pulumi:"endpointId"` } // The set of arguments for constructing a PrivateEndpointConnection resource. type PrivateEndpointConnectionArgs struct { ClusterId pulumi.StringInput - // Client side ID of the PrivateLink connection. + // Client side ID of the Private Endpoint Connection. EndpointId pulumi.StringInput } @@ -199,7 +207,7 @@ func (o PrivateEndpointConnectionOutput) ClusterId() pulumi.StringOutput { return o.ApplyT(func(v *PrivateEndpointConnection) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) } -// Client side ID of the PrivateLink connection. +// Client side ID of the Private Endpoint Connection. func (o PrivateEndpointConnectionOutput) EndpointId() pulumi.StringOutput { return o.ApplyT(func(v *PrivateEndpointConnection) pulumi.StringOutput { return v.EndpointId }).(pulumi.StringOutput) } @@ -209,7 +217,7 @@ func (o PrivateEndpointConnectionOutput) RegionName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateEndpointConnection) pulumi.StringOutput { return v.RegionName }).(pulumi.StringOutput) } -// Server side ID of the PrivateLink connection. +// Server side ID of the Private Endpoint Connection. func (o PrivateEndpointConnectionOutput) ServiceId() pulumi.StringOutput { return o.ApplyT(func(v *PrivateEndpointConnection) pulumi.StringOutput { return v.ServiceId }).(pulumi.StringOutput) } diff --git a/sdk/go/cockroach/privateEndpointServices.go b/sdk/go/cockroach/privateEndpointServices.go index ef64910..a859d0e 100644 --- a/sdk/go/cockroach/privateEndpointServices.go +++ b/sdk/go/cockroach/privateEndpointServices.go @@ -12,7 +12,44 @@ import ( "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach/internal" ) -// PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP). +// PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// _, err := cockroach.NewPrivateEndpointServices(ctx, "cockroach", &cockroach.PrivateEndpointServicesArgs{ +// ClusterId: pulumi.String(clusterId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format: +// +// ```sh +// $ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d +// ``` type PrivateEndpointServices struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/privateEndpointTrustedOwner.go b/sdk/go/cockroach/privateEndpointTrustedOwner.go index 591a275..368aa44 100644 --- a/sdk/go/cockroach/privateEndpointTrustedOwner.go +++ b/sdk/go/cockroach/privateEndpointTrustedOwner.go @@ -13,6 +13,45 @@ import ( ) // Private Endpoint Trusted Owner. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// _, err := cockroach.NewPrivateEndpointTrustedOwner(ctx, "example", &cockroach.PrivateEndpointTrustedOwnerArgs{ +// ClusterId: pulumi.String(clusterId), +// Type: pulumi.String("AWS_ACCOUNT_ID"), +// ExternalOwnerId: pulumi.String("012345678901"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format: : +// +// ```sh +// $ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49 +// ``` type PrivateEndpointTrustedOwner struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/pulumiTypes.go b/sdk/go/cockroach/pulumiTypes.go index 827ff64..bf1b8ed 100644 --- a/sdk/go/cockroach/pulumiTypes.go +++ b/sdk/go/cockroach/pulumiTypes.go @@ -1323,9 +1323,16 @@ func (o LogExportConfigGroupArrayOutput) Index(i pulumi.IntInput) LogExportConfi } type PrivateEndpointServicesService struct { + // Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + AvailabilityZoneIds []string `pulumi:"availabilityZoneIds"` + // Deprecated: nested aws fields have been moved one level up. These fields will be removed in a future version Aws *PrivateEndpointServicesServiceAws `pulumi:"aws"` // Cloud provider associated with this service. CloudProvider *string `pulumi:"cloudProvider"` + // Server side ID of the private endpoint connection. + EndpointServiceId *string `pulumi:"endpointServiceId"` + // Name of the endpoint service. + Name *string `pulumi:"name"` // Cloud provider region code associated with this service. RegionName *string `pulumi:"regionName"` // Operation status of the service. @@ -1344,9 +1351,16 @@ type PrivateEndpointServicesServiceInput interface { } type PrivateEndpointServicesServiceArgs struct { + // Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + AvailabilityZoneIds pulumi.StringArrayInput `pulumi:"availabilityZoneIds"` + // Deprecated: nested aws fields have been moved one level up. These fields will be removed in a future version Aws PrivateEndpointServicesServiceAwsPtrInput `pulumi:"aws"` // Cloud provider associated with this service. CloudProvider pulumi.StringPtrInput `pulumi:"cloudProvider"` + // Server side ID of the private endpoint connection. + EndpointServiceId pulumi.StringPtrInput `pulumi:"endpointServiceId"` + // Name of the endpoint service. + Name pulumi.StringPtrInput `pulumi:"name"` // Cloud provider region code associated with this service. RegionName pulumi.StringPtrInput `pulumi:"regionName"` // Operation status of the service. @@ -1404,6 +1418,12 @@ func (o PrivateEndpointServicesServiceOutput) ToPrivateEndpointServicesServiceOu return o } +// Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. +func (o PrivateEndpointServicesServiceOutput) AvailabilityZoneIds() pulumi.StringArrayOutput { + return o.ApplyT(func(v PrivateEndpointServicesService) []string { return v.AvailabilityZoneIds }).(pulumi.StringArrayOutput) +} + +// Deprecated: nested aws fields have been moved one level up. These fields will be removed in a future version func (o PrivateEndpointServicesServiceOutput) Aws() PrivateEndpointServicesServiceAwsPtrOutput { return o.ApplyT(func(v PrivateEndpointServicesService) *PrivateEndpointServicesServiceAws { return v.Aws }).(PrivateEndpointServicesServiceAwsPtrOutput) } @@ -1413,6 +1433,16 @@ func (o PrivateEndpointServicesServiceOutput) CloudProvider() pulumi.StringPtrOu return o.ApplyT(func(v PrivateEndpointServicesService) *string { return v.CloudProvider }).(pulumi.StringPtrOutput) } +// Server side ID of the private endpoint connection. +func (o PrivateEndpointServicesServiceOutput) EndpointServiceId() pulumi.StringPtrOutput { + return o.ApplyT(func(v PrivateEndpointServicesService) *string { return v.EndpointServiceId }).(pulumi.StringPtrOutput) +} + +// Name of the endpoint service. +func (o PrivateEndpointServicesServiceOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v PrivateEndpointServicesService) *string { return v.Name }).(pulumi.StringPtrOutput) +} + // Cloud provider region code associated with this service. func (o PrivateEndpointServicesServiceOutput) RegionName() pulumi.StringPtrOutput { return o.ApplyT(func(v PrivateEndpointServicesService) *string { return v.RegionName }).(pulumi.StringPtrOutput) @@ -1618,8 +1648,231 @@ func (o PrivateEndpointServicesServiceAwsPtrOutput) ServiceName() pulumi.StringP }).(pulumi.StringPtrOutput) } +type UserRoleGrantRole struct { + // ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + ResourceId *string `pulumi:"resourceId"` + // Type of resource. Allowed values are: + // * ORGANIZATION + // * CLUSTER + // * FOLDER + ResourceType string `pulumi:"resourceType"` + // Name of the role to grant. Allowed values are: + // * BILLING_COORDINATOR + // * ORG_ADMIN + // * ORG_MEMBER + // * CLUSTER_ADMIN + // * CLUSTER_OPERATOR_WRITER + // * CLUSTER_DEVELOPER + // * CLUSTER_CREATOR + // * FOLDER_ADMIN + // * FOLDER_MOVER + RoleName string `pulumi:"roleName"` +} + +// UserRoleGrantRoleInput is an input type that accepts UserRoleGrantRoleArgs and UserRoleGrantRoleOutput values. +// You can construct a concrete instance of `UserRoleGrantRoleInput` via: +// +// UserRoleGrantRoleArgs{...} +type UserRoleGrantRoleInput interface { + pulumi.Input + + ToUserRoleGrantRoleOutput() UserRoleGrantRoleOutput + ToUserRoleGrantRoleOutputWithContext(context.Context) UserRoleGrantRoleOutput +} + +type UserRoleGrantRoleArgs struct { + // ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + ResourceId pulumi.StringPtrInput `pulumi:"resourceId"` + // Type of resource. Allowed values are: + // * ORGANIZATION + // * CLUSTER + // * FOLDER + ResourceType pulumi.StringInput `pulumi:"resourceType"` + // Name of the role to grant. Allowed values are: + // * BILLING_COORDINATOR + // * ORG_ADMIN + // * ORG_MEMBER + // * CLUSTER_ADMIN + // * CLUSTER_OPERATOR_WRITER + // * CLUSTER_DEVELOPER + // * CLUSTER_CREATOR + // * FOLDER_ADMIN + // * FOLDER_MOVER + RoleName pulumi.StringInput `pulumi:"roleName"` +} + +func (UserRoleGrantRoleArgs) ElementType() reflect.Type { + return reflect.TypeOf((*UserRoleGrantRole)(nil)).Elem() +} + +func (i UserRoleGrantRoleArgs) ToUserRoleGrantRoleOutput() UserRoleGrantRoleOutput { + return i.ToUserRoleGrantRoleOutputWithContext(context.Background()) +} + +func (i UserRoleGrantRoleArgs) ToUserRoleGrantRoleOutputWithContext(ctx context.Context) UserRoleGrantRoleOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantRoleOutput) +} + +func (i UserRoleGrantRoleArgs) ToUserRoleGrantRolePtrOutput() UserRoleGrantRolePtrOutput { + return i.ToUserRoleGrantRolePtrOutputWithContext(context.Background()) +} + +func (i UserRoleGrantRoleArgs) ToUserRoleGrantRolePtrOutputWithContext(ctx context.Context) UserRoleGrantRolePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantRoleOutput).ToUserRoleGrantRolePtrOutputWithContext(ctx) +} + +// UserRoleGrantRolePtrInput is an input type that accepts UserRoleGrantRoleArgs, UserRoleGrantRolePtr and UserRoleGrantRolePtrOutput values. +// You can construct a concrete instance of `UserRoleGrantRolePtrInput` via: +// +// UserRoleGrantRoleArgs{...} +// +// or: +// +// nil +type UserRoleGrantRolePtrInput interface { + pulumi.Input + + ToUserRoleGrantRolePtrOutput() UserRoleGrantRolePtrOutput + ToUserRoleGrantRolePtrOutputWithContext(context.Context) UserRoleGrantRolePtrOutput +} + +type userRoleGrantRolePtrType UserRoleGrantRoleArgs + +func UserRoleGrantRolePtr(v *UserRoleGrantRoleArgs) UserRoleGrantRolePtrInput { + return (*userRoleGrantRolePtrType)(v) +} + +func (*userRoleGrantRolePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**UserRoleGrantRole)(nil)).Elem() +} + +func (i *userRoleGrantRolePtrType) ToUserRoleGrantRolePtrOutput() UserRoleGrantRolePtrOutput { + return i.ToUserRoleGrantRolePtrOutputWithContext(context.Background()) +} + +func (i *userRoleGrantRolePtrType) ToUserRoleGrantRolePtrOutputWithContext(ctx context.Context) UserRoleGrantRolePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantRolePtrOutput) +} + +type UserRoleGrantRoleOutput struct{ *pulumi.OutputState } + +func (UserRoleGrantRoleOutput) ElementType() reflect.Type { + return reflect.TypeOf((*UserRoleGrantRole)(nil)).Elem() +} + +func (o UserRoleGrantRoleOutput) ToUserRoleGrantRoleOutput() UserRoleGrantRoleOutput { + return o +} + +func (o UserRoleGrantRoleOutput) ToUserRoleGrantRoleOutputWithContext(ctx context.Context) UserRoleGrantRoleOutput { + return o +} + +func (o UserRoleGrantRoleOutput) ToUserRoleGrantRolePtrOutput() UserRoleGrantRolePtrOutput { + return o.ToUserRoleGrantRolePtrOutputWithContext(context.Background()) +} + +func (o UserRoleGrantRoleOutput) ToUserRoleGrantRolePtrOutputWithContext(ctx context.Context) UserRoleGrantRolePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v UserRoleGrantRole) *UserRoleGrantRole { + return &v + }).(UserRoleGrantRolePtrOutput) +} + +// ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. +func (o UserRoleGrantRoleOutput) ResourceId() pulumi.StringPtrOutput { + return o.ApplyT(func(v UserRoleGrantRole) *string { return v.ResourceId }).(pulumi.StringPtrOutput) +} + +// Type of resource. Allowed values are: +// - ORGANIZATION +// - CLUSTER +// - FOLDER +func (o UserRoleGrantRoleOutput) ResourceType() pulumi.StringOutput { + return o.ApplyT(func(v UserRoleGrantRole) string { return v.ResourceType }).(pulumi.StringOutput) +} + +// Name of the role to grant. Allowed values are: +// - BILLING_COORDINATOR +// - ORG_ADMIN +// - ORG_MEMBER +// - CLUSTER_ADMIN +// - CLUSTER_OPERATOR_WRITER +// - CLUSTER_DEVELOPER +// - CLUSTER_CREATOR +// - FOLDER_ADMIN +// - FOLDER_MOVER +func (o UserRoleGrantRoleOutput) RoleName() pulumi.StringOutput { + return o.ApplyT(func(v UserRoleGrantRole) string { return v.RoleName }).(pulumi.StringOutput) +} + +type UserRoleGrantRolePtrOutput struct{ *pulumi.OutputState } + +func (UserRoleGrantRolePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**UserRoleGrantRole)(nil)).Elem() +} + +func (o UserRoleGrantRolePtrOutput) ToUserRoleGrantRolePtrOutput() UserRoleGrantRolePtrOutput { + return o +} + +func (o UserRoleGrantRolePtrOutput) ToUserRoleGrantRolePtrOutputWithContext(ctx context.Context) UserRoleGrantRolePtrOutput { + return o +} + +func (o UserRoleGrantRolePtrOutput) Elem() UserRoleGrantRoleOutput { + return o.ApplyT(func(v *UserRoleGrantRole) UserRoleGrantRole { + if v != nil { + return *v + } + var ret UserRoleGrantRole + return ret + }).(UserRoleGrantRoleOutput) +} + +// ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. +func (o UserRoleGrantRolePtrOutput) ResourceId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *UserRoleGrantRole) *string { + if v == nil { + return nil + } + return v.ResourceId + }).(pulumi.StringPtrOutput) +} + +// Type of resource. Allowed values are: +// - ORGANIZATION +// - CLUSTER +// - FOLDER +func (o UserRoleGrantRolePtrOutput) ResourceType() pulumi.StringPtrOutput { + return o.ApplyT(func(v *UserRoleGrantRole) *string { + if v == nil { + return nil + } + return &v.ResourceType + }).(pulumi.StringPtrOutput) +} + +// Name of the role to grant. Allowed values are: +// - BILLING_COORDINATOR +// - ORG_ADMIN +// - ORG_MEMBER +// - CLUSTER_ADMIN +// - CLUSTER_OPERATOR_WRITER +// - CLUSTER_DEVELOPER +// - CLUSTER_CREATOR +// - FOLDER_ADMIN +// - FOLDER_MOVER +func (o UserRoleGrantRolePtrOutput) RoleName() pulumi.StringPtrOutput { + return o.ApplyT(func(v *UserRoleGrantRole) *string { + if v == nil { + return nil + } + return &v.RoleName + }).(pulumi.StringPtrOutput) +} + type UserRoleGrantsRole struct { - // ID of the resource. Omit if resourceType is 'ORGANIZATION'. + // ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. ResourceId *string `pulumi:"resourceId"` // Type of resource. Allowed values are: // * ORGANIZATION @@ -1627,8 +1880,6 @@ type UserRoleGrantsRole struct { // * FOLDER ResourceType string `pulumi:"resourceType"` // Name of the role to grant. Allowed values are: - // * DEVELOPER - // * ADMIN // * BILLING_COORDINATOR // * ORG_ADMIN // * ORG_MEMBER @@ -1653,7 +1904,7 @@ type UserRoleGrantsRoleInput interface { } type UserRoleGrantsRoleArgs struct { - // ID of the resource. Omit if resourceType is 'ORGANIZATION'. + // ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. ResourceId pulumi.StringPtrInput `pulumi:"resourceId"` // Type of resource. Allowed values are: // * ORGANIZATION @@ -1661,8 +1912,6 @@ type UserRoleGrantsRoleArgs struct { // * FOLDER ResourceType pulumi.StringInput `pulumi:"resourceType"` // Name of the role to grant. Allowed values are: - // * DEVELOPER - // * ADMIN // * BILLING_COORDINATOR // * ORG_ADMIN // * ORG_MEMBER @@ -1726,7 +1975,7 @@ func (o UserRoleGrantsRoleOutput) ToUserRoleGrantsRoleOutputWithContext(ctx cont return o } -// ID of the resource. Omit if resourceType is 'ORGANIZATION'. +// ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. func (o UserRoleGrantsRoleOutput) ResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v UserRoleGrantsRole) *string { return v.ResourceId }).(pulumi.StringPtrOutput) } @@ -1740,8 +1989,6 @@ func (o UserRoleGrantsRoleOutput) ResourceType() pulumi.StringOutput { } // Name of the role to grant. Allowed values are: -// - DEVELOPER -// - ADMIN // - BILLING_COORDINATOR // - ORG_ADMIN // - ORG_MEMBER @@ -2252,6 +2499,8 @@ func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateEndpointServicesServiceArrayInput)(nil)).Elem(), PrivateEndpointServicesServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateEndpointServicesServiceAwsInput)(nil)).Elem(), PrivateEndpointServicesServiceAwsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateEndpointServicesServiceAwsPtrInput)(nil)).Elem(), PrivateEndpointServicesServiceAwsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantRoleInput)(nil)).Elem(), UserRoleGrantRoleArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantRolePtrInput)(nil)).Elem(), UserRoleGrantRoleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantsRoleInput)(nil)).Elem(), UserRoleGrantsRoleArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantsRoleArrayInput)(nil)).Elem(), UserRoleGrantsRoleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetCockroachClusterDedicatedInput)(nil)).Elem(), GetCockroachClusterDedicatedArgs{}) @@ -2281,6 +2530,8 @@ func init() { pulumi.RegisterOutputType(PrivateEndpointServicesServiceArrayOutput{}) pulumi.RegisterOutputType(PrivateEndpointServicesServiceAwsOutput{}) pulumi.RegisterOutputType(PrivateEndpointServicesServiceAwsPtrOutput{}) + pulumi.RegisterOutputType(UserRoleGrantRoleOutput{}) + pulumi.RegisterOutputType(UserRoleGrantRolePtrOutput{}) pulumi.RegisterOutputType(UserRoleGrantsRoleOutput{}) pulumi.RegisterOutputType(UserRoleGrantsRoleArrayOutput{}) pulumi.RegisterOutputType(GetCockroachClusterDedicatedOutput{}) diff --git a/sdk/go/cockroach/sqlUser.go b/sdk/go/cockroach/sqlUser.go index 2def5c5..d11b529 100644 --- a/sdk/go/cockroach/sqlUser.go +++ b/sdk/go/cockroach/sqlUser.go @@ -13,6 +13,46 @@ import ( ) // CockroachDB SQL user. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// sqlUserPassword := cfg.Require("sqlUserPassword") +// _, err := cockroach.NewSqlUser(ctx, "cockroach", &cockroach.SqlUserArgs{ +// Name: pulumi.String("example-sql-user"), +// Password: pulumi.String(sqlUserPassword), +// ClusterId: pulumi.String(clusterId), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// format: : +// +// ```sh +// $ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill +// ``` type SqlUser struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/userRoleGrant.go b/sdk/go/cockroach/userRoleGrant.go new file mode 100644 index 0000000..e73f547 --- /dev/null +++ b/sdk/go/cockroach/userRoleGrant.go @@ -0,0 +1,247 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package cockroach + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach/internal" +) + +// ## Example Usage +// +// ## Import +// +// Cluster and folder level role grants can be imported using: +// +// ,,, +// +// ```sh +// $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831 +// ``` +// +// Organization level grants can omit the resource_id +// +// ```sh +// $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION +// ``` +type UserRoleGrant struct { + pulumi.CustomResourceState + + Role UserRoleGrantRoleOutput `pulumi:"role"` + // ID of the user to grant these roles to. + UserId pulumi.StringOutput `pulumi:"userId"` +} + +// NewUserRoleGrant registers a new resource with the given unique name, arguments, and options. +func NewUserRoleGrant(ctx *pulumi.Context, + name string, args *UserRoleGrantArgs, opts ...pulumi.ResourceOption) (*UserRoleGrant, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Role == nil { + return nil, errors.New("invalid value for required argument 'Role'") + } + if args.UserId == nil { + return nil, errors.New("invalid value for required argument 'UserId'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource UserRoleGrant + err := ctx.RegisterResource("cockroach:index/userRoleGrant:UserRoleGrant", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetUserRoleGrant gets an existing UserRoleGrant resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetUserRoleGrant(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *UserRoleGrantState, opts ...pulumi.ResourceOption) (*UserRoleGrant, error) { + var resource UserRoleGrant + err := ctx.ReadResource("cockroach:index/userRoleGrant:UserRoleGrant", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering UserRoleGrant resources. +type userRoleGrantState struct { + Role *UserRoleGrantRole `pulumi:"role"` + // ID of the user to grant these roles to. + UserId *string `pulumi:"userId"` +} + +type UserRoleGrantState struct { + Role UserRoleGrantRolePtrInput + // ID of the user to grant these roles to. + UserId pulumi.StringPtrInput +} + +func (UserRoleGrantState) ElementType() reflect.Type { + return reflect.TypeOf((*userRoleGrantState)(nil)).Elem() +} + +type userRoleGrantArgs struct { + Role UserRoleGrantRole `pulumi:"role"` + // ID of the user to grant these roles to. + UserId string `pulumi:"userId"` +} + +// The set of arguments for constructing a UserRoleGrant resource. +type UserRoleGrantArgs struct { + Role UserRoleGrantRoleInput + // ID of the user to grant these roles to. + UserId pulumi.StringInput +} + +func (UserRoleGrantArgs) ElementType() reflect.Type { + return reflect.TypeOf((*userRoleGrantArgs)(nil)).Elem() +} + +type UserRoleGrantInput interface { + pulumi.Input + + ToUserRoleGrantOutput() UserRoleGrantOutput + ToUserRoleGrantOutputWithContext(ctx context.Context) UserRoleGrantOutput +} + +func (*UserRoleGrant) ElementType() reflect.Type { + return reflect.TypeOf((**UserRoleGrant)(nil)).Elem() +} + +func (i *UserRoleGrant) ToUserRoleGrantOutput() UserRoleGrantOutput { + return i.ToUserRoleGrantOutputWithContext(context.Background()) +} + +func (i *UserRoleGrant) ToUserRoleGrantOutputWithContext(ctx context.Context) UserRoleGrantOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantOutput) +} + +// UserRoleGrantArrayInput is an input type that accepts UserRoleGrantArray and UserRoleGrantArrayOutput values. +// You can construct a concrete instance of `UserRoleGrantArrayInput` via: +// +// UserRoleGrantArray{ UserRoleGrantArgs{...} } +type UserRoleGrantArrayInput interface { + pulumi.Input + + ToUserRoleGrantArrayOutput() UserRoleGrantArrayOutput + ToUserRoleGrantArrayOutputWithContext(context.Context) UserRoleGrantArrayOutput +} + +type UserRoleGrantArray []UserRoleGrantInput + +func (UserRoleGrantArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserRoleGrant)(nil)).Elem() +} + +func (i UserRoleGrantArray) ToUserRoleGrantArrayOutput() UserRoleGrantArrayOutput { + return i.ToUserRoleGrantArrayOutputWithContext(context.Background()) +} + +func (i UserRoleGrantArray) ToUserRoleGrantArrayOutputWithContext(ctx context.Context) UserRoleGrantArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantArrayOutput) +} + +// UserRoleGrantMapInput is an input type that accepts UserRoleGrantMap and UserRoleGrantMapOutput values. +// You can construct a concrete instance of `UserRoleGrantMapInput` via: +// +// UserRoleGrantMap{ "key": UserRoleGrantArgs{...} } +type UserRoleGrantMapInput interface { + pulumi.Input + + ToUserRoleGrantMapOutput() UserRoleGrantMapOutput + ToUserRoleGrantMapOutputWithContext(context.Context) UserRoleGrantMapOutput +} + +type UserRoleGrantMap map[string]UserRoleGrantInput + +func (UserRoleGrantMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserRoleGrant)(nil)).Elem() +} + +func (i UserRoleGrantMap) ToUserRoleGrantMapOutput() UserRoleGrantMapOutput { + return i.ToUserRoleGrantMapOutputWithContext(context.Background()) +} + +func (i UserRoleGrantMap) ToUserRoleGrantMapOutputWithContext(ctx context.Context) UserRoleGrantMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(UserRoleGrantMapOutput) +} + +type UserRoleGrantOutput struct{ *pulumi.OutputState } + +func (UserRoleGrantOutput) ElementType() reflect.Type { + return reflect.TypeOf((**UserRoleGrant)(nil)).Elem() +} + +func (o UserRoleGrantOutput) ToUserRoleGrantOutput() UserRoleGrantOutput { + return o +} + +func (o UserRoleGrantOutput) ToUserRoleGrantOutputWithContext(ctx context.Context) UserRoleGrantOutput { + return o +} + +func (o UserRoleGrantOutput) Role() UserRoleGrantRoleOutput { + return o.ApplyT(func(v *UserRoleGrant) UserRoleGrantRoleOutput { return v.Role }).(UserRoleGrantRoleOutput) +} + +// ID of the user to grant these roles to. +func (o UserRoleGrantOutput) UserId() pulumi.StringOutput { + return o.ApplyT(func(v *UserRoleGrant) pulumi.StringOutput { return v.UserId }).(pulumi.StringOutput) +} + +type UserRoleGrantArrayOutput struct{ *pulumi.OutputState } + +func (UserRoleGrantArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*UserRoleGrant)(nil)).Elem() +} + +func (o UserRoleGrantArrayOutput) ToUserRoleGrantArrayOutput() UserRoleGrantArrayOutput { + return o +} + +func (o UserRoleGrantArrayOutput) ToUserRoleGrantArrayOutputWithContext(ctx context.Context) UserRoleGrantArrayOutput { + return o +} + +func (o UserRoleGrantArrayOutput) Index(i pulumi.IntInput) UserRoleGrantOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserRoleGrant { + return vs[0].([]*UserRoleGrant)[vs[1].(int)] + }).(UserRoleGrantOutput) +} + +type UserRoleGrantMapOutput struct{ *pulumi.OutputState } + +func (UserRoleGrantMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*UserRoleGrant)(nil)).Elem() +} + +func (o UserRoleGrantMapOutput) ToUserRoleGrantMapOutput() UserRoleGrantMapOutput { + return o +} + +func (o UserRoleGrantMapOutput) ToUserRoleGrantMapOutputWithContext(ctx context.Context) UserRoleGrantMapOutput { + return o +} + +func (o UserRoleGrantMapOutput) MapIndex(k pulumi.StringInput) UserRoleGrantOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserRoleGrant { + return vs[0].(map[string]*UserRoleGrant)[vs[1].(string)] + }).(UserRoleGrantOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantInput)(nil)).Elem(), &UserRoleGrant{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantArrayInput)(nil)).Elem(), UserRoleGrantArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*UserRoleGrantMapInput)(nil)).Elem(), UserRoleGrantMap{}) + pulumi.RegisterOutputType(UserRoleGrantOutput{}) + pulumi.RegisterOutputType(UserRoleGrantArrayOutput{}) + pulumi.RegisterOutputType(UserRoleGrantMapOutput{}) +} diff --git a/sdk/go/cockroach/userRoleGrants.go b/sdk/go/cockroach/userRoleGrants.go index 408127b..f8d26f7 100644 --- a/sdk/go/cockroach/userRoleGrants.go +++ b/sdk/go/cockroach/userRoleGrants.go @@ -12,7 +12,15 @@ import ( "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach/internal" ) -// Role grants for a single user. +// ## Example Usage +// +// ## Import +// +// format: +// +// ```sh +// $ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d +// ``` type UserRoleGrants struct { pulumi.CustomResourceState diff --git a/sdk/go/cockroach/versionDeferral.go b/sdk/go/cockroach/versionDeferral.go index 68f1736..6687cde 100644 --- a/sdk/go/cockroach/versionDeferral.go +++ b/sdk/go/cockroach/versionDeferral.go @@ -13,9 +13,45 @@ import ( ) // Configure minor version upgrade deferral for a cluster. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +// "github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// cfg := config.New(ctx, "") +// clusterId := cfg.Require("clusterId") +// offsetDuration := "FIXED_DEFERRAL" +// if param := cfg.Get("offsetDuration"); param != "" { +// offsetDuration = param +// } +// _, err := cockroach.NewVersionDeferral(ctx, "example", &cockroach.VersionDeferralArgs{ +// ClusterId: pulumi.String(clusterId), +// DeferralPolicy: pulumi.String(offsetDuration), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type VersionDeferral struct { pulumi.CustomResourceState + // Cluster ID. + ClusterId pulumi.StringOutput `pulumi:"clusterId"` // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. DeferralPolicy pulumi.StringOutput `pulumi:"deferralPolicy"` } @@ -27,6 +63,9 @@ func NewVersionDeferral(ctx *pulumi.Context, return nil, errors.New("missing one or more required arguments") } + if args.ClusterId == nil { + return nil, errors.New("invalid value for required argument 'ClusterId'") + } if args.DeferralPolicy == nil { return nil, errors.New("invalid value for required argument 'DeferralPolicy'") } @@ -53,11 +92,15 @@ func GetVersionDeferral(ctx *pulumi.Context, // Input properties used for looking up and filtering VersionDeferral resources. type versionDeferralState struct { + // Cluster ID. + ClusterId *string `pulumi:"clusterId"` // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. DeferralPolicy *string `pulumi:"deferralPolicy"` } type VersionDeferralState struct { + // Cluster ID. + ClusterId pulumi.StringPtrInput // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. DeferralPolicy pulumi.StringPtrInput } @@ -67,12 +110,16 @@ func (VersionDeferralState) ElementType() reflect.Type { } type versionDeferralArgs struct { + // Cluster ID. + ClusterId string `pulumi:"clusterId"` // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. DeferralPolicy string `pulumi:"deferralPolicy"` } // The set of arguments for constructing a VersionDeferral resource. type VersionDeferralArgs struct { + // Cluster ID. + ClusterId pulumi.StringInput // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. DeferralPolicy pulumi.StringInput } @@ -164,6 +211,11 @@ func (o VersionDeferralOutput) ToVersionDeferralOutputWithContext(ctx context.Co return o } +// Cluster ID. +func (o VersionDeferralOutput) ClusterId() pulumi.StringOutput { + return o.ApplyT(func(v *VersionDeferral) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput) +} + // The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. func (o VersionDeferralOutput) DeferralPolicy() pulumi.StringOutput { return o.ApplyT(func(v *VersionDeferral) pulumi.StringOutput { return v.DeferralPolicy }).(pulumi.StringOutput) diff --git a/sdk/nodejs/allowList.ts b/sdk/nodejs/allowList.ts index 0c5c375..909b608 100644 --- a/sdk/nodejs/allowList.ts +++ b/sdk/nodejs/allowList.ts @@ -6,6 +6,30 @@ import * as utilities from "./utilities"; /** * List of IP ranges allowed to access the cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const vpn = new cockroach.AllowList("vpn", { + * name: "vpn", + * cidrIp: "123.123.1.1", + * cidrMask: 32, + * ui: true, + * sql: true, + * clusterId: staging.id, + * }); + * ``` + * + * ## Import + * + * format: :/ + * + * ```sh + * $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32 + * ``` */ export class AllowList extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/caCert.ts b/sdk/nodejs/caCert.ts index e9350ab..4934e58 100644 --- a/sdk/nodejs/caCert.ts +++ b/sdk/nodejs/caCert.ts @@ -6,6 +6,21 @@ import * as utilities from "./utilities"; /** * Manages client CA certs. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * // The X509 certificate in PEM format. + * const clientCertificate = config.require("clientCertificate"); + * const prod = new cockroach.CaCert("prod", { + * clusterId: prodCockroachCluster.id, + * x509PemCert: clientCertificate, + * }); + * ``` */ export class CaCert extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/cmek.ts b/sdk/nodejs/cmek.ts index 37b8b1e..b4cb586 100644 --- a/sdk/nodejs/cmek.ts +++ b/sdk/nodejs/cmek.ts @@ -8,6 +8,25 @@ import * as utilities from "./utilities"; /** * Customer-managed encryption keys (CMEK) resource for a single cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const dedicated = new cockroach.Cmek("dedicated", { + * clusterId: dedicatedCockroachCluster.id, + * regions: [{ + * region: "us-central-1", + * key: { + * authPrincipal: "arn:aws:iam::account:role/role-name-with-path", + * type: "AWS_KMS", + * uri: "arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key", + * }, + * }], + * }); + * ``` */ export class Cmek extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/database.ts b/sdk/nodejs/database.ts index ec9a20b..e7cb338 100644 --- a/sdk/nodejs/database.ts +++ b/sdk/nodejs/database.ts @@ -6,6 +6,28 @@ import * as utilities from "./utilities"; /** * CockroachDB database. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = new cockroach.Database("cockroach", { + * name: "example-database", + * clusterId: clusterId, + * }); + * ``` + * + * ## Import + * + * format: : + * + * ```sh + * $ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase + * ``` */ export class Database extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/finalizeVersionUpgrade.ts b/sdk/nodejs/finalizeVersionUpgrade.ts index ba1cb65..cae59f4 100644 --- a/sdk/nodejs/finalizeVersionUpgrade.ts +++ b/sdk/nodejs/finalizeVersionUpgrade.ts @@ -6,6 +6,21 @@ import * as utilities from "./utilities"; /** * Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroachVersion = config.require("cockroachVersion"); + * const cockroach = new cockroach.FinalizeVersionUpgrade("cockroach", { + * clusterId: clusterId, + * cockroachVersion: cockroachVersion, + * }); + * ``` */ export class FinalizeVersionUpgrade extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/folder.ts b/sdk/nodejs/folder.ts index 99def60..6d17282 100644 --- a/sdk/nodejs/folder.ts +++ b/sdk/nodejs/folder.ts @@ -6,6 +6,22 @@ import * as utilities from "./utilities"; /** * CockroachDB Cloud folder. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const aTeam = new cockroach.Folder("a_team", { + * name: "a-team", + * parentId: "root", + * }); + * const aTeamDev = new cockroach.Folder("a_team_dev", { + * name: "dev", + * parentId: aTeam.id, + * }); + * ``` */ export class Folder extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/getClusterCert.ts b/sdk/nodejs/getClusterCert.ts index 243b4bf..c6c7cc8 100644 --- a/sdk/nodejs/getClusterCert.ts +++ b/sdk/nodejs/getClusterCert.ts @@ -8,9 +8,21 @@ import * as utilities from "./utilities"; * TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/-ca.crt` on MacOS or Linux, or `$env:appdata\CockroachCloud\certs\-ca.crt` on Windows. * * Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\postgresql\root.crt` on Windows. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = cockroach.getClusterCert({ + * id: clusterId, + * }); + * ``` */ export function getClusterCert(args: GetClusterCertArgs, opts?: pulumi.InvokeOptions): Promise { - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cockroach:index/getClusterCert:getClusterCert", { "id": args.id, @@ -44,9 +56,25 @@ export interface GetClusterCertResult { * TLS certificate for the specified CockroachDB cluster. Certificates for dedicated clusters should be written to `$HOME/Library/CockroachCloud/certs/-ca.crt` on MacOS or Linux, or `$env:appdata\CockroachCloud\certs\-ca.crt` on Windows. * * Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\postgresql\root.crt` on Windows. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = cockroach.getClusterCert({ + * id: clusterId, + * }); + * ``` */ export function getClusterCertOutput(args: GetClusterCertOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(args).apply((a: any) => getClusterCert(a, opts)) + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getClusterCert:getClusterCert", { + "id": args.id, + }, opts); } /** diff --git a/sdk/nodejs/getCockroachCluster.ts b/sdk/nodejs/getCockroachCluster.ts index 582b320..4506b44 100644 --- a/sdk/nodejs/getCockroachCluster.ts +++ b/sdk/nodejs/getCockroachCluster.ts @@ -8,9 +8,21 @@ import * as utilities from "./utilities"; /** * CockroachDB Cloud cluster. Can be Dedicated or Serverless. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = cockroach.getCockroachCluster({ + * id: clusterId, + * }); + * ``` */ export function getCockroachCluster(args: GetCockroachClusterArgs, opts?: pulumi.InvokeOptions): Promise { - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cockroach:index/getCockroachCluster:getCockroachCluster", { "id": args.id, @@ -45,9 +57,25 @@ export interface GetCockroachClusterResult { } /** * CockroachDB Cloud cluster. Can be Dedicated or Serverless. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = cockroach.getCockroachCluster({ + * id: clusterId, + * }); + * ``` */ export function getCockroachClusterOutput(args: GetCockroachClusterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(args).apply((a: any) => getCockroachCluster(a, opts)) + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getCockroachCluster:getCockroachCluster", { + "id": args.id, + }, opts); } /** diff --git a/sdk/nodejs/getConnectionString.ts b/sdk/nodejs/getConnectionString.ts index 9e73a11..5261b11 100644 --- a/sdk/nodejs/getConnectionString.ts +++ b/sdk/nodejs/getConnectionString.ts @@ -8,9 +8,29 @@ import * as utilities from "./utilities"; /** * Generic connection string for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const sqlUserName = config.require("sqlUserName"); + * const sqlUserPassword = config.require("sqlUserPassword"); + * const database = config.require("database"); + * const os = config.require("os"); + * const cockroach = cockroach.getConnectionString({ + * id: clusterId, + * sqlUser: sqlUserName, + * password: sqlUserPassword, + * database: database, + * os: os, + * }); + * ``` */ export function getConnectionString(args: GetConnectionStringArgs, opts?: pulumi.InvokeOptions): Promise { - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cockroach:index/getConnectionString:getConnectionString", { "database": args.database, @@ -46,9 +66,37 @@ export interface GetConnectionStringResult { } /** * Generic connection string for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const sqlUserName = config.require("sqlUserName"); + * const sqlUserPassword = config.require("sqlUserPassword"); + * const database = config.require("database"); + * const os = config.require("os"); + * const cockroach = cockroach.getConnectionString({ + * id: clusterId, + * sqlUser: sqlUserName, + * password: sqlUserPassword, + * database: database, + * os: os, + * }); + * ``` */ export function getConnectionStringOutput(args: GetConnectionStringOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(args).apply((a: any) => getConnectionString(a, opts)) + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getConnectionString:getConnectionString", { + "database": args.database, + "id": args.id, + "os": args.os, + "password": args.password, + "sqlUser": args.sqlUser, + }, opts); } /** diff --git a/sdk/nodejs/getFolder.ts b/sdk/nodejs/getFolder.ts new file mode 100644 index 0000000..35a7eb5 --- /dev/null +++ b/sdk/nodejs/getFolder.ts @@ -0,0 +1,110 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const prodFolderId = config.require("prodFolderId"); + * const team1 = cockroach.getFolder({ + * path: "/prod/team1", + * }); + * const prod = cockroach.getFolder({ + * id: prodFolderId, + * }); + * ``` + */ +export function getFolder(args?: GetFolderArgs, opts?: pulumi.InvokeOptions): Promise { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("cockroach:index/getFolder:getFolder", { + "id": args.id, + "path": args.path, + }, opts); +} + +/** + * A collection of arguments for invoking getFolder. + */ +export interface GetFolderArgs { + /** + * The id the folder. + */ + id?: string; + /** + * An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + */ + path?: string; +} + +/** + * A collection of values returned by getFolder. + */ +export interface GetFolderResult { + /** + * The id the folder. + */ + readonly id?: string; + /** + * Name of the folder. + */ + readonly name: string; + /** + * The ID of the folders's parent folder. 'root' is used for a folder at the root level. + */ + readonly parentId: string; + /** + * An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + */ + readonly path?: string; +} +/** + * A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const prodFolderId = config.require("prodFolderId"); + * const team1 = cockroach.getFolder({ + * path: "/prod/team1", + * }); + * const prod = cockroach.getFolder({ + * id: prodFolderId, + * }); + * ``` + */ +export function getFolderOutput(args?: GetFolderOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + args = args || {}; + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getFolder:getFolder", { + "id": args.id, + "path": args.path, + }, opts); +} + +/** + * A collection of arguments for invoking getFolder. + */ +export interface GetFolderOutputArgs { + /** + * The id the folder. + */ + id?: pulumi.Input; + /** + * An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + */ + path?: pulumi.Input; +} diff --git a/sdk/nodejs/getOrganization.ts b/sdk/nodejs/getOrganization.ts index 900082c..fd787ab 100644 --- a/sdk/nodejs/getOrganization.ts +++ b/sdk/nodejs/getOrganization.ts @@ -6,9 +6,17 @@ import * as utilities from "./utilities"; /** * Information about the organization associated with the user's API key. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const prod = cockroach.getOrganization({}); + * ``` */ export function getOrganization(opts?: pulumi.InvokeOptions): Promise { - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cockroach:index/getOrganization:getOrganization", { }, opts); @@ -37,7 +45,18 @@ export interface GetOrganizationResult { } /** * Information about the organization associated with the user's API key. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const prod = cockroach.getOrganization({}); + * ``` */ export function getOrganizationOutput(opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(getOrganization(opts)) + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getOrganization:getOrganization", { + }, opts); } diff --git a/sdk/nodejs/getPersonUser.ts b/sdk/nodejs/getPersonUser.ts index a7b329a..b507ac2 100644 --- a/sdk/nodejs/getPersonUser.ts +++ b/sdk/nodejs/getPersonUser.ts @@ -6,9 +6,21 @@ import * as utilities from "./utilities"; /** * Information about an individual user. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const emailAddress = config.require("emailAddress"); + * const cockroach = cockroach.getPersonUser({ + * email: emailAddress, + * }); + * ``` */ export function getPersonUser(args: GetPersonUserArgs, opts?: pulumi.InvokeOptions): Promise { - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("cockroach:index/getPersonUser:getPersonUser", { "email": args.email, @@ -40,9 +52,25 @@ export interface GetPersonUserResult { } /** * Information about an individual user. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumi/cockroach"; + * + * const config = new pulumi.Config(); + * const emailAddress = config.require("emailAddress"); + * const cockroach = cockroach.getPersonUser({ + * email: emailAddress, + * }); + * ``` */ export function getPersonUserOutput(args: GetPersonUserOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(args).apply((a: any) => getPersonUser(a, opts)) + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invokeOutput("cockroach:index/getPersonUser:getPersonUser", { + "email": args.email, + }, opts); } /** diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index dc08bc9..5564aab 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -60,6 +60,11 @@ export const getConnectionString: typeof import("./getConnectionString").getConn export const getConnectionStringOutput: typeof import("./getConnectionString").getConnectionStringOutput = null as any; utilities.lazyLoad(exports, ["getConnectionString","getConnectionStringOutput"], () => require("./getConnectionString")); +export { GetFolderArgs, GetFolderResult, GetFolderOutputArgs } from "./getFolder"; +export const getFolder: typeof import("./getFolder").getFolder = null as any; +export const getFolderOutput: typeof import("./getFolder").getFolderOutput = null as any; +utilities.lazyLoad(exports, ["getFolder","getFolderOutput"], () => require("./getFolder")); + export { GetOrganizationResult } from "./getOrganization"; export const getOrganization: typeof import("./getOrganization").getOrganization = null as any; export const getOrganizationOutput: typeof import("./getOrganization").getOrganizationOutput = null as any; @@ -115,6 +120,11 @@ export type SqlUser = import("./sqlUser").SqlUser; export const SqlUser: typeof import("./sqlUser").SqlUser = null as any; utilities.lazyLoad(exports, ["SqlUser"], () => require("./sqlUser")); +export { UserRoleGrantArgs, UserRoleGrantState } from "./userRoleGrant"; +export type UserRoleGrant = import("./userRoleGrant").UserRoleGrant; +export const UserRoleGrant: typeof import("./userRoleGrant").UserRoleGrant = null as any; +utilities.lazyLoad(exports, ["UserRoleGrant"], () => require("./userRoleGrant")); + export { UserRoleGrantsArgs, UserRoleGrantsState } from "./userRoleGrants"; export type UserRoleGrants = import("./userRoleGrants").UserRoleGrants; export const UserRoleGrants: typeof import("./userRoleGrants").UserRoleGrants = null as any; @@ -171,6 +181,8 @@ const _module = { return new PrivateEndpointTrustedOwner(name, undefined, { urn }) case "cockroach:index/sqlUser:SqlUser": return new SqlUser(name, undefined, { urn }) + case "cockroach:index/userRoleGrant:UserRoleGrant": + return new UserRoleGrant(name, undefined, { urn }) case "cockroach:index/userRoleGrants:UserRoleGrants": return new UserRoleGrants(name, undefined, { urn }) case "cockroach:index/versionDeferral:VersionDeferral": @@ -196,6 +208,7 @@ pulumi.runtime.registerResourceModule("cockroach", "index/privateEndpointConnect pulumi.runtime.registerResourceModule("cockroach", "index/privateEndpointServices", _module) pulumi.runtime.registerResourceModule("cockroach", "index/privateEndpointTrustedOwner", _module) pulumi.runtime.registerResourceModule("cockroach", "index/sqlUser", _module) +pulumi.runtime.registerResourceModule("cockroach", "index/userRoleGrant", _module) pulumi.runtime.registerResourceModule("cockroach", "index/userRoleGrants", _module) pulumi.runtime.registerResourceModule("cockroach", "index/versionDeferral", _module) pulumi.runtime.registerResourcePackage("cockroach", { diff --git a/sdk/nodejs/maintenanceWindow.ts b/sdk/nodejs/maintenanceWindow.ts index 1c74d2f..e06e844 100644 --- a/sdk/nodejs/maintenanceWindow.ts +++ b/sdk/nodejs/maintenanceWindow.ts @@ -6,6 +6,23 @@ import * as utilities from "./utilities"; /** * Maintenance window configuration for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const offsetDuration = config.getNumber("offsetDuration") || 172800; + * const windowDuration = config.getNumber("windowDuration") || 21600; + * const example = new cockroach.MaintenanceWindow("example", { + * clusterId: clusterId, + * offsetDuration: offsetDuration, + * windowDuration: windowDuration, + * }); + * ``` */ export class MaintenanceWindow extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/metricExportCloudwatchConfig.ts b/sdk/nodejs/metricExportCloudwatchConfig.ts index 6237e49..3a3e833 100644 --- a/sdk/nodejs/metricExportCloudwatchConfig.ts +++ b/sdk/nodejs/metricExportCloudwatchConfig.ts @@ -6,6 +6,25 @@ import * as utilities from "./utilities"; /** * Amazon CloudWatch metric export configuration for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const roleArn = config.require("roleArn"); + * const logGroupName = config.require("logGroupName"); + * const awsRegion = config.require("awsRegion"); + * const example = new cockroach.MetricExportCloudwatchConfig("example", { + * clusterId: clusterId, + * roleArn: roleArn, + * logGroupName: logGroupName, + * targetRegion: awsRegion, + * }); + * ``` */ export class MetricExportCloudwatchConfig extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/metricExportDatadogConfig.ts b/sdk/nodejs/metricExportDatadogConfig.ts index e1f34ba..737b3eb 100644 --- a/sdk/nodejs/metricExportDatadogConfig.ts +++ b/sdk/nodejs/metricExportDatadogConfig.ts @@ -6,6 +6,23 @@ import * as utilities from "./utilities"; /** * DataDog metric export configuration for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const datadogSite = config.require("datadogSite"); + * const datadogApiKey = config.require("datadogApiKey"); + * const example = new cockroach.MetricExportDatadogConfig("example", { + * clusterId: clusterId, + * site: datadogSite, + * apiKey: datadogApiKey, + * }); + * ``` */ export class MetricExportDatadogConfig extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/privateEndpointConnection.ts b/sdk/nodejs/privateEndpointConnection.ts index 488fc04..f652b50 100644 --- a/sdk/nodejs/privateEndpointConnection.ts +++ b/sdk/nodejs/privateEndpointConnection.ts @@ -5,7 +5,15 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * AWS PrivateLink Endpoint Connection. + * Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network. + * + * ## Import + * + * format: : + * + * ```sh + * $ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc + * ``` */ export class PrivateEndpointConnection extends pulumi.CustomResource { /** @@ -41,7 +49,7 @@ export class PrivateEndpointConnection extends pulumi.CustomResource { public /*out*/ readonly cloudProvider!: pulumi.Output; public readonly clusterId!: pulumi.Output; /** - * Client side ID of the PrivateLink connection. + * Client side ID of the Private Endpoint Connection. */ public readonly endpointId!: pulumi.Output; /** @@ -49,7 +57,7 @@ export class PrivateEndpointConnection extends pulumi.CustomResource { */ public /*out*/ readonly regionName!: pulumi.Output; /** - * Server side ID of the PrivateLink connection. + * Server side ID of the Private Endpoint Connection. */ public /*out*/ readonly serviceId!: pulumi.Output; @@ -100,7 +108,7 @@ export interface PrivateEndpointConnectionState { cloudProvider?: pulumi.Input; clusterId?: pulumi.Input; /** - * Client side ID of the PrivateLink connection. + * Client side ID of the Private Endpoint Connection. */ endpointId?: pulumi.Input; /** @@ -108,7 +116,7 @@ export interface PrivateEndpointConnectionState { */ regionName?: pulumi.Input; /** - * Server side ID of the PrivateLink connection. + * Server side ID of the Private Endpoint Connection. */ serviceId?: pulumi.Input; } @@ -119,7 +127,7 @@ export interface PrivateEndpointConnectionState { export interface PrivateEndpointConnectionArgs { clusterId: pulumi.Input; /** - * Client side ID of the PrivateLink connection. + * Client side ID of the Private Endpoint Connection. */ endpointId: pulumi.Input; } diff --git a/sdk/nodejs/privateEndpointServices.ts b/sdk/nodejs/privateEndpointServices.ts index 7604c03..dbd4aa2 100644 --- a/sdk/nodejs/privateEndpointServices.ts +++ b/sdk/nodejs/privateEndpointServices.ts @@ -7,7 +7,26 @@ import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** - * PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP). + * PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const cockroach = new cockroach.PrivateEndpointServices("cockroach", {clusterId: clusterId}); + * ``` + * + * ## Import + * + * format: + * + * ```sh + * $ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + * ``` */ export class PrivateEndpointServices extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/privateEndpointTrustedOwner.ts b/sdk/nodejs/privateEndpointTrustedOwner.ts index b5357f7..e521355 100644 --- a/sdk/nodejs/privateEndpointTrustedOwner.ts +++ b/sdk/nodejs/privateEndpointTrustedOwner.ts @@ -6,6 +6,29 @@ import * as utilities from "./utilities"; /** * Private Endpoint Trusted Owner. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const example = new cockroach.PrivateEndpointTrustedOwner("example", { + * clusterId: clusterId, + * type: "AWS_ACCOUNT_ID", + * externalOwnerId: "012345678901", + * }); + * ``` + * + * ## Import + * + * format: : + * + * ```sh + * $ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49 + * ``` */ export class PrivateEndpointTrustedOwner extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/sqlUser.ts b/sdk/nodejs/sqlUser.ts index c42285b..079af19 100644 --- a/sdk/nodejs/sqlUser.ts +++ b/sdk/nodejs/sqlUser.ts @@ -6,6 +6,30 @@ import * as utilities from "./utilities"; /** * CockroachDB SQL user. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const sqlUserPassword = config.require("sqlUserPassword"); + * const cockroach = new cockroach.SqlUser("cockroach", { + * name: "example-sql-user", + * password: sqlUserPassword, + * clusterId: clusterId, + * }); + * ``` + * + * ## Import + * + * format: : + * + * ```sh + * $ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill + * ``` */ export class SqlUser extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index c1f5d61..13ff6dc 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -26,6 +26,7 @@ "getClusterCert.ts", "getCockroachCluster.ts", "getConnectionString.ts", + "getFolder.ts", "getOrganization.ts", "getPersonUser.ts", "index.ts", @@ -41,6 +42,7 @@ "types/index.ts", "types/input.ts", "types/output.ts", + "userRoleGrant.ts", "userRoleGrants.ts", "utilities.ts", "versionDeferral.ts" diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 8d13215..8d3f59d 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -190,11 +190,26 @@ export interface LogExportConfigGroup { } export interface PrivateEndpointServicesService { + /** + * Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + */ + availabilityZoneIds?: pulumi.Input[]>; + /** + * @deprecated nested aws fields have been moved one level up. These fields will be removed in a future version + */ aws?: pulumi.Input; /** * Cloud provider associated with this service. */ cloudProvider?: pulumi.Input; + /** + * Server side ID of the private endpoint connection. + */ + endpointServiceId?: pulumi.Input; + /** + * Name of the endpoint service. + */ + name?: pulumi.Input; /** * Cloud provider region code associated with this service. */ @@ -220,9 +235,36 @@ export interface PrivateEndpointServicesServiceAws { serviceName?: pulumi.Input; } +export interface UserRoleGrantRole { + /** + * ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + */ + resourceId?: pulumi.Input; + /** + * Type of resource. Allowed values are: + * * ORGANIZATION + * * CLUSTER + * * FOLDER + */ + resourceType: pulumi.Input; + /** + * Name of the role to grant. Allowed values are: + * * BILLING_COORDINATOR + * * ORG_ADMIN + * * ORG_MEMBER + * * CLUSTER_ADMIN + * * CLUSTER_OPERATOR_WRITER + * * CLUSTER_DEVELOPER + * * CLUSTER_CREATOR + * * FOLDER_ADMIN + * * FOLDER_MOVER + */ + roleName: pulumi.Input; +} + export interface UserRoleGrantsRole { /** - * ID of the resource. Omit if resourceType is 'ORGANIZATION'. + * ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. */ resourceId?: pulumi.Input; /** @@ -234,8 +276,6 @@ export interface UserRoleGrantsRole { resourceType: pulumi.Input; /** * Name of the role to grant. Allowed values are: - * * DEVELOPER - * * ADMIN * * BILLING_COORDINATOR * * ORG_ADMIN * * ORG_MEMBER diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index f788d14..3117c95 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -290,11 +290,26 @@ export interface LogExportConfigGroup { } export interface PrivateEndpointServicesService { + /** + * Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + */ + availabilityZoneIds: string[]; + /** + * @deprecated nested aws fields have been moved one level up. These fields will be removed in a future version + */ aws: outputs.PrivateEndpointServicesServiceAws; /** * Cloud provider associated with this service. */ cloudProvider: string; + /** + * Server side ID of the private endpoint connection. + */ + endpointServiceId: string; + /** + * Name of the endpoint service. + */ + name: string; /** * Cloud provider region code associated with this service. */ @@ -320,9 +335,36 @@ export interface PrivateEndpointServicesServiceAws { serviceName: string; } +export interface UserRoleGrantRole { + /** + * ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + */ + resourceId?: string; + /** + * Type of resource. Allowed values are: + * * ORGANIZATION + * * CLUSTER + * * FOLDER + */ + resourceType: string; + /** + * Name of the role to grant. Allowed values are: + * * BILLING_COORDINATOR + * * ORG_ADMIN + * * ORG_MEMBER + * * CLUSTER_ADMIN + * * CLUSTER_OPERATOR_WRITER + * * CLUSTER_DEVELOPER + * * CLUSTER_CREATOR + * * FOLDER_ADMIN + * * FOLDER_MOVER + */ + roleName: string; +} + export interface UserRoleGrantsRole { /** - * ID of the resource. Omit if resourceType is 'ORGANIZATION'. + * ID of the resource. Required if the resourceType is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. */ resourceId?: string; /** @@ -334,8 +376,6 @@ export interface UserRoleGrantsRole { resourceType: string; /** * Name of the role to grant. Allowed values are: - * * DEVELOPER - * * ADMIN * * BILLING_COORDINATOR * * ORG_ADMIN * * ORG_MEMBER diff --git a/sdk/nodejs/userRoleGrant.ts b/sdk/nodejs/userRoleGrant.ts new file mode 100644 index 0000000..f63a5a7 --- /dev/null +++ b/sdk/nodejs/userRoleGrant.ts @@ -0,0 +1,113 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as utilities from "./utilities"; + +/** + * ## Example Usage + * + * ## Import + * + * Cluster and folder level role grants can be imported using: + * + * ,,, + * + * ```sh + * $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831 + * ``` + * + * Organization level grants can omit the resource_id + * + * ```sh + * $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION + * ``` + */ +export class UserRoleGrant extends pulumi.CustomResource { + /** + * Get an existing UserRoleGrant resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: UserRoleGrantState, opts?: pulumi.CustomResourceOptions): UserRoleGrant { + return new UserRoleGrant(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'cockroach:index/userRoleGrant:UserRoleGrant'; + + /** + * Returns true if the given object is an instance of UserRoleGrant. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is UserRoleGrant { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === UserRoleGrant.__pulumiType; + } + + public readonly role!: pulumi.Output; + /** + * ID of the user to grant these roles to. + */ + public readonly userId!: pulumi.Output; + + /** + * Create a UserRoleGrant resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: UserRoleGrantArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: UserRoleGrantArgs | UserRoleGrantState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as UserRoleGrantState | undefined; + resourceInputs["role"] = state ? state.role : undefined; + resourceInputs["userId"] = state ? state.userId : undefined; + } else { + const args = argsOrState as UserRoleGrantArgs | undefined; + if ((!args || args.role === undefined) && !opts.urn) { + throw new Error("Missing required property 'role'"); + } + if ((!args || args.userId === undefined) && !opts.urn) { + throw new Error("Missing required property 'userId'"); + } + resourceInputs["role"] = args ? args.role : undefined; + resourceInputs["userId"] = args ? args.userId : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(UserRoleGrant.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering UserRoleGrant resources. + */ +export interface UserRoleGrantState { + role?: pulumi.Input; + /** + * ID of the user to grant these roles to. + */ + userId?: pulumi.Input; +} + +/** + * The set of arguments for constructing a UserRoleGrant resource. + */ +export interface UserRoleGrantArgs { + role: pulumi.Input; + /** + * ID of the user to grant these roles to. + */ + userId: pulumi.Input; +} diff --git a/sdk/nodejs/userRoleGrants.ts b/sdk/nodejs/userRoleGrants.ts index edb93a8..36f3a0b 100644 --- a/sdk/nodejs/userRoleGrants.ts +++ b/sdk/nodejs/userRoleGrants.ts @@ -7,7 +7,15 @@ import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** - * Role grants for a single user. + * ## Example Usage + * + * ## Import + * + * format: + * + * ```sh + * $ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + * ``` */ export class UserRoleGrants extends pulumi.CustomResource { /** diff --git a/sdk/nodejs/versionDeferral.ts b/sdk/nodejs/versionDeferral.ts index 0551fa8..f325256 100644 --- a/sdk/nodejs/versionDeferral.ts +++ b/sdk/nodejs/versionDeferral.ts @@ -6,6 +6,21 @@ import * as utilities from "./utilities"; /** * Configure minor version upgrade deferral for a cluster. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as cockroach from "@pulumiverse/cockroach"; + * + * const config = new pulumi.Config(); + * const clusterId = config.require("clusterId"); + * const offsetDuration = config.get("offsetDuration") || "FIXED_DEFERRAL"; + * const example = new cockroach.VersionDeferral("example", { + * clusterId: clusterId, + * deferralPolicy: offsetDuration, + * }); + * ``` */ export class VersionDeferral extends pulumi.CustomResource { /** @@ -35,6 +50,10 @@ export class VersionDeferral extends pulumi.CustomResource { return obj['__pulumiType'] === VersionDeferral.__pulumiType; } + /** + * Cluster ID. + */ + public readonly clusterId!: pulumi.Output; /** * The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. */ @@ -53,12 +72,17 @@ export class VersionDeferral extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as VersionDeferralState | undefined; + resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["deferralPolicy"] = state ? state.deferralPolicy : undefined; } else { const args = argsOrState as VersionDeferralArgs | undefined; + if ((!args || args.clusterId === undefined) && !opts.urn) { + throw new Error("Missing required property 'clusterId'"); + } if ((!args || args.deferralPolicy === undefined) && !opts.urn) { throw new Error("Missing required property 'deferralPolicy'"); } + resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["deferralPolicy"] = args ? args.deferralPolicy : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -70,6 +94,10 @@ export class VersionDeferral extends pulumi.CustomResource { * Input properties used for looking up and filtering VersionDeferral resources. */ export interface VersionDeferralState { + /** + * Cluster ID. + */ + clusterId?: pulumi.Input; /** * The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. */ @@ -80,6 +108,10 @@ export interface VersionDeferralState { * The set of arguments for constructing a VersionDeferral resource. */ export interface VersionDeferralArgs { + /** + * Cluster ID. + */ + clusterId: pulumi.Input; /** * The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. */ diff --git a/sdk/python/pulumiverse_cockroach/__init__.py b/sdk/python/pulumiverse_cockroach/__init__.py index 9fbd398..059f5c2 100644 --- a/sdk/python/pulumiverse_cockroach/__init__.py +++ b/sdk/python/pulumiverse_cockroach/__init__.py @@ -16,6 +16,7 @@ from .get_cluster_cert import * from .get_cockroach_cluster import * from .get_connection_string import * +from .get_folder import * from .get_organization import * from .get_person_user import * from .log_export_config import * @@ -27,6 +28,7 @@ from .private_endpoint_trusted_owner import * from .provider import * from .sql_user import * +from .user_role_grant import * from .user_role_grants import * from .version_deferral import * from ._inputs import * @@ -170,6 +172,14 @@ "cockroach:index/sqlUser:SqlUser": "SqlUser" } }, + { + "pkg": "cockroach", + "mod": "index/userRoleGrant", + "fqn": "pulumiverse_cockroach", + "classes": { + "cockroach:index/userRoleGrant:UserRoleGrant": "UserRoleGrant" + } + }, { "pkg": "cockroach", "mod": "index/userRoleGrants", diff --git a/sdk/python/pulumiverse_cockroach/_inputs.py b/sdk/python/pulumiverse_cockroach/_inputs.py index 2055f0e..29dbe6f 100644 --- a/sdk/python/pulumiverse_cockroach/_inputs.py +++ b/sdk/python/pulumiverse_cockroach/_inputs.py @@ -4,26 +4,64 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = [ 'ApiOidcConfigIdentityMapArgs', + 'ApiOidcConfigIdentityMapArgsDict', 'ClusterDedicatedArgs', + 'ClusterDedicatedArgsDict', 'ClusterRegionArgs', + 'ClusterRegionArgsDict', 'ClusterServerlessArgs', + 'ClusterServerlessArgsDict', 'ClusterServerlessUsageLimitsArgs', + 'ClusterServerlessUsageLimitsArgsDict', 'CmekAdditionalRegionArgs', + 'CmekAdditionalRegionArgsDict', 'CmekRegionArgs', + 'CmekRegionArgsDict', 'CmekRegionKeyArgs', + 'CmekRegionKeyArgsDict', 'LogExportConfigGroupArgs', + 'LogExportConfigGroupArgsDict', 'PrivateEndpointServicesServiceArgs', + 'PrivateEndpointServicesServiceArgsDict', 'PrivateEndpointServicesServiceAwsArgs', + 'PrivateEndpointServicesServiceAwsArgsDict', + 'UserRoleGrantRoleArgs', + 'UserRoleGrantRoleArgsDict', 'UserRoleGrantsRoleArgs', + 'UserRoleGrantsRoleArgsDict', ] +MYPY = False + +if not MYPY: + class ApiOidcConfigIdentityMapArgsDict(TypedDict): + cc_identity: pulumi.Input[str] + """ + The username (email or service account id) of the CC user that the token should map to. + """ + token_identity: pulumi.Input[str] + """ + The token value that needs to be mapped. + """ + is_regex: NotRequired[pulumi.Input[bool]] + """ + Indicates that the token_principal field is a regex value. + """ +elif False: + ApiOidcConfigIdentityMapArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class ApiOidcConfigIdentityMapArgs: def __init__(__self__, *, @@ -77,6 +115,35 @@ def is_regex(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "is_regex", value) +if not MYPY: + class ClusterDedicatedArgsDict(TypedDict): + disk_iops: NotRequired[pulumi.Input[int]] + """ + Number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default. + """ + machine_type: NotRequired[pulumi.Input[str]] + """ + Machine type identifier within the given cloud provider, e.g., m6.xlarge, n2-standard-4. + """ + memory_gib: NotRequired[pulumi.Input[float]] + """ + Memory per node in GiB. + """ + num_virtual_cpus: NotRequired[pulumi.Input[int]] + """ + Number of virtual CPUs per node in the cluster. + """ + private_network_visibility: NotRequired[pulumi.Input[bool]] + """ + Set to true to assign private IP addresses to nodes. Required for CMEK and other advanced networking features. + """ + storage_gib: NotRequired[pulumi.Input[int]] + """ + Storage amount per node in GiB. + """ +elif False: + ClusterDedicatedArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class ClusterDedicatedArgs: def __init__(__self__, *, @@ -180,6 +247,35 @@ def storage_gib(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "storage_gib", value) +if not MYPY: + class ClusterRegionArgsDict(TypedDict): + name: pulumi.Input[str] + """ + Name of the region. Should match the region code used by the cluster's cloud provider. + """ + internal_dns: NotRequired[pulumi.Input[str]] + """ + Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering. + """ + node_count: NotRequired[pulumi.Input[int]] + """ + Number of nodes in the region. Will always be 0 for serverless clusters. + """ + primary: NotRequired[pulumi.Input[bool]] + """ + Set to true to mark this region as the primary for a Serverless cluster. Exactly one region must be primary. Dedicated clusters expect to have no primary region. + """ + sql_dns: NotRequired[pulumi.Input[str]] + """ + DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting. + """ + ui_dns: NotRequired[pulumi.Input[str]] + """ + DNS name used when connecting to the DB Console for the cluster. + """ +elif False: + ClusterRegionArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class ClusterRegionArgs: def __init__(__self__, *, @@ -282,6 +378,20 @@ def ui_dns(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ui_dns", value) +if not MYPY: + class ClusterServerlessArgsDict(TypedDict): + routing_id: NotRequired[pulumi.Input[str]] + """ + Cluster identifier in a connection string. + """ + spend_limit: NotRequired[pulumi.Input[int]] + """ + Spend limit in US cents. + """ + usage_limits: NotRequired[pulumi.Input['ClusterServerlessUsageLimitsArgsDict']] +elif False: + ClusterServerlessArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class ClusterServerlessArgs: def __init__(__self__, *, @@ -333,6 +443,19 @@ def usage_limits(self, value: Optional[pulumi.Input['ClusterServerlessUsageLimit pulumi.set(self, "usage_limits", value) +if not MYPY: + class ClusterServerlessUsageLimitsArgsDict(TypedDict): + request_unit_limit: pulumi.Input[int] + """ + Maximum number of Request Units that the cluster can consume during the month. + """ + storage_mib_limit: pulumi.Input[int] + """ + Maximum amount of storage (in MiB) that the cluster can have at any time during the month. + """ +elif False: + ClusterServerlessUsageLimitsArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class ClusterServerlessUsageLimitsArgs: def __init__(__self__, *, @@ -370,6 +493,35 @@ def storage_mib_limit(self, value: pulumi.Input[int]): pulumi.set(self, "storage_mib_limit", value) +if not MYPY: + class CmekAdditionalRegionArgsDict(TypedDict): + name: pulumi.Input[str] + """ + Name of the region. Should match the region code used by the cluster's cloud provider. + """ + internal_dns: NotRequired[pulumi.Input[str]] + """ + Internal DNS name of the cluster within the cloud provider's network. Used to connect to the cluster with PrivateLink or VPC peering. + """ + node_count: NotRequired[pulumi.Input[int]] + """ + Number of nodes in the region. Will always be 0 for serverless clusters. + """ + primary: NotRequired[pulumi.Input[bool]] + """ + Set to true to mark this region as the primary for a Serverless cluster. Exactly one region must be primary. Dedicated clusters expect to have no primary region. + """ + sql_dns: NotRequired[pulumi.Input[str]] + """ + DNS name of the cluster's SQL interface. Used to connect to the cluster with IP allowlisting. + """ + ui_dns: NotRequired[pulumi.Input[str]] + """ + DNS name used when connecting to the DB Console for the cluster. + """ +elif False: + CmekAdditionalRegionArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class CmekAdditionalRegionArgs: def __init__(__self__, *, @@ -472,6 +624,20 @@ def ui_dns(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "ui_dns", value) +if not MYPY: + class CmekRegionArgsDict(TypedDict): + key: pulumi.Input['CmekRegionKeyArgsDict'] + region: pulumi.Input[str] + """ + Cloud provider region code. + """ + status: NotRequired[pulumi.Input[str]] + """ + Describes the status of the current encryption key within the region. + """ +elif False: + CmekRegionArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class CmekRegionArgs: def __init__(__self__, *, @@ -521,6 +687,42 @@ def status(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "status", value) +if not MYPY: + class CmekRegionKeyArgsDict(TypedDict): + auth_principal: pulumi.Input[str] + """ + Principal to authenticate as in order to access the key. + """ + type: pulumi.Input[str] + """ + Type of encryption key. Current allowed values are: + * AWS_KMS + * GCP_CLOUD_KMS + * NULL_KMS + """ + uri: pulumi.Input[str] + """ + Provider-specific URI pointing to the encryption key. + """ + created_at: NotRequired[pulumi.Input[str]] + """ + Indicates when the key was created. + """ + status: NotRequired[pulumi.Input[str]] + """ + Current status of this key. + """ + updated_at: NotRequired[pulumi.Input[str]] + """ + Indicates when the key was last updated. + """ + user_message: NotRequired[pulumi.Input[str]] + """ + Elaborates on the key's status and hints at how to fix issues that may have occurred during asynchronous key operations. + """ +elif False: + CmekRegionKeyArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class CmekRegionKeyArgs: def __init__(__self__, *, @@ -643,6 +845,27 @@ def user_message(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "user_message", value) +if not MYPY: + class LogExportConfigGroupArgsDict(TypedDict): + channels: pulumi.Input[Sequence[pulumi.Input[str]]] + """ + A list of CockroachDB log channels to include in this group. + """ + log_name: pulumi.Input[str] + """ + The name of the group, reflected in the log sink. + """ + min_level: NotRequired[pulumi.Input[str]] + """ + The minimum log level to filter to this log group. + """ + redact: NotRequired[pulumi.Input[bool]] + """ + Governs whether this log group should aggregate redacted logs if unset. + """ +elif False: + LogExportConfigGroupArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class LogExportConfigGroupArgs: def __init__(__self__, *, @@ -712,29 +935,87 @@ def redact(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "redact", value) +if not MYPY: + class PrivateEndpointServicesServiceArgsDict(TypedDict): + availability_zone_ids: NotRequired[pulumi.Input[Sequence[pulumi.Input[str]]]] + """ + Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + """ + aws: NotRequired[pulumi.Input['PrivateEndpointServicesServiceAwsArgsDict']] + cloud_provider: NotRequired[pulumi.Input[str]] + """ + Cloud provider associated with this service. + """ + endpoint_service_id: NotRequired[pulumi.Input[str]] + """ + Server side ID of the private endpoint connection. + """ + name: NotRequired[pulumi.Input[str]] + """ + Name of the endpoint service. + """ + region_name: NotRequired[pulumi.Input[str]] + """ + Cloud provider region code associated with this service. + """ + status: NotRequired[pulumi.Input[str]] + """ + Operation status of the service. + """ +elif False: + PrivateEndpointServicesServiceArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class PrivateEndpointServicesServiceArgs: def __init__(__self__, *, + availability_zone_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, aws: Optional[pulumi.Input['PrivateEndpointServicesServiceAwsArgs']] = None, cloud_provider: Optional[pulumi.Input[str]] = None, + endpoint_service_id: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, region_name: Optional[pulumi.Input[str]] = None, status: Optional[pulumi.Input[str]] = None): """ + :param pulumi.Input[Sequence[pulumi.Input[str]]] availability_zone_ids: Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. :param pulumi.Input[str] cloud_provider: Cloud provider associated with this service. + :param pulumi.Input[str] endpoint_service_id: Server side ID of the private endpoint connection. + :param pulumi.Input[str] name: Name of the endpoint service. :param pulumi.Input[str] region_name: Cloud provider region code associated with this service. :param pulumi.Input[str] status: Operation status of the service. """ + if availability_zone_ids is not None: + pulumi.set(__self__, "availability_zone_ids", availability_zone_ids) + if aws is not None: + warnings.warn("""nested aws fields have been moved one level up. These fields will be removed in a future version""", DeprecationWarning) + pulumi.log.warn("""aws is deprecated: nested aws fields have been moved one level up. These fields will be removed in a future version""") if aws is not None: pulumi.set(__self__, "aws", aws) if cloud_provider is not None: pulumi.set(__self__, "cloud_provider", cloud_provider) + if endpoint_service_id is not None: + pulumi.set(__self__, "endpoint_service_id", endpoint_service_id) + if name is not None: + pulumi.set(__self__, "name", name) if region_name is not None: pulumi.set(__self__, "region_name", region_name) if status is not None: pulumi.set(__self__, "status", status) + @property + @pulumi.getter(name="availabilityZoneIds") + def availability_zone_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + """ + return pulumi.get(self, "availability_zone_ids") + + @availability_zone_ids.setter + def availability_zone_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "availability_zone_ids", value) + @property @pulumi.getter + @_utilities.deprecated("""nested aws fields have been moved one level up. These fields will be removed in a future version""") def aws(self) -> Optional[pulumi.Input['PrivateEndpointServicesServiceAwsArgs']]: return pulumi.get(self, "aws") @@ -754,6 +1035,30 @@ def cloud_provider(self) -> Optional[pulumi.Input[str]]: def cloud_provider(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "cloud_provider", value) + @property + @pulumi.getter(name="endpointServiceId") + def endpoint_service_id(self) -> Optional[pulumi.Input[str]]: + """ + Server side ID of the private endpoint connection. + """ + return pulumi.get(self, "endpoint_service_id") + + @endpoint_service_id.setter + def endpoint_service_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "endpoint_service_id", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the endpoint service. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + @property @pulumi.getter(name="regionName") def region_name(self) -> Optional[pulumi.Input[str]]: @@ -779,6 +1084,23 @@ def status(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "status", value) +if not MYPY: + class PrivateEndpointServicesServiceAwsArgsDict(TypedDict): + availability_zone_ids: NotRequired[pulumi.Input[Sequence[pulumi.Input[str]]]] + """ + AZ IDs users should create their VPCs in to minimize their cost. + """ + service_id: NotRequired[pulumi.Input[str]] + """ + Server side ID of the PrivateLink connection. + """ + service_name: NotRequired[pulumi.Input[str]] + """ + AWS service name used to create endpoints. + """ +elif False: + PrivateEndpointServicesServiceAwsArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class PrivateEndpointServicesServiceAwsArgs: def __init__(__self__, *, @@ -834,6 +1156,141 @@ def service_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "service_name", value) +if not MYPY: + class UserRoleGrantRoleArgsDict(TypedDict): + resource_type: pulumi.Input[str] + """ + Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + """ + role_name: pulumi.Input[str] + """ + Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + """ + resource_id: NotRequired[pulumi.Input[str]] + """ + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ +elif False: + UserRoleGrantRoleArgsDict: TypeAlias = Mapping[str, Any] + +@pulumi.input_type +class UserRoleGrantRoleArgs: + def __init__(__self__, *, + resource_type: pulumi.Input[str], + role_name: pulumi.Input[str], + resource_id: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] resource_type: Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + :param pulumi.Input[str] role_name: Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + :param pulumi.Input[str] resource_id: ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ + pulumi.set(__self__, "resource_type", resource_type) + pulumi.set(__self__, "role_name", role_name) + if resource_id is not None: + pulumi.set(__self__, "resource_id", resource_id) + + @property + @pulumi.getter(name="resourceType") + def resource_type(self) -> pulumi.Input[str]: + """ + Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + """ + return pulumi.get(self, "resource_type") + + @resource_type.setter + def resource_type(self, value: pulumi.Input[str]): + pulumi.set(self, "resource_type", value) + + @property + @pulumi.getter(name="roleName") + def role_name(self) -> pulumi.Input[str]: + """ + Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + """ + return pulumi.get(self, "role_name") + + @role_name.setter + def role_name(self, value: pulumi.Input[str]): + pulumi.set(self, "role_name", value) + + @property + @pulumi.getter(name="resourceId") + def resource_id(self) -> Optional[pulumi.Input[str]]: + """ + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ + return pulumi.get(self, "resource_id") + + @resource_id.setter + def resource_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "resource_id", value) + + +if not MYPY: + class UserRoleGrantsRoleArgsDict(TypedDict): + resource_type: pulumi.Input[str] + """ + Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + """ + role_name: pulumi.Input[str] + """ + Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + """ + resource_id: NotRequired[pulumi.Input[str]] + """ + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ +elif False: + UserRoleGrantsRoleArgsDict: TypeAlias = Mapping[str, Any] + @pulumi.input_type class UserRoleGrantsRoleArgs: def __init__(__self__, *, @@ -846,8 +1303,6 @@ def __init__(__self__, *, * CLUSTER * FOLDER :param pulumi.Input[str] role_name: Name of the role to grant. Allowed values are: - * DEVELOPER - * ADMIN * BILLING_COORDINATOR * ORG_ADMIN * ORG_MEMBER @@ -857,7 +1312,7 @@ def __init__(__self__, *, * CLUSTER_CREATOR * FOLDER_ADMIN * FOLDER_MOVER - :param pulumi.Input[str] resource_id: ID of the resource. Omit if resource_type is 'ORGANIZATION'. + :param pulumi.Input[str] resource_id: ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. """ pulumi.set(__self__, "resource_type", resource_type) pulumi.set(__self__, "role_name", role_name) @@ -884,8 +1339,6 @@ def resource_type(self, value: pulumi.Input[str]): def role_name(self) -> pulumi.Input[str]: """ Name of the role to grant. Allowed values are: - * DEVELOPER - * ADMIN * BILLING_COORDINATOR * ORG_ADMIN * ORG_MEMBER @@ -906,7 +1359,7 @@ def role_name(self, value: pulumi.Input[str]): @pulumi.getter(name="resourceId") def resource_id(self) -> Optional[pulumi.Input[str]]: """ - ID of the resource. Omit if resource_type is 'ORGANIZATION'. + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. """ return pulumi.get(self, "resource_id") diff --git a/sdk/python/pulumiverse_cockroach/_utilities.py b/sdk/python/pulumiverse_cockroach/_utilities.py index e1b3372..955dfdc 100644 --- a/sdk/python/pulumiverse_cockroach/_utilities.py +++ b/sdk/python/pulumiverse_cockroach/_utilities.py @@ -264,7 +264,7 @@ def call_plain( output = pulumi.runtime.call(tok, props, res, typ) # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency. - result, known, secret, _ = _sync_await(asyncio.ensure_future(_await_output(output))) + result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output))) problem = None if not known: diff --git a/sdk/python/pulumiverse_cockroach/allow_list.py b/sdk/python/pulumiverse_cockroach/allow_list.py index 5653deb..048980f 100644 --- a/sdk/python/pulumiverse_cockroach/allow_list.py +++ b/sdk/python/pulumiverse_cockroach/allow_list.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['AllowListArgs', 'AllowList'] @@ -221,6 +226,29 @@ def __init__(__self__, """ List of IP ranges allowed to access the cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + vpn = cockroach.AllowList("vpn", + name="vpn", + cidr_ip="123.123.1.1", + cidr_mask=32, + ui=True, + sql=True, + cluster_id=staging["id"]) + ``` + + ## Import + + format: :/ + + ```sh + $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32 + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cidr_ip: IP address component of the [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation) range for this entry. @@ -238,6 +266,29 @@ def __init__(__self__, """ List of IP ranges allowed to access the cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + vpn = cockroach.AllowList("vpn", + name="vpn", + cidr_ip="123.123.1.1", + cidr_mask=32, + ui=True, + sql=True, + cluster_id=staging["id"]) + ``` + + ## Import + + format: :/ + + ```sh + $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32 + ``` + :param str resource_name: The name of the resource. :param AllowListArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/api_oidc_config.py b/sdk/python/pulumiverse_cockroach/api_oidc_config.py index 841f608..24064c2 100644 --- a/sdk/python/pulumiverse_cockroach/api_oidc_config.py +++ b/sdk/python/pulumiverse_cockroach/api_oidc_config.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumiverse_cockroach/ca_cert.py b/sdk/python/pulumiverse_cockroach/ca_cert.py index 178be2b..457c7fe 100644 --- a/sdk/python/pulumiverse_cockroach/ca_cert.py +++ b/sdk/python/pulumiverse_cockroach/ca_cert.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['CaCertArgs', 'CaCert'] @@ -116,6 +121,20 @@ def __init__(__self__, """ Manages client CA certs. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + # The X509 certificate in PEM format. + client_certificate = config.require("clientCertificate") + prod = cockroach.CaCert("prod", + cluster_id=prod_cockroach_cluster["id"], + x509_pem_cert=client_certificate) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: Cluster ID. @@ -130,6 +149,20 @@ def __init__(__self__, """ Manages client CA certs. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + # The X509 certificate in PEM format. + client_certificate = config.require("clientCertificate") + prod = cockroach.CaCert("prod", + cluster_id=prod_cockroach_cluster["id"], + x509_pem_cert=client_certificate) + ``` + :param str resource_name: The name of the resource. :param CaCertArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/cluster.py b/sdk/python/pulumiverse_cockroach/cluster.py index f75272e..8d15585 100644 --- a/sdk/python/pulumiverse_cockroach/cluster.py +++ b/sdk/python/pulumiverse_cockroach/cluster.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumiverse_cockroach/cmek.py b/sdk/python/pulumiverse_cockroach/cmek.py index 3ac8aa0..8daff47 100644 --- a/sdk/python/pulumiverse_cockroach/cmek.py +++ b/sdk/python/pulumiverse_cockroach/cmek.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * @@ -164,6 +169,24 @@ def __init__(__self__, """ Customer-managed encryption keys (CMEK) resource for a single cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + dedicated = cockroach.Cmek("dedicated", + cluster_id=dedicated_cockroach_cluster["id"], + regions=[{ + "region": "us-central-1", + "key": { + "auth_principal": "arn:aws:iam::account:role/role-name-with-path", + "type": "AWS_KMS", + "uri": "arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key", + }, + }]) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[Union['CmekAdditionalRegionArgs', 'CmekAdditionalRegionArgsDict']]]] additional_regions: Once CMEK is enabled for a cluster, no new regions can be added to the cluster resource, since they need encryption key @@ -180,6 +203,24 @@ def __init__(__self__, """ Customer-managed encryption keys (CMEK) resource for a single cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + dedicated = cockroach.Cmek("dedicated", + cluster_id=dedicated_cockroach_cluster["id"], + regions=[{ + "region": "us-central-1", + "key": { + "auth_principal": "arn:aws:iam::account:role/role-name-with-path", + "type": "AWS_KMS", + "uri": "arn:aws:kms:us-west-2:111122223333:key/id-of-kms-key", + }, + }]) + ``` + :param str resource_name: The name of the resource. :param CmekArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/config/__init__.pyi b/sdk/python/pulumiverse_cockroach/config/__init__.pyi index 0135131..b51e58b 100644 --- a/sdk/python/pulumiverse_cockroach/config/__init__.pyi +++ b/sdk/python/pulumiverse_cockroach/config/__init__.pyi @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from .. import _utilities apikey: Optional[str] diff --git a/sdk/python/pulumiverse_cockroach/config/vars.py b/sdk/python/pulumiverse_cockroach/config/vars.py index c3da5d5..91ba775 100644 --- a/sdk/python/pulumiverse_cockroach/config/vars.py +++ b/sdk/python/pulumiverse_cockroach/config/vars.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from .. import _utilities import types diff --git a/sdk/python/pulumiverse_cockroach/database.py b/sdk/python/pulumiverse_cockroach/database.py index 97c7864..45abaf2 100644 --- a/sdk/python/pulumiverse_cockroach/database.py +++ b/sdk/python/pulumiverse_cockroach/database.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['DatabaseArgs', 'Database'] @@ -116,6 +121,27 @@ def __init__(__self__, """ CockroachDB database. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.Database("cockroach", + name="example-database", + cluster_id=cluster_id) + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: ID of the cluster the database belongs to. @@ -130,6 +156,27 @@ def __init__(__self__, """ CockroachDB database. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.Database("cockroach", + name="example-database", + cluster_id=cluster_id) + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/database:Database my_database 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:mydatabase + ``` + :param str resource_name: The name of the resource. :param DatabaseArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/finalize_version_upgrade.py b/sdk/python/pulumiverse_cockroach/finalize_version_upgrade.py index fdb6f74..80061c1 100644 --- a/sdk/python/pulumiverse_cockroach/finalize_version_upgrade.py +++ b/sdk/python/pulumiverse_cockroach/finalize_version_upgrade.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['FinalizeVersionUpgradeArgs', 'FinalizeVersionUpgrade'] @@ -100,6 +105,20 @@ def __init__(__self__, """ Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach_version = config.require("cockroachVersion") + cockroach = cockroach.FinalizeVersionUpgrade("cockroach", + cluster_id=cluster_id, + cockroach_version=cockroach_version) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: Cluster ID. @@ -114,6 +133,20 @@ def __init__(__self__, """ Utility resource that represents the one-time action of finalizing a cluster's pending CockroachDB version upgrade. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach_version = config.require("cockroachVersion") + cockroach = cockroach.FinalizeVersionUpgrade("cockroach", + cluster_id=cluster_id, + cockroach_version=cockroach_version) + ``` + :param str resource_name: The name of the resource. :param FinalizeVersionUpgradeArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/folder.py b/sdk/python/pulumiverse_cockroach/folder.py index 9f52320..d32108a 100644 --- a/sdk/python/pulumiverse_cockroach/folder.py +++ b/sdk/python/pulumiverse_cockroach/folder.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['FolderArgs', 'Folder'] @@ -100,6 +105,20 @@ def __init__(__self__, """ CockroachDB Cloud folder. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + a_team = cockroach.Folder("a_team", + name="a-team", + parent_id="root") + a_team_dev = cockroach.Folder("a_team_dev", + name="dev", + parent_id=a_team.id) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: Name of the folder. @@ -114,6 +133,20 @@ def __init__(__self__, """ CockroachDB Cloud folder. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + a_team = cockroach.Folder("a_team", + name="a-team", + parent_id="root") + a_team_dev = cockroach.Folder("a_team_dev", + name="dev", + parent_id=a_team.id) + ``` + :param str resource_name: The name of the resource. :param FolderArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/get_cluster_cert.py b/sdk/python/pulumiverse_cockroach/get_cluster_cert.py index 6a411ad..c55bc56 100644 --- a/sdk/python/pulumiverse_cockroach/get_cluster_cert.py +++ b/sdk/python/pulumiverse_cockroach/get_cluster_cert.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = [ @@ -63,6 +68,17 @@ def get_cluster_cert(id: Optional[str] = None, Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\\postgresql\\root.crt` on Windows. + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.get_cluster_cert(id=cluster_id) + ``` + :param str id: Cluster ID. """ @@ -74,9 +90,6 @@ def get_cluster_cert(id: Optional[str] = None, return AwaitableGetClusterCertResult( cert=pulumi.get(__ret__, 'cert'), id=pulumi.get(__ret__, 'id')) - - -@_utilities.lift_output_func(get_cluster_cert) def get_cluster_cert_output(id: Optional[pulumi.Input[str]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetClusterCertResult]: """ @@ -84,7 +97,24 @@ def get_cluster_cert_output(id: Optional[pulumi.Input[str]] = None, Serverless clusters use the root PostgreSQL CA cert. If it isn't already installed, the certificate can be appended to `$HOME/.postgresql/root.crt` on MacOS or Linux, or `$env:appdata\\postgresql\\root.crt` on Windows. + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.get_cluster_cert(id=cluster_id) + ``` + :param str id: Cluster ID. """ - ... + __args__ = dict() + __args__['id'] = id + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getClusterCert:getClusterCert', __args__, opts=opts, typ=GetClusterCertResult) + return __ret__.apply(lambda __response__: GetClusterCertResult( + cert=pulumi.get(__response__, 'cert'), + id=pulumi.get(__response__, 'id'))) diff --git a/sdk/python/pulumiverse_cockroach/get_cockroach_cluster.py b/sdk/python/pulumiverse_cockroach/get_cockroach_cluster.py index 85da60b..72db64c 100644 --- a/sdk/python/pulumiverse_cockroach/get_cockroach_cluster.py +++ b/sdk/python/pulumiverse_cockroach/get_cockroach_cluster.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs @@ -163,6 +168,17 @@ def get_cockroach_cluster(id: Optional[str] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCockroachClusterResult: """ CockroachDB Cloud cluster. Can be Dedicated or Serverless. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.get_cockroach_cluster(id=cluster_id) + ``` """ __args__ = dict() __args__['id'] = id @@ -184,12 +200,38 @@ def get_cockroach_cluster(id: Optional[str] = None, serverless=pulumi.get(__ret__, 'serverless'), state=pulumi.get(__ret__, 'state'), upgrade_status=pulumi.get(__ret__, 'upgrade_status')) - - -@_utilities.lift_output_func(get_cockroach_cluster) def get_cockroach_cluster_output(id: Optional[pulumi.Input[str]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCockroachClusterResult]: """ CockroachDB Cloud cluster. Can be Dedicated or Serverless. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.get_cockroach_cluster(id=cluster_id) + ``` """ - ... + __args__ = dict() + __args__['id'] = id + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getCockroachCluster:getCockroachCluster', __args__, opts=opts, typ=GetCockroachClusterResult) + return __ret__.apply(lambda __response__: GetCockroachClusterResult( + account_id=pulumi.get(__response__, 'account_id'), + cloud_provider=pulumi.get(__response__, 'cloud_provider'), + cockroach_version=pulumi.get(__response__, 'cockroach_version'), + creator_id=pulumi.get(__response__, 'creator_id'), + dedicated=pulumi.get(__response__, 'dedicated'), + id=pulumi.get(__response__, 'id'), + name=pulumi.get(__response__, 'name'), + operation_status=pulumi.get(__response__, 'operation_status'), + parent_id=pulumi.get(__response__, 'parent_id'), + plan=pulumi.get(__response__, 'plan'), + regions=pulumi.get(__response__, 'regions'), + serverless=pulumi.get(__response__, 'serverless'), + state=pulumi.get(__response__, 'state'), + upgrade_status=pulumi.get(__response__, 'upgrade_status'))) diff --git a/sdk/python/pulumiverse_cockroach/get_connection_string.py b/sdk/python/pulumiverse_cockroach/get_connection_string.py index 5660c19..22eeee1 100644 --- a/sdk/python/pulumiverse_cockroach/get_connection_string.py +++ b/sdk/python/pulumiverse_cockroach/get_connection_string.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs @@ -104,6 +109,25 @@ def get_connection_string(database: Optional[str] = None, opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetConnectionStringResult: """ Generic connection string for a cluster. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + sql_user_name = config.require("sqlUserName") + sql_user_password = config.require("sqlUserPassword") + database = config.require("database") + os = config.require("os") + cockroach = cockroach.get_connection_string(id=cluster_id, + sql_user=sql_user_name, + password=sql_user_password, + database=database, + os=os) + ``` """ __args__ = dict() __args__['database'] = database @@ -122,9 +146,6 @@ def get_connection_string(database: Optional[str] = None, os=pulumi.get(__ret__, 'os'), password=pulumi.get(__ret__, 'password'), sql_user=pulumi.get(__ret__, 'sql_user')) - - -@_utilities.lift_output_func(get_connection_string) def get_connection_string_output(database: Optional[pulumi.Input[Optional[str]]] = None, id: Optional[pulumi.Input[str]] = None, os: Optional[pulumi.Input[Optional[str]]] = None, @@ -133,5 +154,39 @@ def get_connection_string_output(database: Optional[pulumi.Input[Optional[str]]] opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetConnectionStringResult]: """ Generic connection string for a cluster. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + sql_user_name = config.require("sqlUserName") + sql_user_password = config.require("sqlUserPassword") + database = config.require("database") + os = config.require("os") + cockroach = cockroach.get_connection_string(id=cluster_id, + sql_user=sql_user_name, + password=sql_user_password, + database=database, + os=os) + ``` """ - ... + __args__ = dict() + __args__['database'] = database + __args__['id'] = id + __args__['os'] = os + __args__['password'] = password + __args__['sqlUser'] = sql_user + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getConnectionString:getConnectionString', __args__, opts=opts, typ=GetConnectionStringResult) + return __ret__.apply(lambda __response__: GetConnectionStringResult( + connection_params=pulumi.get(__response__, 'connection_params'), + connection_string=pulumi.get(__response__, 'connection_string'), + database=pulumi.get(__response__, 'database'), + id=pulumi.get(__response__, 'id'), + os=pulumi.get(__response__, 'os'), + password=pulumi.get(__response__, 'password'), + sql_user=pulumi.get(__response__, 'sql_user'))) diff --git a/sdk/python/pulumiverse_cockroach/get_folder.py b/sdk/python/pulumiverse_cockroach/get_folder.py new file mode 100644 index 0000000..a222d13 --- /dev/null +++ b/sdk/python/pulumiverse_cockroach/get_folder.py @@ -0,0 +1,152 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities + +__all__ = [ + 'GetFolderResult', + 'AwaitableGetFolderResult', + 'get_folder', + 'get_folder_output', +] + +@pulumi.output_type +class GetFolderResult: + """ + A collection of values returned by getFolder. + """ + def __init__(__self__, id=None, name=None, parent_id=None, path=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if name and not isinstance(name, str): + raise TypeError("Expected argument 'name' to be a str") + pulumi.set(__self__, "name", name) + if parent_id and not isinstance(parent_id, str): + raise TypeError("Expected argument 'parent_id' to be a str") + pulumi.set(__self__, "parent_id", parent_id) + if path and not isinstance(path, str): + raise TypeError("Expected argument 'path' to be a str") + pulumi.set(__self__, "path", path) + + @property + @pulumi.getter + def id(self) -> Optional[str]: + """ + The id the folder. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def name(self) -> str: + """ + Name of the folder. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="parentId") + def parent_id(self) -> str: + """ + The ID of the folders's parent folder. 'root' is used for a folder at the root level. + """ + return pulumi.get(self, "parent_id") + + @property + @pulumi.getter + def path(self) -> Optional[str]: + """ + An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + """ + return pulumi.get(self, "path") + + +class AwaitableGetFolderResult(GetFolderResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetFolderResult( + id=self.id, + name=self.name, + parent_id=self.parent_id, + path=self.path) + + +def get_folder(id: Optional[str] = None, + path: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFolderResult: + """ + A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + prod_folder_id = config.require("prodFolderId") + team1 = cockroach.get_folder(path="/prod/team1") + prod = cockroach.get_folder(id=prod_folder_id) + ``` + + + :param str id: The id the folder. + :param str path: An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + """ + __args__ = dict() + __args__['id'] = id + __args__['path'] = path + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('cockroach:index/getFolder:getFolder', __args__, opts=opts, typ=GetFolderResult).value + + return AwaitableGetFolderResult( + id=pulumi.get(__ret__, 'id'), + name=pulumi.get(__ret__, 'name'), + parent_id=pulumi.get(__ret__, 'parent_id'), + path=pulumi.get(__ret__, 'path')) +def get_folder_output(id: Optional[pulumi.Input[Optional[str]]] = None, + path: Optional[pulumi.Input[Optional[str]]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFolderResult]: + """ + A CockroachDB Cloud folder. Folders can contain clusters or other folders. They can be used to group resources together for the purposes of access control, organization or fine grained invoicing. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + prod_folder_id = config.require("prodFolderId") + team1 = cockroach.get_folder(path="/prod/team1") + prod = cockroach.get_folder(id=prod_folder_id) + ``` + + + :param str id: The id the folder. + :param str path: An absolute path to the folder. Trailing slashes are optional. (i.e. /folder1/folder2) + """ + __args__ = dict() + __args__['id'] = id + __args__['path'] = path + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getFolder:getFolder', __args__, opts=opts, typ=GetFolderResult) + return __ret__.apply(lambda __response__: GetFolderResult( + id=pulumi.get(__response__, 'id'), + name=pulumi.get(__response__, 'name'), + parent_id=pulumi.get(__response__, 'parent_id'), + path=pulumi.get(__response__, 'path'))) diff --git a/sdk/python/pulumiverse_cockroach/get_organization.py b/sdk/python/pulumiverse_cockroach/get_organization.py index f089a47..239a376 100644 --- a/sdk/python/pulumiverse_cockroach/get_organization.py +++ b/sdk/python/pulumiverse_cockroach/get_organization.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = [ @@ -83,6 +88,15 @@ def __await__(self): def get_organization(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationResult: """ Information about the organization associated with the user's API key. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + prod = cockroach.get_organization() + ``` """ __args__ = dict() opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) @@ -93,11 +107,24 @@ def get_organization(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGe id=pulumi.get(__ret__, 'id'), label=pulumi.get(__ret__, 'label'), name=pulumi.get(__ret__, 'name')) - - -@_utilities.lift_output_func(get_organization) def get_organization_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetOrganizationResult]: """ Information about the organization associated with the user's API key. + + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + prod = cockroach.get_organization() + ``` """ - ... + __args__ = dict() + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getOrganization:getOrganization', __args__, opts=opts, typ=GetOrganizationResult) + return __ret__.apply(lambda __response__: GetOrganizationResult( + created_at=pulumi.get(__response__, 'created_at'), + id=pulumi.get(__response__, 'id'), + label=pulumi.get(__response__, 'label'), + name=pulumi.get(__response__, 'name'))) diff --git a/sdk/python/pulumiverse_cockroach/get_person_user.py b/sdk/python/pulumiverse_cockroach/get_person_user.py index bf08ca6..c12b53c 100644 --- a/sdk/python/pulumiverse_cockroach/get_person_user.py +++ b/sdk/python/pulumiverse_cockroach/get_person_user.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = [ @@ -61,6 +66,17 @@ def get_person_user(email: Optional[str] = None, """ Information about an individual user. + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + email_address = config.require("emailAddress") + cockroach = cockroach.get_person_user(email=email_address) + ``` + :param str email: Email address used to find the User ID. """ @@ -72,15 +88,29 @@ def get_person_user(email: Optional[str] = None, return AwaitableGetPersonUserResult( email=pulumi.get(__ret__, 'email'), id=pulumi.get(__ret__, 'id')) - - -@_utilities.lift_output_func(get_person_user) def get_person_user_output(email: Optional[pulumi.Input[str]] = None, opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPersonUserResult]: """ Information about an individual user. + ## Example Usage + + ```python + import pulumi + import pulumi_cockroach as cockroach + + config = pulumi.Config() + email_address = config.require("emailAddress") + cockroach = cockroach.get_person_user(email=email_address) + ``` + :param str email: Email address used to find the User ID. """ - ... + __args__ = dict() + __args__['email'] = email + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke_output('cockroach:index/getPersonUser:getPersonUser', __args__, opts=opts, typ=GetPersonUserResult) + return __ret__.apply(lambda __response__: GetPersonUserResult( + email=pulumi.get(__response__, 'email'), + id=pulumi.get(__response__, 'id'))) diff --git a/sdk/python/pulumiverse_cockroach/log_export_config.py b/sdk/python/pulumiverse_cockroach/log_export_config.py index 505269b..0e2b6ad 100644 --- a/sdk/python/pulumiverse_cockroach/log_export_config.py +++ b/sdk/python/pulumiverse_cockroach/log_export_config.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * diff --git a/sdk/python/pulumiverse_cockroach/maintenance_window.py b/sdk/python/pulumiverse_cockroach/maintenance_window.py index ccec0db..eccf6ae 100644 --- a/sdk/python/pulumiverse_cockroach/maintenance_window.py +++ b/sdk/python/pulumiverse_cockroach/maintenance_window.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['MaintenanceWindowArgs', 'MaintenanceWindow'] @@ -132,6 +137,26 @@ def __init__(__self__, """ Maintenance window configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + offset_duration = config.get_float("offsetDuration") + if offset_duration is None: + offset_duration = 172800 + window_duration = config.get_float("windowDuration") + if window_duration is None: + window_duration = 21600 + example = cockroach.MaintenanceWindow("example", + cluster_id=cluster_id, + offset_duration=offset_duration, + window_duration=window_duration) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: Cluster ID. @@ -147,6 +172,26 @@ def __init__(__self__, """ Maintenance window configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + offset_duration = config.get_float("offsetDuration") + if offset_duration is None: + offset_duration = 172800 + window_duration = config.get_float("windowDuration") + if window_duration is None: + window_duration = 21600 + example = cockroach.MaintenanceWindow("example", + cluster_id=cluster_id, + offset_duration=offset_duration, + window_duration=window_duration) + ``` + :param str resource_name: The name of the resource. :param MaintenanceWindowArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/metric_export_cloudwatch_config.py b/sdk/python/pulumiverse_cockroach/metric_export_cloudwatch_config.py index 7b396a4..8b323ac 100644 --- a/sdk/python/pulumiverse_cockroach/metric_export_cloudwatch_config.py +++ b/sdk/python/pulumiverse_cockroach/metric_export_cloudwatch_config.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['MetricExportCloudwatchConfigArgs', 'MetricExportCloudwatchConfig'] @@ -198,6 +203,24 @@ def __init__(__self__, """ Amazon CloudWatch metric export configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + role_arn = config.require("roleArn") + log_group_name = config.require("logGroupName") + aws_region = config.require("awsRegion") + example = cockroach.MetricExportCloudwatchConfig("example", + cluster_id=cluster_id, + role_arn=role_arn, + log_group_name=log_group_name, + target_region=aws_region) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: Cluster ID. @@ -214,6 +237,24 @@ def __init__(__self__, """ Amazon CloudWatch metric export configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + role_arn = config.require("roleArn") + log_group_name = config.require("logGroupName") + aws_region = config.require("awsRegion") + example = cockroach.MetricExportCloudwatchConfig("example", + cluster_id=cluster_id, + role_arn=role_arn, + log_group_name=log_group_name, + target_region=aws_region) + ``` + :param str resource_name: The name of the resource. :param MetricExportCloudwatchConfigArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/metric_export_datadog_config.py b/sdk/python/pulumiverse_cockroach/metric_export_datadog_config.py index 4aaf14f..d9bdc65 100644 --- a/sdk/python/pulumiverse_cockroach/metric_export_datadog_config.py +++ b/sdk/python/pulumiverse_cockroach/metric_export_datadog_config.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['MetricExportDatadogConfigArgs', 'MetricExportDatadogConfig'] @@ -164,6 +169,22 @@ def __init__(__self__, """ DataDog metric export configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + datadog_site = config.require("datadogSite") + datadog_api_key = config.require("datadogApiKey") + example = cockroach.MetricExportDatadogConfig("example", + cluster_id=cluster_id, + site=datadog_site, + api_key=datadog_api_key) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] api_key: A Datadog API key. @@ -179,6 +200,22 @@ def __init__(__self__, """ DataDog metric export configuration for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + datadog_site = config.require("datadogSite") + datadog_api_key = config.require("datadogApiKey") + example = cockroach.MetricExportDatadogConfig("example", + cluster_id=cluster_id, + site=datadog_site, + api_key=datadog_api_key) + ``` + :param str resource_name: The name of the resource. :param MetricExportDatadogConfigArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/outputs.py b/sdk/python/pulumiverse_cockroach/outputs.py index 019a4d6..6694369 100644 --- a/sdk/python/pulumiverse_cockroach/outputs.py +++ b/sdk/python/pulumiverse_cockroach/outputs.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs @@ -22,6 +27,7 @@ 'LogExportConfigGroup', 'PrivateEndpointServicesService', 'PrivateEndpointServicesServiceAws', + 'UserRoleGrantRole', 'UserRoleGrantsRole', 'GetCockroachClusterDedicatedResult', 'GetCockroachClusterRegionResult', @@ -739,8 +745,12 @@ class PrivateEndpointServicesService(dict): @staticmethod def __key_warning(key: str): suggest = None - if key == "cloudProvider": + if key == "availabilityZoneIds": + suggest = "availability_zone_ids" + elif key == "cloudProvider": suggest = "cloud_provider" + elif key == "endpointServiceId": + suggest = "endpoint_service_id" elif key == "regionName": suggest = "region_name" @@ -756,26 +766,47 @@ def get(self, key: str, default = None) -> Any: return super().get(key, default) def __init__(__self__, *, + availability_zone_ids: Optional[Sequence[str]] = None, aws: Optional['outputs.PrivateEndpointServicesServiceAws'] = None, cloud_provider: Optional[str] = None, + endpoint_service_id: Optional[str] = None, + name: Optional[str] = None, region_name: Optional[str] = None, status: Optional[str] = None): """ + :param Sequence[str] availability_zone_ids: Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. :param str cloud_provider: Cloud provider associated with this service. + :param str endpoint_service_id: Server side ID of the private endpoint connection. + :param str name: Name of the endpoint service. :param str region_name: Cloud provider region code associated with this service. :param str status: Operation status of the service. """ + if availability_zone_ids is not None: + pulumi.set(__self__, "availability_zone_ids", availability_zone_ids) if aws is not None: pulumi.set(__self__, "aws", aws) if cloud_provider is not None: pulumi.set(__self__, "cloud_provider", cloud_provider) + if endpoint_service_id is not None: + pulumi.set(__self__, "endpoint_service_id", endpoint_service_id) + if name is not None: + pulumi.set(__self__, "name", name) if region_name is not None: pulumi.set(__self__, "region_name", region_name) if status is not None: pulumi.set(__self__, "status", status) + @property + @pulumi.getter(name="availabilityZoneIds") + def availability_zone_ids(self) -> Optional[Sequence[str]]: + """ + Availability Zone IDs of the private endpoint service. It is recommended, for cost optimization purposes, to create the private endpoint spanning these same availability zones. For more information, see data transfer cost information for your cloud provider. + """ + return pulumi.get(self, "availability_zone_ids") + @property @pulumi.getter + @_utilities.deprecated("""nested aws fields have been moved one level up. These fields will be removed in a future version""") def aws(self) -> Optional['outputs.PrivateEndpointServicesServiceAws']: return pulumi.get(self, "aws") @@ -787,6 +818,22 @@ def cloud_provider(self) -> Optional[str]: """ return pulumi.get(self, "cloud_provider") + @property + @pulumi.getter(name="endpointServiceId") + def endpoint_service_id(self) -> Optional[str]: + """ + Server side ID of the private endpoint connection. + """ + return pulumi.get(self, "endpoint_service_id") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + Name of the endpoint service. + """ + return pulumi.get(self, "name") + @property @pulumi.getter(name="regionName") def region_name(self) -> Optional[str]: @@ -868,6 +915,92 @@ def service_name(self) -> Optional[str]: return pulumi.get(self, "service_name") +@pulumi.output_type +class UserRoleGrantRole(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "resourceType": + suggest = "resource_type" + elif key == "roleName": + suggest = "role_name" + elif key == "resourceId": + suggest = "resource_id" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in UserRoleGrantRole. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + UserRoleGrantRole.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + UserRoleGrantRole.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + resource_type: str, + role_name: str, + resource_id: Optional[str] = None): + """ + :param str resource_type: Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + :param str role_name: Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + :param str resource_id: ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ + pulumi.set(__self__, "resource_type", resource_type) + pulumi.set(__self__, "role_name", role_name) + if resource_id is not None: + pulumi.set(__self__, "resource_id", resource_id) + + @property + @pulumi.getter(name="resourceType") + def resource_type(self) -> str: + """ + Type of resource. Allowed values are: + * ORGANIZATION + * CLUSTER + * FOLDER + """ + return pulumi.get(self, "resource_type") + + @property + @pulumi.getter(name="roleName") + def role_name(self) -> str: + """ + Name of the role to grant. Allowed values are: + * BILLING_COORDINATOR + * ORG_ADMIN + * ORG_MEMBER + * CLUSTER_ADMIN + * CLUSTER_OPERATOR_WRITER + * CLUSTER_DEVELOPER + * CLUSTER_CREATOR + * FOLDER_ADMIN + * FOLDER_MOVER + """ + return pulumi.get(self, "role_name") + + @property + @pulumi.getter(name="resourceId") + def resource_id(self) -> Optional[str]: + """ + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. + """ + return pulumi.get(self, "resource_id") + + @pulumi.output_type class UserRoleGrantsRole(dict): @staticmethod @@ -901,8 +1034,6 @@ def __init__(__self__, *, * CLUSTER * FOLDER :param str role_name: Name of the role to grant. Allowed values are: - * DEVELOPER - * ADMIN * BILLING_COORDINATOR * ORG_ADMIN * ORG_MEMBER @@ -912,7 +1043,7 @@ def __init__(__self__, *, * CLUSTER_CREATOR * FOLDER_ADMIN * FOLDER_MOVER - :param str resource_id: ID of the resource. Omit if resource_type is 'ORGANIZATION'. + :param str resource_id: ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. """ pulumi.set(__self__, "resource_type", resource_type) pulumi.set(__self__, "role_name", role_name) @@ -935,8 +1066,6 @@ def resource_type(self) -> str: def role_name(self) -> str: """ Name of the role to grant. Allowed values are: - * DEVELOPER - * ADMIN * BILLING_COORDINATOR * ORG_ADMIN * ORG_MEMBER @@ -953,7 +1082,7 @@ def role_name(self) -> str: @pulumi.getter(name="resourceId") def resource_id(self) -> Optional[str]: """ - ID of the resource. Omit if resource_type is 'ORGANIZATION'. + ID of the resource. Required if the resource_type is 'FOLDER' or 'CLUSTER'. It should be omitted otherwise. """ return pulumi.get(self, "resource_id") diff --git a/sdk/python/pulumiverse_cockroach/private_endpoint_connection.py b/sdk/python/pulumiverse_cockroach/private_endpoint_connection.py index 3db99e2..eada217 100644 --- a/sdk/python/pulumiverse_cockroach/private_endpoint_connection.py +++ b/sdk/python/pulumiverse_cockroach/private_endpoint_connection.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['PrivateEndpointConnectionArgs', 'PrivateEndpointConnection'] @@ -18,7 +23,7 @@ def __init__(__self__, *, endpoint_id: pulumi.Input[str]): """ The set of arguments for constructing a PrivateEndpointConnection resource. - :param pulumi.Input[str] endpoint_id: Client side ID of the PrivateLink connection. + :param pulumi.Input[str] endpoint_id: Client side ID of the Private Endpoint Connection. """ pulumi.set(__self__, "cluster_id", cluster_id) pulumi.set(__self__, "endpoint_id", endpoint_id) @@ -36,7 +41,7 @@ def cluster_id(self, value: pulumi.Input[str]): @pulumi.getter(name="endpointId") def endpoint_id(self) -> pulumi.Input[str]: """ - Client side ID of the PrivateLink connection. + Client side ID of the Private Endpoint Connection. """ return pulumi.get(self, "endpoint_id") @@ -56,9 +61,9 @@ def __init__(__self__, *, """ Input properties used for looking up and filtering PrivateEndpointConnection resources. :param pulumi.Input[str] cloud_provider: Cloud provider associated with this connection. - :param pulumi.Input[str] endpoint_id: Client side ID of the PrivateLink connection. + :param pulumi.Input[str] endpoint_id: Client side ID of the Private Endpoint Connection. :param pulumi.Input[str] region_name: Cloud provider region code associated with this connection. - :param pulumi.Input[str] service_id: Server side ID of the PrivateLink connection. + :param pulumi.Input[str] service_id: Server side ID of the Private Endpoint Connection. """ if cloud_provider is not None: pulumi.set(__self__, "cloud_provider", cloud_provider) @@ -96,7 +101,7 @@ def cluster_id(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="endpointId") def endpoint_id(self) -> Optional[pulumi.Input[str]]: """ - Client side ID of the PrivateLink connection. + Client side ID of the Private Endpoint Connection. """ return pulumi.get(self, "endpoint_id") @@ -120,7 +125,7 @@ def region_name(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="serviceId") def service_id(self) -> Optional[pulumi.Input[str]]: """ - Server side ID of the PrivateLink connection. + Server side ID of the Private Endpoint Connection. """ return pulumi.get(self, "service_id") @@ -138,11 +143,19 @@ def __init__(__self__, endpoint_id: Optional[pulumi.Input[str]] = None, __props__=None): """ - AWS PrivateLink Endpoint Connection. + Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network. + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc + ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] endpoint_id: Client side ID of the PrivateLink connection. + :param pulumi.Input[str] endpoint_id: Client side ID of the Private Endpoint Connection. """ ... @overload @@ -151,7 +164,15 @@ def __init__(__self__, args: PrivateEndpointConnectionArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - AWS PrivateLink Endpoint Connection. + Private endpoint connections allow customer applications to connect to a CockroachDB Cloud cluster without traversing the public internet. All application-database traffic remains within the cloud-provider network. + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/privateEndpointConnection:PrivateEndpointConnection resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:vpce-0c1308d7312217abc + ``` :param str resource_name: The name of the resource. :param PrivateEndpointConnectionArgs args: The arguments to use to populate this resource's properties. @@ -211,9 +232,9 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cloud_provider: Cloud provider associated with this connection. - :param pulumi.Input[str] endpoint_id: Client side ID of the PrivateLink connection. + :param pulumi.Input[str] endpoint_id: Client side ID of the Private Endpoint Connection. :param pulumi.Input[str] region_name: Cloud provider region code associated with this connection. - :param pulumi.Input[str] service_id: Server side ID of the PrivateLink connection. + :param pulumi.Input[str] service_id: Server side ID of the Private Endpoint Connection. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -243,7 +264,7 @@ def cluster_id(self) -> pulumi.Output[str]: @pulumi.getter(name="endpointId") def endpoint_id(self) -> pulumi.Output[str]: """ - Client side ID of the PrivateLink connection. + Client side ID of the Private Endpoint Connection. """ return pulumi.get(self, "endpoint_id") @@ -259,7 +280,7 @@ def region_name(self) -> pulumi.Output[str]: @pulumi.getter(name="serviceId") def service_id(self) -> pulumi.Output[str]: """ - Server side ID of the PrivateLink connection. + Server side ID of the Private Endpoint Connection. """ return pulumi.get(self, "service_id") diff --git a/sdk/python/pulumiverse_cockroach/private_endpoint_services.py b/sdk/python/pulumiverse_cockroach/private_endpoint_services.py index b3c6903..ec2fe31 100644 --- a/sdk/python/pulumiverse_cockroach/private_endpoint_services.py +++ b/sdk/python/pulumiverse_cockroach/private_endpoint_services.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * @@ -72,7 +77,26 @@ def __init__(__self__, cluster_id: Optional[pulumi.Input[str]] = None, __props__=None): """ - PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP). + PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster. + + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.PrivateEndpointServices("cockroach", cluster_id=cluster_id) + ``` + + ## Import + + format: + + ```sh + $ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -84,7 +108,26 @@ def __init__(__self__, args: PrivateEndpointServicesArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - PrivateEndpointServices contains services that allow for VPC communication, either via PrivateLink (AWS) or Peering (GCP). + PrivateEndpointServices contains services that allow for private connectivity to the CockroachDB Cloud cluster. + + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + cockroach = cockroach.PrivateEndpointServices("cockroach", cluster_id=cluster_id) + ``` + + ## Import + + format: + + ```sh + $ pulumi import cockroach:index/privateEndpointServices:PrivateEndpointServices resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + ``` :param str resource_name: The name of the resource. :param PrivateEndpointServicesArgs args: The arguments to use to populate this resource's properties. diff --git a/sdk/python/pulumiverse_cockroach/private_endpoint_trusted_owner.py b/sdk/python/pulumiverse_cockroach/private_endpoint_trusted_owner.py index a664eb4..ec44945 100644 --- a/sdk/python/pulumiverse_cockroach/private_endpoint_trusted_owner.py +++ b/sdk/python/pulumiverse_cockroach/private_endpoint_trusted_owner.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['PrivateEndpointTrustedOwnerArgs', 'PrivateEndpointTrustedOwner'] @@ -148,6 +153,28 @@ def __init__(__self__, """ Private Endpoint Trusted Owner. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + example = cockroach.PrivateEndpointTrustedOwner("example", + cluster_id=cluster_id, + type="AWS_ACCOUNT_ID", + external_owner_id="012345678901") + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49 + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cluster_id: UUID of the cluster the private endpoint trusted owner entry belongs to. @@ -163,6 +190,28 @@ def __init__(__self__, """ Private Endpoint Trusted Owner. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + example = cockroach.PrivateEndpointTrustedOwner("example", + cluster_id=cluster_id, + type="AWS_ACCOUNT_ID", + external_owner_id="012345678901") + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/privateEndpointTrustedOwner:PrivateEndpointTrustedOwner resource_name 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:e50aa10d-1a16-4be8-85e6-4c18221daa49 + ``` + :param str resource_name: The name of the resource. :param PrivateEndpointTrustedOwnerArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/provider.py b/sdk/python/pulumiverse_cockroach/provider.py index 0e5117d..e20eda1 100644 --- a/sdk/python/pulumiverse_cockroach/provider.py +++ b/sdk/python/pulumiverse_cockroach/provider.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['ProviderArgs', 'Provider'] diff --git a/sdk/python/pulumiverse_cockroach/sql_user.py b/sdk/python/pulumiverse_cockroach/sql_user.py index 6275f63..187959d 100644 --- a/sdk/python/pulumiverse_cockroach/sql_user.py +++ b/sdk/python/pulumiverse_cockroach/sql_user.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['SqlUserArgs', 'SqlUser'] @@ -117,6 +122,29 @@ def __init__(__self__, """ CockroachDB SQL user. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + sql_user_password = config.require("sqlUserPassword") + cockroach = cockroach.SqlUser("cockroach", + name="example-sql-user", + password=sql_user_password, + cluster_id=cluster_id) + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] name: SQL user name. @@ -130,6 +158,29 @@ def __init__(__self__, """ CockroachDB SQL user. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + sql_user_password = config.require("sqlUserPassword") + cockroach = cockroach.SqlUser("cockroach", + name="example-sql-user", + password=sql_user_password, + cluster_id=cluster_id) + ``` + + ## Import + + format: : + + ```sh + $ pulumi import cockroach:index/sqlUser:SqlUser bill 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:bill + ``` + :param str resource_name: The name of the resource. :param SqlUserArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. diff --git a/sdk/python/pulumiverse_cockroach/user_role_grant.py b/sdk/python/pulumiverse_cockroach/user_role_grant.py new file mode 100644 index 0000000..d6cd6de --- /dev/null +++ b/sdk/python/pulumiverse_cockroach/user_role_grant.py @@ -0,0 +1,220 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['UserRoleGrantArgs', 'UserRoleGrant'] + +@pulumi.input_type +class UserRoleGrantArgs: + def __init__(__self__, *, + role: pulumi.Input['UserRoleGrantRoleArgs'], + user_id: pulumi.Input[str]): + """ + The set of arguments for constructing a UserRoleGrant resource. + :param pulumi.Input[str] user_id: ID of the user to grant these roles to. + """ + pulumi.set(__self__, "role", role) + pulumi.set(__self__, "user_id", user_id) + + @property + @pulumi.getter + def role(self) -> pulumi.Input['UserRoleGrantRoleArgs']: + return pulumi.get(self, "role") + + @role.setter + def role(self, value: pulumi.Input['UserRoleGrantRoleArgs']): + pulumi.set(self, "role", value) + + @property + @pulumi.getter(name="userId") + def user_id(self) -> pulumi.Input[str]: + """ + ID of the user to grant these roles to. + """ + return pulumi.get(self, "user_id") + + @user_id.setter + def user_id(self, value: pulumi.Input[str]): + pulumi.set(self, "user_id", value) + + +@pulumi.input_type +class _UserRoleGrantState: + def __init__(__self__, *, + role: Optional[pulumi.Input['UserRoleGrantRoleArgs']] = None, + user_id: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering UserRoleGrant resources. + :param pulumi.Input[str] user_id: ID of the user to grant these roles to. + """ + if role is not None: + pulumi.set(__self__, "role", role) + if user_id is not None: + pulumi.set(__self__, "user_id", user_id) + + @property + @pulumi.getter + def role(self) -> Optional[pulumi.Input['UserRoleGrantRoleArgs']]: + return pulumi.get(self, "role") + + @role.setter + def role(self, value: Optional[pulumi.Input['UserRoleGrantRoleArgs']]): + pulumi.set(self, "role", value) + + @property + @pulumi.getter(name="userId") + def user_id(self) -> Optional[pulumi.Input[str]]: + """ + ID of the user to grant these roles to. + """ + return pulumi.get(self, "user_id") + + @user_id.setter + def user_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "user_id", value) + + +class UserRoleGrant(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + role: Optional[pulumi.Input[Union['UserRoleGrantRoleArgs', 'UserRoleGrantRoleArgsDict']]] = None, + user_id: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + ## Example Usage + + ## Import + + Cluster and folder level role grants can be imported using: + + ,,, + + ```sh + $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831 + ``` + + Organization level grants can omit the resource_id + + ```sh + $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] user_id: ID of the user to grant these roles to. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: UserRoleGrantArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## Example Usage + + ## Import + + Cluster and folder level role grants can be imported using: + + ,,, + + ```sh + $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant admin_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,CLUSTER_ADMIN,CLUSTER,9b9d23fe-3848-40b2-a3c5-d8ccb1c4f831 + ``` + + Organization level grants can omit the resource_id + + ```sh + $ pulumi import cockroach:index/userRoleGrant:UserRoleGrant org_level_grant 1f69fdd2-600a-4cfc-a9ba-16995df0d77d,ORG_ADMIN,ORGANIZATION + ``` + + :param str resource_name: The name of the resource. + :param UserRoleGrantArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(UserRoleGrantArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + role: Optional[pulumi.Input[Union['UserRoleGrantRoleArgs', 'UserRoleGrantRoleArgsDict']]] = None, + user_id: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = UserRoleGrantArgs.__new__(UserRoleGrantArgs) + + if role is None and not opts.urn: + raise TypeError("Missing required property 'role'") + __props__.__dict__["role"] = role + if user_id is None and not opts.urn: + raise TypeError("Missing required property 'user_id'") + __props__.__dict__["user_id"] = user_id + super(UserRoleGrant, __self__).__init__( + 'cockroach:index/userRoleGrant:UserRoleGrant', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + role: Optional[pulumi.Input[Union['UserRoleGrantRoleArgs', 'UserRoleGrantRoleArgsDict']]] = None, + user_id: Optional[pulumi.Input[str]] = None) -> 'UserRoleGrant': + """ + Get an existing UserRoleGrant resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] user_id: ID of the user to grant these roles to. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _UserRoleGrantState.__new__(_UserRoleGrantState) + + __props__.__dict__["role"] = role + __props__.__dict__["user_id"] = user_id + return UserRoleGrant(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def role(self) -> pulumi.Output['outputs.UserRoleGrantRole']: + return pulumi.get(self, "role") + + @property + @pulumi.getter(name="userId") + def user_id(self) -> pulumi.Output[str]: + """ + ID of the user to grant these roles to. + """ + return pulumi.get(self, "user_id") + diff --git a/sdk/python/pulumiverse_cockroach/user_role_grants.py b/sdk/python/pulumiverse_cockroach/user_role_grants.py index 06687b2..b9e902c 100644 --- a/sdk/python/pulumiverse_cockroach/user_role_grants.py +++ b/sdk/python/pulumiverse_cockroach/user_role_grants.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities from . import outputs from ._inputs import * @@ -92,7 +97,15 @@ def __init__(__self__, user_id: Optional[pulumi.Input[str]] = None, __props__=None): """ - Role grants for a single user. + ## Example Usage + + ## Import + + format: + + ```sh + $ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. @@ -105,7 +118,15 @@ def __init__(__self__, args: UserRoleGrantsArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - Role grants for a single user. + ## Example Usage + + ## Import + + format: + + ```sh + $ pulumi import cockroach:index/userRoleGrants:UserRoleGrants service_account 1f69fdd2-600a-4cfc-a9ba-16995df0d77d + ``` :param str resource_name: The name of the resource. :param UserRoleGrantsArgs args: The arguments to use to populate this resource's properties. diff --git a/sdk/python/pulumiverse_cockroach/version_deferral.py b/sdk/python/pulumiverse_cockroach/version_deferral.py index ddc304e..fea614c 100644 --- a/sdk/python/pulumiverse_cockroach/version_deferral.py +++ b/sdk/python/pulumiverse_cockroach/version_deferral.py @@ -4,9 +4,14 @@ import copy import warnings +import sys import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias from . import _utilities __all__ = ['VersionDeferralArgs', 'VersionDeferral'] @@ -14,13 +19,28 @@ @pulumi.input_type class VersionDeferralArgs: def __init__(__self__, *, + cluster_id: pulumi.Input[str], deferral_policy: pulumi.Input[str]): """ The set of arguments for constructing a VersionDeferral resource. + :param pulumi.Input[str] cluster_id: Cluster ID. :param pulumi.Input[str] deferral_policy: The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. """ + pulumi.set(__self__, "cluster_id", cluster_id) pulumi.set(__self__, "deferral_policy", deferral_policy) + @property + @pulumi.getter(name="clusterId") + def cluster_id(self) -> pulumi.Input[str]: + """ + Cluster ID. + """ + return pulumi.get(self, "cluster_id") + + @cluster_id.setter + def cluster_id(self, value: pulumi.Input[str]): + pulumi.set(self, "cluster_id", value) + @property @pulumi.getter(name="deferralPolicy") def deferral_policy(self) -> pulumi.Input[str]: @@ -37,14 +57,30 @@ def deferral_policy(self, value: pulumi.Input[str]): @pulumi.input_type class _VersionDeferralState: def __init__(__self__, *, + cluster_id: Optional[pulumi.Input[str]] = None, deferral_policy: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering VersionDeferral resources. + :param pulumi.Input[str] cluster_id: Cluster ID. :param pulumi.Input[str] deferral_policy: The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. """ + if cluster_id is not None: + pulumi.set(__self__, "cluster_id", cluster_id) if deferral_policy is not None: pulumi.set(__self__, "deferral_policy", deferral_policy) + @property + @pulumi.getter(name="clusterId") + def cluster_id(self) -> Optional[pulumi.Input[str]]: + """ + Cluster ID. + """ + return pulumi.get(self, "cluster_id") + + @cluster_id.setter + def cluster_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "cluster_id", value) + @property @pulumi.getter(name="deferralPolicy") def deferral_policy(self) -> Optional[pulumi.Input[str]]: @@ -63,13 +99,31 @@ class VersionDeferral(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + cluster_id: Optional[pulumi.Input[str]] = None, deferral_policy: Optional[pulumi.Input[str]] = None, __props__=None): """ Configure minor version upgrade deferral for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + offset_duration = config.get("offsetDuration") + if offset_duration is None: + offset_duration = "FIXED_DEFERRAL" + example = cockroach.VersionDeferral("example", + cluster_id=cluster_id, + deferral_policy=offset_duration) + ``` + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] cluster_id: Cluster ID. :param pulumi.Input[str] deferral_policy: The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. """ ... @@ -81,6 +135,22 @@ def __init__(__self__, """ Configure minor version upgrade deferral for a cluster. + ## Example Usage + + ```python + import pulumi + import pulumiverse_cockroach as cockroach + + config = pulumi.Config() + cluster_id = config.require("clusterId") + offset_duration = config.get("offsetDuration") + if offset_duration is None: + offset_duration = "FIXED_DEFERRAL" + example = cockroach.VersionDeferral("example", + cluster_id=cluster_id, + deferral_policy=offset_duration) + ``` + :param str resource_name: The name of the resource. :param VersionDeferralArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -96,6 +166,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + cluster_id: Optional[pulumi.Input[str]] = None, deferral_policy: Optional[pulumi.Input[str]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) @@ -106,6 +177,9 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = VersionDeferralArgs.__new__(VersionDeferralArgs) + if cluster_id is None and not opts.urn: + raise TypeError("Missing required property 'cluster_id'") + __props__.__dict__["cluster_id"] = cluster_id if deferral_policy is None and not opts.urn: raise TypeError("Missing required property 'deferral_policy'") __props__.__dict__["deferral_policy"] = deferral_policy @@ -119,6 +193,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + cluster_id: Optional[pulumi.Input[str]] = None, deferral_policy: Optional[pulumi.Input[str]] = None) -> 'VersionDeferral': """ Get an existing VersionDeferral resource's state with the given name, id, and optional extra @@ -127,15 +202,25 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] cluster_id: Cluster ID. :param pulumi.Input[str] deferral_policy: The policy for managing automated minor version upgrades. Set to FIXED*DEFERRAL to defer upgrades by 60 days or NOT*DEFERRED to apply upgrades immediately. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _VersionDeferralState.__new__(_VersionDeferralState) + __props__.__dict__["cluster_id"] = cluster_id __props__.__dict__["deferral_policy"] = deferral_policy return VersionDeferral(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter(name="clusterId") + def cluster_id(self) -> pulumi.Output[str]: + """ + Cluster ID. + """ + return pulumi.get(self, "cluster_id") + @property @pulumi.getter(name="deferralPolicy") def deferral_policy(self) -> pulumi.Output[str]: diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index cc971fc..cc6cede 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "pulumiverse_cockroach" description = "A Pulumi package to create and managed Cockroach DB resources in Pulumi programs." - dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"] + dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1", "typing-extensions>=4.11; python_version < \"3.11\""] keywords = ["pulumi", "cockroach", "pulumiverse"] readme = "README.md" requires-python = ">=3.8"