Skip to content

Commit

Permalink
make tfgen
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Mar 3, 2024
1 parent f26a05c commit 2fc7da6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion provider/cmd/pulumi-resource-postgresql/schema.json
Expand Up @@ -1352,7 +1352,7 @@
}
},
"postgresql:index/grantRole:GrantRole": {
"description": "The ``postgresql.GrantRole`` resource creates and manages membership in a role to one or more other roles in a non-authoritative way.\n\nWhen using ``postgresql.GrantRole`` resource it is likely because the PostgreSQL role you are modifying was created outside of this provider.\n\n\u003e **Note:** This resource needs PostgreSQL version 9 or above.\n\n## Usage\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst grantRoot = new postgresql.GrantRole(\"grantRoot\", {\n grantRole: \"application\",\n role: \"root\",\n withAdminOption: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\ngrant_root = postgresql.GrantRole(\"grantRoot\",\n grant_role=\"application\",\n role=\"root\",\n with_admin_option=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var grantRoot = new PostgreSql.GrantRole(\"grantRoot\", new()\n {\n GrantRoleName = \"application\",\n Role = \"root\",\n WithAdminOption = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := postgresql.NewGrantRole(ctx, \"grantRoot\", \u0026postgresql.GrantRoleArgs{\n\t\t\tGrantRole: pulumi.String(\"application\"),\n\t\t\tRole: pulumi.String(\"root\"),\n\t\t\tWithAdminOption: pulumi.Bool(true),\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.postgresql.GrantRole;\nimport com.pulumi.postgresql.GrantRoleArgs;\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 grantRoot = new GrantRole(\"grantRoot\", GrantRoleArgs.builder() \n .grantRole(\"application\")\n .role(\"root\")\n .withAdminOption(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n grantRoot:\n type: postgresql:GrantRole\n properties:\n grantRole: application\n role: root\n withAdminOption: true\n```\n\n\u003e **Note:** If you use `postgresql.GrantRole` for a role that you also manage with a `postgresql.Role` resource, you need to ignore the changes of the `roles` attribute in the `postgresql.Role` resource or they will fight over what your role grants should be. e.g.:\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.postgresql.Role;\nimport com.pulumi.postgresql.RoleArgs;\nimport com.pulumi.postgresql.GrantRole;\nimport com.pulumi.postgresql.GrantRoleArgs;\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 bob = new Role(\"bob\", RoleArgs.builder() \n .role(\"bob\")\n .build());\n\n var bobAdmin = new GrantRole(\"bobAdmin\", GrantRoleArgs.builder() \n .role(\"bob\")\n .grantRole(\"admin\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bob:\n type: postgresql:Role\n properties:\n role: bob\n bobAdmin:\n type: postgresql:GrantRole\n properties:\n role: bob\n grantRole: admin\n```\n",
"description": "The ``postgresql.GrantRole`` resource creates and manages membership in a role to one or more other roles in a non-authoritative way.\n\nWhen using ``postgresql.GrantRole`` resource it is likely because the PostgreSQL role you are modifying was created outside of this provider.\n\n\u003e **Note:** This resource needs PostgreSQL version 9 or above.\n\n## Usage\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst grantRoot = new postgresql.GrantRole(\"grantRoot\", {\n grantRole: \"application\",\n role: \"root\",\n withAdminOption: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\ngrant_root = postgresql.GrantRole(\"grantRoot\",\n grant_role=\"application\",\n role=\"root\",\n with_admin_option=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var grantRoot = new PostgreSql.GrantRole(\"grantRoot\", new()\n {\n GrantRoleName = \"application\",\n Role = \"root\",\n WithAdminOption = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := postgresql.NewGrantRole(ctx, \"grantRoot\", \u0026postgresql.GrantRoleArgs{\n\t\t\tGrantRole: pulumi.String(\"application\"),\n\t\t\tRole: pulumi.String(\"root\"),\n\t\t\tWithAdminOption: pulumi.Bool(true),\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.postgresql.GrantRole;\nimport com.pulumi.postgresql.GrantRoleArgs;\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 grantRoot = new GrantRole(\"grantRoot\", GrantRoleArgs.builder() \n .grantRole(\"application\")\n .role(\"root\")\n .withAdminOption(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n grantRoot:\n type: postgresql:GrantRole\n properties:\n grantRole: application\n role: root\n withAdminOption: true\n```\n\n\u003e **Note:** If you use `postgresql.GrantRole` for a role that you also manage with a `postgresql.Role` resource, you need to ignore the changes of the `roles` attribute in the `postgresql.Role` resource or they will fight over what your role grants should be. e.g.:\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as postgresql from \"@pulumi/postgresql\";\n\nconst bob = new postgresql.Role(\"bob\", {});\nconst bobAdmin = new postgresql.GrantRole(\"bobAdmin\", {\n role: \"bob\",\n grantRole: \"admin\",\n});\n```\n```python\nimport pulumi\nimport pulumi_postgresql as postgresql\n\nbob = postgresql.Role(\"bob\")\nbob_admin = postgresql.GrantRole(\"bobAdmin\",\n role=\"bob\",\n grant_role=\"admin\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing PostgreSql = Pulumi.PostgreSql;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var bob = new PostgreSql.Role(\"bob\");\n\n var bobAdmin = new PostgreSql.GrantRole(\"bobAdmin\", new()\n {\n Role = \"bob\",\n GrantRoleName = \"admin\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-postgresql/sdk/v3/go/postgresql\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := postgresql.NewRole(ctx, \"bob\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = postgresql.NewGrantRole(ctx, \"bobAdmin\", \u0026postgresql.GrantRoleArgs{\n\t\t\tRole: pulumi.String(\"bob\"),\n\t\t\tGrantRole: pulumi.String(\"admin\"),\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.postgresql.Role;\nimport com.pulumi.postgresql.GrantRole;\nimport com.pulumi.postgresql.GrantRoleArgs;\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 bob = new Role(\"bob\");\n\n var bobAdmin = new GrantRole(\"bobAdmin\", GrantRoleArgs.builder() \n .role(\"bob\")\n .grantRole(\"admin\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n bob:\n type: postgresql:Role\n bobAdmin:\n type: postgresql:GrantRole\n properties:\n role: bob\n grantRole: admin\n```\n",
"properties": {
"grantRole": {
"type": "string",
Expand Down

0 comments on commit 2fc7da6

Please sign in to comment.