diff --git a/provider/cmd/pulumi-resource-github/bridge-metadata.json b/provider/cmd/pulumi-resource-github/bridge-metadata.json index 28c34d31..108bccc5 100644 --- a/provider/cmd/pulumi-resource-github/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-github/bridge-metadata.json @@ -988,6 +988,9 @@ } } }, + "github_user_external_identity": { + "current": "github:index/getUserExternalIdentity:getUserExternalIdentity" + }, "github_users": { "current": "github:index/getUsers:getUsers", "fields": { @@ -1135,6 +1138,7 @@ "github:index/getTeam:getTeam": "github_team", "github:index/getTree:getTree": "github_tree", "github:index/getUser:getUser": "github_user", + "github:index/getUserExternalIdentity:getUserExternalIdentity": "github_user_external_identity", "github:index/getUsers:getUsers": "github_users" }, "renamedProperties": { @@ -1706,6 +1710,10 @@ "suspendedAt": "suspended_at", "updatedAt": "updated_at" }, + "github:index/getUserExternalIdentity:getUserExternalIdentity": { + "samlIdentity": "saml_identity", + "scimIdentity": "scim_identity" + }, "github:index/getUsers:getUsers": { "nodeIds": "node_ids", "unknownLogins": "unknown_logins" diff --git a/provider/cmd/pulumi-resource-github/schema.json b/provider/cmd/pulumi-resource-github/schema.json index eafe8f96..249f39a2 100644 --- a/provider/cmd/pulumi-resource-github/schema.json +++ b/provider/cmd/pulumi-resource-github/schema.json @@ -14,19 +14,19 @@ }, "language": { "csharp": { - "compatibility": "tfbridge20", - "namespaces": null, "packageReferences": { "Pulumi": "3.*" - } + }, + "compatibility": "tfbridge20" }, "go": { - "generateExtraInputTypes": true, + "importBasePath": "github.com/pulumi/pulumi-github/sdk/v5/go/github", "generateResourceContainerTypes": true, - "importBasePath": "github.com/pulumi/pulumi-github/sdk/v5/go/github" + "generateExtraInputTypes": true }, "nodejs": { - "compatibility": "tfbridge20", + "packageDescription": "A Pulumi package for creating and managing github cloud resources.", + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/integrations/terraform-provider-github)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-github` repo](https://github.com/pulumi/pulumi-github/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-github` repo](https://github.com/integrations/terraform-provider-github/issues).", "dependencies": { "@pulumi/pulumi": "^3.0.0" }, @@ -34,20 +34,16 @@ "@types/mime": "^2.0.0", "@types/node": "^10.0.0" }, - "disableUnionOutputTypes": true, - "packageDescription": "A Pulumi package for creating and managing github cloud resources.", - "packageName": "", - "pluginName": "", - "pluginVersion": "", - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/integrations/terraform-provider-github)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-github` repo](https://github.com/pulumi/pulumi-github/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-github` repo](https://github.com/integrations/terraform-provider-github/issues).", - "typescriptVersion": "" + "compatibility": "tfbridge20", + "disableUnionOutputTypes": true }, "python": { - "compatibility": "tfbridge20", - "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/integrations/terraform-provider-github)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-github` repo](https://github.com/pulumi/pulumi-github/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-github` repo](https://github.com/integrations/terraform-provider-github/issues).", "requires": { "pulumi": "\u003e=3.0.0,\u003c4.0.0" - } + }, + "readme": "\u003e This provider is a derived work of the [Terraform Provider](https://github.com/integrations/terraform-provider-github)\n\u003e distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/). If you encounter a bug or missing feature,\n\u003e first check the [`pulumi-github` repo](https://github.com/pulumi/pulumi-github/issues); however, if that doesn't turn up anything,\n\u003e please consult the source [`terraform-provider-github` repo](https://github.com/integrations/terraform-provider-github/issues).", + "compatibility": "tfbridge20", + "pyproject": {} } }, "config": { @@ -6540,11 +6536,11 @@ } }, "github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy": { - "description": "This resource allows you to create and manage deployment branch policies.\n\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst env = new github.RepositoryEnvironment(\"env\", {\n deploymentBranchPolicy: {\n customBranchPolicies: true,\n protectedBranches: false,\n },\n environment: \"my_env\",\n repository: \"my_repo\",\n});\nconst foo = new github.RepositoryDeploymentBranchPolicy(\"foo\", {\n environmentName: \"my_env\",\n repository: \"my_repo\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nenv = github.RepositoryEnvironment(\"env\",\n deployment_branch_policy=github.RepositoryEnvironmentDeploymentBranchPolicyArgs(\n custom_branch_policies=True,\n protected_branches=False,\n ),\n environment=\"my_env\",\n repository=\"my_repo\")\nfoo = github.RepositoryDeploymentBranchPolicy(\"foo\",\n environment_name=\"my_env\",\n repository=\"my_repo\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var env = new Github.RepositoryEnvironment(\"env\", new()\n {\n DeploymentBranchPolicy = new Github.Inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs\n {\n CustomBranchPolicies = true,\n ProtectedBranches = false,\n },\n Environment = \"my_env\",\n Repository = \"my_repo\",\n });\n\n var foo = new Github.RepositoryDeploymentBranchPolicy(\"foo\", new()\n {\n EnvironmentName = \"my_env\",\n Repository = \"my_repo\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\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 := github.NewRepositoryEnvironment(ctx, \"env\", \u0026github.RepositoryEnvironmentArgs{\n\t\t\tDeploymentBranchPolicy: \u0026github.RepositoryEnvironmentDeploymentBranchPolicyArgs{\n\t\t\t\tCustomBranchPolicies: pulumi.Bool(true),\n\t\t\t\tProtectedBranches: pulumi.Bool(false),\n\t\t\t},\n\t\t\tEnvironment: pulumi.String(\"my_env\"),\n\t\t\tRepository: pulumi.String(\"my_repo\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryDeploymentBranchPolicy(ctx, \"foo\", \u0026github.RepositoryDeploymentBranchPolicyArgs{\n\t\t\tEnvironmentName: pulumi.String(\"my_env\"),\n\t\t\tRepository: pulumi.String(\"my_repo\"),\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.github.RepositoryEnvironment;\nimport com.pulumi.github.RepositoryEnvironmentArgs;\nimport com.pulumi.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs;\nimport com.pulumi.github.RepositoryDeploymentBranchPolicy;\nimport com.pulumi.github.RepositoryDeploymentBranchPolicyArgs;\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 env = new RepositoryEnvironment(\"env\", RepositoryEnvironmentArgs.builder() \n .deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs.builder()\n .customBranchPolicies(true)\n .protectedBranches(false)\n .build())\n .environment(\"my_env\")\n .repository(\"my_repo\")\n .build());\n\n var foo = new RepositoryDeploymentBranchPolicy(\"foo\", RepositoryDeploymentBranchPolicyArgs.builder() \n .environmentName(\"my_env\")\n .repository(\"my_repo\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n env:\n type: github:RepositoryEnvironment\n properties:\n deploymentBranchPolicy:\n customBranchPolicies: true\n protectedBranches: false\n environment: my_env\n repository: my_repo\n foo:\n type: github:RepositoryDeploymentBranchPolicy\n properties:\n environmentName: my_env\n repository: my_repo\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n\n\n```sh\n $ pulumi import github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy foo repo:env:id\n```\n\n ", + "description": "This resource allows you to create and manage deployment branch policies.\n\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst env = new github.RepositoryEnvironment(\"env\", {\n repository: \"my_repo\",\n environment: \"my_env\",\n deploymentBranchPolicy: {\n protectedBranches: false,\n customBranchPolicies: true,\n },\n});\nconst foo = new github.RepositoryDeploymentBranchPolicy(\"foo\", {\n repository: \"my_repo\",\n environmentName: \"my_env\",\n}, {\n dependsOn: [env],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nenv = github.RepositoryEnvironment(\"env\",\n repository=\"my_repo\",\n environment=\"my_env\",\n deployment_branch_policy=github.RepositoryEnvironmentDeploymentBranchPolicyArgs(\n protected_branches=False,\n custom_branch_policies=True,\n ))\nfoo = github.RepositoryDeploymentBranchPolicy(\"foo\",\n repository=\"my_repo\",\n environment_name=\"my_env\",\n opts=pulumi.ResourceOptions(depends_on=[env]))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var env = new Github.RepositoryEnvironment(\"env\", new()\n {\n Repository = \"my_repo\",\n Environment = \"my_env\",\n DeploymentBranchPolicy = new Github.Inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs\n {\n ProtectedBranches = false,\n CustomBranchPolicies = true,\n },\n });\n\n var foo = new Github.RepositoryDeploymentBranchPolicy(\"foo\", new()\n {\n Repository = \"my_repo\",\n EnvironmentName = \"my_env\",\n }, new CustomResourceOptions\n {\n DependsOn = new[]\n {\n env,\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tenv, err := github.NewRepositoryEnvironment(ctx, \"env\", \u0026github.RepositoryEnvironmentArgs{\n\t\t\tRepository: pulumi.String(\"my_repo\"),\n\t\t\tEnvironment: pulumi.String(\"my_env\"),\n\t\t\tDeploymentBranchPolicy: \u0026github.RepositoryEnvironmentDeploymentBranchPolicyArgs{\n\t\t\t\tProtectedBranches: pulumi.Bool(false),\n\t\t\t\tCustomBranchPolicies: pulumi.Bool(true),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewRepositoryDeploymentBranchPolicy(ctx, \"foo\", \u0026github.RepositoryDeploymentBranchPolicyArgs{\n\t\t\tRepository: pulumi.String(\"my_repo\"),\n\t\t\tEnvironmentName: pulumi.String(\"my_env\"),\n\t\t}, pulumi.DependsOn([]pulumi.Resource{\n\t\t\tenv,\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.github.RepositoryEnvironment;\nimport com.pulumi.github.RepositoryEnvironmentArgs;\nimport com.pulumi.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs;\nimport com.pulumi.github.RepositoryDeploymentBranchPolicy;\nimport com.pulumi.github.RepositoryDeploymentBranchPolicyArgs;\nimport com.pulumi.resources.CustomResourceOptions;\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 env = new RepositoryEnvironment(\"env\", RepositoryEnvironmentArgs.builder() \n .repository(\"my_repo\")\n .environment(\"my_env\")\n .deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs.builder()\n .protectedBranches(false)\n .customBranchPolicies(true)\n .build())\n .build());\n\n var foo = new RepositoryDeploymentBranchPolicy(\"foo\", RepositoryDeploymentBranchPolicyArgs.builder() \n .repository(\"my_repo\")\n .environmentName(\"my_env\")\n .build(), CustomResourceOptions.builder()\n .dependsOn(env)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n env:\n type: github:RepositoryEnvironment\n properties:\n repository: my_repo\n environment: my_env\n deploymentBranchPolicy:\n protectedBranches: false\n customBranchPolicies: true\n foo:\n type: github:RepositoryDeploymentBranchPolicy\n properties:\n repository: my_repo\n environmentName: my_env\n options:\n dependson:\n - ${env}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n\n\n```sh\n $ pulumi import github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy foo repo:env:id\n```\n\n ", "properties": { "environmentName": { "type": "string", - "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true.\n" + "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.\n" }, "etag": { "type": "string", @@ -6568,7 +6564,7 @@ "inputProperties": { "environmentName": { "type": "string", - "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true.\n", + "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.\n", "willReplaceOnChanges": true }, "name": { @@ -6590,7 +6586,7 @@ "properties": { "environmentName": { "type": "string", - "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true.\n", + "description": "The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown.\n", "willReplaceOnChanges": true }, "etag": { @@ -7604,9 +7600,6 @@ "github:index/teamMembers:TeamMembers": { "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\n// Add a user to the organization\nconst membershipForSomeUser = new github.Membership(\"membershipForSomeUser\", {\n username: \"SomeUser\",\n role: \"member\",\n});\nconst membershipForAnotherUser = new github.Membership(\"membershipForAnotherUser\", {\n username: \"AnotherUser\",\n role: \"member\",\n});\nconst someTeam = new github.Team(\"someTeam\", {description: \"Some cool team\"});\nconst someTeamMembers = new github.TeamMembers(\"someTeamMembers\", {\n teamId: someTeam.id,\n members: [\n {\n username: \"SomeUser\",\n role: \"maintainer\",\n },\n {\n username: \"AnotherUser\",\n role: \"member\",\n },\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\n# Add a user to the organization\nmembership_for_some_user = github.Membership(\"membershipForSomeUser\",\n username=\"SomeUser\",\n role=\"member\")\nmembership_for_another_user = github.Membership(\"membershipForAnotherUser\",\n username=\"AnotherUser\",\n role=\"member\")\nsome_team = github.Team(\"someTeam\", description=\"Some cool team\")\nsome_team_members = github.TeamMembers(\"someTeamMembers\",\n team_id=some_team.id,\n members=[\n github.TeamMembersMemberArgs(\n username=\"SomeUser\",\n role=\"maintainer\",\n ),\n github.TeamMembersMemberArgs(\n username=\"AnotherUser\",\n role=\"member\",\n ),\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Add a user to the organization\n var membershipForSomeUser = new Github.Membership(\"membershipForSomeUser\", new()\n {\n Username = \"SomeUser\",\n Role = \"member\",\n });\n\n var membershipForAnotherUser = new Github.Membership(\"membershipForAnotherUser\", new()\n {\n Username = \"AnotherUser\",\n Role = \"member\",\n });\n\n var someTeam = new Github.Team(\"someTeam\", new()\n {\n Description = \"Some cool team\",\n });\n\n var someTeamMembers = new Github.TeamMembers(\"someTeamMembers\", new()\n {\n TeamId = someTeam.Id,\n Members = new[]\n {\n new Github.Inputs.TeamMembersMemberArgs\n {\n Username = \"SomeUser\",\n Role = \"maintainer\",\n },\n new Github.Inputs.TeamMembersMemberArgs\n {\n Username = \"AnotherUser\",\n Role = \"member\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\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 := github.NewMembership(ctx, \"membershipForSomeUser\", \u0026github.MembershipArgs{\n\t\t\tUsername: pulumi.String(\"SomeUser\"),\n\t\t\tRole: pulumi.String(\"member\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewMembership(ctx, \"membershipForAnotherUser\", \u0026github.MembershipArgs{\n\t\t\tUsername: pulumi.String(\"AnotherUser\"),\n\t\t\tRole: pulumi.String(\"member\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tsomeTeam, err := github.NewTeam(ctx, \"someTeam\", \u0026github.TeamArgs{\n\t\t\tDescription: pulumi.String(\"Some cool team\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = github.NewTeamMembers(ctx, \"someTeamMembers\", \u0026github.TeamMembersArgs{\n\t\t\tTeamId: someTeam.ID(),\n\t\t\tMembers: github.TeamMembersMemberArray{\n\t\t\t\t\u0026github.TeamMembersMemberArgs{\n\t\t\t\t\tUsername: pulumi.String(\"SomeUser\"),\n\t\t\t\t\tRole: pulumi.String(\"maintainer\"),\n\t\t\t\t},\n\t\t\t\t\u0026github.TeamMembersMemberArgs{\n\t\t\t\t\tUsername: pulumi.String(\"AnotherUser\"),\n\t\t\t\t\tRole: pulumi.String(\"member\"),\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.github.Membership;\nimport com.pulumi.github.MembershipArgs;\nimport com.pulumi.github.Team;\nimport com.pulumi.github.TeamArgs;\nimport com.pulumi.github.TeamMembers;\nimport com.pulumi.github.TeamMembersArgs;\nimport com.pulumi.github.inputs.TeamMembersMemberArgs;\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 membershipForSomeUser = new Membership(\"membershipForSomeUser\", MembershipArgs.builder() \n .username(\"SomeUser\")\n .role(\"member\")\n .build());\n\n var membershipForAnotherUser = new Membership(\"membershipForAnotherUser\", MembershipArgs.builder() \n .username(\"AnotherUser\")\n .role(\"member\")\n .build());\n\n var someTeam = new Team(\"someTeam\", TeamArgs.builder() \n .description(\"Some cool team\")\n .build());\n\n var someTeamMembers = new TeamMembers(\"someTeamMembers\", TeamMembersArgs.builder() \n .teamId(someTeam.id())\n .members( \n TeamMembersMemberArgs.builder()\n .username(\"SomeUser\")\n .role(\"maintainer\")\n .build(),\n TeamMembersMemberArgs.builder()\n .username(\"AnotherUser\")\n .role(\"member\")\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Add a user to the organization\n membershipForSomeUser:\n type: github:Membership\n properties:\n username: SomeUser\n role: member\n membershipForAnotherUser:\n type: github:Membership\n properties:\n username: AnotherUser\n role: member\n someTeam:\n type: github:Team\n properties:\n description: Some cool team\n someTeamMembers:\n type: github:TeamMembers\n properties:\n teamId: ${someTeam.id}\n members:\n - username: SomeUser\n role: maintainer\n - username: AnotherUser\n role: member\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nGitHub Team Membership can be imported using the team ID `teamid` or team name, e.g.\n\n```sh\n $ pulumi import github:index/teamMembers:TeamMembers some_team 1234567\n```\n\n\n\n```sh\n $ pulumi import github:index/teamMembers:TeamMembers some_team Administrators\n```\n\n ", "properties": { - "etag": { - "type": "string" - }, "members": { "type": "array", "items": { @@ -7620,7 +7613,6 @@ } }, "required": [ - "etag", "members", "teamId" ], @@ -7645,9 +7637,6 @@ "stateInputs": { "description": "Input properties used for looking up and filtering TeamMembers resources.\n", "properties": { - "etag": { - "type": "string" - }, "members": { "type": "array", "items": { @@ -11357,6 +11346,61 @@ ] } }, + "github:index/getUserExternalIdentity:getUserExternalIdentity": { + "description": "Use this data source to retrieve a specific organization member's SAML or SCIM user\nattributes.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst exampleUser = github.getUserExternalIdentity({\n username: \"example-user\",\n});\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample_user = github.get_user_external_identity(username=\"example-user\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var exampleUser = Github.GetUserExternalIdentity.Invoke(new()\n {\n Username = \"example-user\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\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 := github.GetUserExternalIdentity(ctx, \u0026github.GetUserExternalIdentityArgs{\n\t\t\tUsername: \"example-user\",\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.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetUserExternalIdentityArgs;\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 exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder()\n .username(\"example-user\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n exampleUser:\n fn::invoke:\n Function: github:getUserExternalIdentity\n Arguments:\n username: example-user\n```\n{{% /example %}}\n{{% /examples %}}", + "inputs": { + "description": "A collection of arguments for invoking getUserExternalIdentity.\n", + "properties": { + "username": { + "type": "string", + "description": "The username of the member to fetch external identity for.\n" + } + }, + "type": "object", + "required": [ + "username" + ] + }, + "outputs": { + "description": "A collection of values returned by getUserExternalIdentity.\n", + "properties": { + "id": { + "type": "string", + "description": "The provider-assigned unique ID for this managed resource.\n" + }, + "login": { + "type": "string", + "description": "The username of the GitHub user\n" + }, + "samlIdentity": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "An Object containing the user's SAML data. This object will\nbe empty if the user is not managed by SAML.\n" + }, + "scimIdentity": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "An Object contining the user's SCIM data. This object will\nbe empty if the user is not managed by SCIM.\n" + }, + "username": { + "type": "string", + "description": "The member's SAML Username\n" + } + }, + "type": "object", + "required": [ + "login", + "samlIdentity", + "scimIdentity", + "username", + "id" + ] + } + }, "github:index/getUsers:getUsers": { "description": "Use this data source to retrieve information about multiple GitHub users at once.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as github from \"@pulumi/github\";\n\nconst example = github.getUsers({\n usernames: [\n \"example1\",\n \"example2\",\n \"example3\",\n ],\n});\nexport const validUsers = example.then(example =\u003e example.logins);\nexport const invalidUsers = example.then(example =\u003e example.unknownLogins);\n```\n```python\nimport pulumi\nimport pulumi_github as github\n\nexample = github.get_users(usernames=[\n \"example1\",\n \"example2\",\n \"example3\",\n])\npulumi.export(\"validUsers\", example.logins)\npulumi.export(\"invalidUsers\", example.unknown_logins)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Github = Pulumi.Github;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Github.GetUsers.Invoke(new()\n {\n Usernames = new[]\n {\n \"example1\",\n \"example2\",\n \"example3\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"validUsers\"] = example.Apply(getUsersResult =\u003e getUsersResult.Logins),\n [\"invalidUsers\"] = example.Apply(getUsersResult =\u003e getUsersResult.UnknownLogins),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-github/sdk/v5/go/github\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := github.GetUsers(ctx, \u0026github.GetUsersArgs{\n\t\t\tUsernames: []string{\n\t\t\t\t\"example1\",\n\t\t\t\t\"example2\",\n\t\t\t\t\"example3\",\n\t\t\t},\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"validUsers\", example.Logins)\n\t\tctx.Export(\"invalidUsers\", example.UnknownLogins)\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.github.GithubFunctions;\nimport com.pulumi.github.inputs.GetUsersArgs;\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 example = GithubFunctions.getUsers(GetUsersArgs.builder()\n .usernames( \n \"example1\",\n \"example2\",\n \"example3\")\n .build());\n\n ctx.export(\"validUsers\", example.applyValue(getUsersResult -\u003e getUsersResult.logins()));\n ctx.export(\"invalidUsers\", example.applyValue(getUsersResult -\u003e getUsersResult.unknownLogins()));\n }\n}\n```\n```yaml\nvariables:\n example:\n fn::invoke:\n Function: github:getUsers\n Arguments:\n usernames:\n - example1\n - example2\n - example3\noutputs:\n validUsers: ${example.logins}\n invalidUsers: ${example.unknownLogins}\n```\n{{% /example %}}\n{{% /examples %}}", "inputs": { diff --git a/provider/go.mod b/provider/go.mod index d1658bb4..9e56b1a7 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -4,9 +4,9 @@ go 1.20 require ( github.com/hashicorp/terraform-plugin-sdk v1.17.2 - github.com/integrations/terraform-provider-github/v5 v5.32.0 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.1 - github.com/pulumi/pulumi/sdk/v3 v3.75.0 + github.com/integrations/terraform-provider-github/v5 v5.33.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0 + github.com/pulumi/pulumi/sdk/v3 v3.76.1 ) require ( @@ -157,7 +157,7 @@ require ( github.com/pulumi/pulumi-java/pkg v0.9.4 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect github.com/pulumi/pulumi-yaml v1.1.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.75.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.76.1 // indirect github.com/pulumi/schema-tools v0.2.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -195,16 +195,16 @@ require ( go.uber.org/atomic v1.10.0 // indirect gocloud.dev v0.29.0 // indirect gocloud.dev/secrets/hashivault v0.29.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.12.0 // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.12.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.8.0 // indirect + golang.org/x/tools v0.9.3 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/provider/go.sum b/provider/go.sum index 5c645548..e267bf02 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1509,8 +1509,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/integrations/terraform-provider-github/v5 v5.32.0 h1:iTIvYUBCD6VY2VrRuAkYKkNyoe/8xUumCNpqSXakVQE= -github.com/integrations/terraform-provider-github/v5 v5.32.0/go.mod h1:/AVrTyiGce5ckAQ4FyixHmgcTeb7HoE2V5MEdixnMYk= +github.com/integrations/terraform-provider-github/v5 v5.33.0 h1:1/B2ElnKNR/pDkbOsKQeKI0o+OMGFw/+JzpDeiEZtuA= +github.com/integrations/terraform-provider-github/v5 v5.33.0/go.mod h1:DkgUnFC7jbcabYmdJ38ssuZDn9LlwDJKobokESYlDNc= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/ionos-cloud/sdk-go/v6 v6.1.3/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= @@ -1972,16 +1972,16 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/pulumi/pulumi-java/pkg v0.9.4 h1:gIQZmlUI1o9ye8CL2XFqtmAX6Lwr9uj/+HzjboiSmK4= github.com/pulumi/pulumi-java/pkg v0.9.4/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ= github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.1 h1:vTu0+el9A3AH9klQKdxloOCuvLONHZPDVFDC6cFor+g= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.54.1/go.mod h1:OgOp9PzeKBBqWRZ87VX+amwG8Jt1V1pI+/WZ5dGkYG8= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0 h1:munOxi56glme47MT8/wI29o9wrRBJrEQuwjAgm1zviI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.57.0/go.mod h1:ykaml8e6XS/yI9JOcNZ+6gLirs6EWTB0FmjbT+JyEdU= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w= github.com/pulumi/pulumi-yaml v1.1.1 h1:8pyBNIU8+ym0wYpjhsCqN+cutygfK1XbhY2YEeNfyXY= github.com/pulumi/pulumi-yaml v1.1.1/go.mod h1:GhpdS6rFpwqvUtKdA+fQy8P28iNvncng39IXh5q68vE= -github.com/pulumi/pulumi/pkg/v3 v3.75.0 h1:oBJ+Ft5VokKJGZHtX5ytyKenMCBH/d1+rsVL5MOGmHo= -github.com/pulumi/pulumi/pkg/v3 v3.75.0/go.mod h1:jzU1sKjOoDMFxxISb4hEK/C1mQsHVheYkWfZPLQRC9c= -github.com/pulumi/pulumi/sdk/v3 v3.75.0 h1:+5V5UOwgHKAaqSD8DKhuTU+RTObqkH3yp/p2EJQYYQk= -github.com/pulumi/pulumi/sdk/v3 v3.75.0/go.mod h1:HiE9Wf+DVrg8Em1D6bxRCdDMsNkj8//vLCST73xH2Hc= +github.com/pulumi/pulumi/pkg/v3 v3.76.1 h1:OdQHwI2oB8Q1Es13by63QhDqIdk7Kl4w39UTrX3M44Y= +github.com/pulumi/pulumi/pkg/v3 v3.76.1/go.mod h1:DnDxyPUhLJv334MdPIIGYD0V7i7fVb7j9AvYf18MI6w= +github.com/pulumi/pulumi/sdk/v3 v3.76.1 h1:ItfwcLvxAyX+Pl+BPgx+J5mhKF3/LWOMls/vneTXp9o= +github.com/pulumi/pulumi/sdk/v3 v3.76.1/go.mod h1:HiE9Wf+DVrg8Em1D6bxRCdDMsNkj8//vLCST73xH2Hc= github.com/pulumi/schema-tools v0.2.2 h1:KiH/OP/mFF5XjXcOtrPOZ2Z5Sjtb0mLAaHgjJMcjMi4= github.com/pulumi/schema-tools v0.2.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -2385,8 +2385,8 @@ golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4 golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2534,8 +2534,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2568,8 +2568,8 @@ golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= 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= @@ -2748,8 +2748,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2763,8 +2763,8 @@ golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2780,8 +2780,8 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.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.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2887,8 +2887,8 @@ golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= +golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/sdk/dotnet/GetUserExternalIdentity.cs b/sdk/dotnet/GetUserExternalIdentity.cs new file mode 100644 index 00000000..7d5e0be2 --- /dev/null +++ b/sdk/dotnet/GetUserExternalIdentity.cs @@ -0,0 +1,148 @@ +// *** 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; + +namespace Pulumi.Github +{ + public static class GetUserExternalIdentity + { + /// + /// Use this data source to retrieve a specific organization member's SAML or SCIM user + /// attributes. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleUser = Github.GetUserExternalIdentity.Invoke(new() + /// { + /// Username = "example-user", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Task InvokeAsync(GetUserExternalIdentityArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("github:index/getUserExternalIdentity:getUserExternalIdentity", args ?? new GetUserExternalIdentityArgs(), options.WithDefaults()); + + /// + /// Use this data source to retrieve a specific organization member's SAML or SCIM user + /// attributes. + /// + /// {{% examples %}} + /// ## Example Usage + /// {{% example %}} + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Github = Pulumi.Github; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var exampleUser = Github.GetUserExternalIdentity.Invoke(new() + /// { + /// Username = "example-user", + /// }); + /// + /// }); + /// ``` + /// {{% /example %}} + /// {{% /examples %}} + /// + public static Output Invoke(GetUserExternalIdentityInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("github:index/getUserExternalIdentity:getUserExternalIdentity", args ?? new GetUserExternalIdentityInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetUserExternalIdentityArgs : global::Pulumi.InvokeArgs + { + /// + /// The username of the member to fetch external identity for. + /// + [Input("username", required: true)] + public string Username { get; set; } = null!; + + public GetUserExternalIdentityArgs() + { + } + public static new GetUserExternalIdentityArgs Empty => new GetUserExternalIdentityArgs(); + } + + public sealed class GetUserExternalIdentityInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The username of the member to fetch external identity for. + /// + [Input("username", required: true)] + public Input Username { get; set; } = null!; + + public GetUserExternalIdentityInvokeArgs() + { + } + public static new GetUserExternalIdentityInvokeArgs Empty => new GetUserExternalIdentityInvokeArgs(); + } + + + [OutputType] + public sealed class GetUserExternalIdentityResult + { + /// + /// The provider-assigned unique ID for this managed resource. + /// + public readonly string Id; + /// + /// The username of the GitHub user + /// + public readonly string Login; + /// + /// An Object containing the user's SAML data. This object will + /// be empty if the user is not managed by SAML. + /// + public readonly ImmutableDictionary SamlIdentity; + /// + /// An Object contining the user's SCIM data. This object will + /// be empty if the user is not managed by SCIM. + /// + public readonly ImmutableDictionary ScimIdentity; + /// + /// The member's SAML Username + /// + public readonly string Username; + + [OutputConstructor] + private GetUserExternalIdentityResult( + string id, + + string login, + + ImmutableDictionary samlIdentity, + + ImmutableDictionary scimIdentity, + + string username) + { + Id = id; + Login = login; + SamlIdentity = samlIdentity; + ScimIdentity = scimIdentity; + Username = username; + } + } +} diff --git a/sdk/dotnet/RepositoryDeploymentBranchPolicy.cs b/sdk/dotnet/RepositoryDeploymentBranchPolicy.cs index 0e9c0f3c..b2a72800 100644 --- a/sdk/dotnet/RepositoryDeploymentBranchPolicy.cs +++ b/sdk/dotnet/RepositoryDeploymentBranchPolicy.cs @@ -24,19 +24,25 @@ namespace Pulumi.Github /// { /// var env = new Github.RepositoryEnvironment("env", new() /// { + /// Repository = "my_repo", + /// Environment = "my_env", /// DeploymentBranchPolicy = new Github.Inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs /// { - /// CustomBranchPolicies = true, /// ProtectedBranches = false, + /// CustomBranchPolicies = true, /// }, - /// Environment = "my_env", - /// Repository = "my_repo", /// }); /// /// var foo = new Github.RepositoryDeploymentBranchPolicy("foo", new() /// { - /// EnvironmentName = "my_env", /// Repository = "my_repo", + /// EnvironmentName = "my_env", + /// }, new CustomResourceOptions + /// { + /// DependsOn = new[] + /// { + /// env, + /// }, /// }); /// /// }); @@ -52,7 +58,7 @@ namespace Pulumi.Github public partial class RepositoryDeploymentBranchPolicy : global::Pulumi.CustomResource { /// - /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. /// [Output("environmentName")] public Output EnvironmentName { get; private set; } = null!; @@ -122,7 +128,7 @@ public static RepositoryDeploymentBranchPolicy Get(string name, Input id public sealed class RepositoryDeploymentBranchPolicyArgs : global::Pulumi.ResourceArgs { /// - /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. /// [Input("environmentName", required: true)] public Input EnvironmentName { get; set; } = null!; @@ -148,7 +154,7 @@ public RepositoryDeploymentBranchPolicyArgs() public sealed class RepositoryDeploymentBranchPolicyState : global::Pulumi.ResourceArgs { /// - /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + /// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. /// [Input("environmentName")] public Input? EnvironmentName { get; set; } diff --git a/sdk/dotnet/TeamMembers.cs b/sdk/dotnet/TeamMembers.cs index baf2553d..07da057e 100644 --- a/sdk/dotnet/TeamMembers.cs +++ b/sdk/dotnet/TeamMembers.cs @@ -74,9 +74,6 @@ namespace Pulumi.Github [GithubResourceType("github:index/teamMembers:TeamMembers")] public partial class TeamMembers : global::Pulumi.CustomResource { - [Output("etag")] - public Output Etag { get; private set; } = null!; - /// /// List of team members. See Members below for details. /// @@ -161,9 +158,6 @@ public TeamMembersArgs() public sealed class TeamMembersState : global::Pulumi.ResourceArgs { - [Input("etag")] - public Input? Etag { get; set; } - [Input("members")] private InputList? _members; diff --git a/sdk/go/github/getUserExternalIdentity.go b/sdk/go/github/getUserExternalIdentity.go new file mode 100644 index 00000000..6dd819f9 --- /dev/null +++ b/sdk/go/github/getUserExternalIdentity.go @@ -0,0 +1,141 @@ +// 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 github + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-github/sdk/v5/go/github/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// Use this data source to retrieve a specific organization member's SAML or SCIM user +// attributes. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-github/sdk/v5/go/github" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := github.GetUserExternalIdentity(ctx, &github.GetUserExternalIdentityArgs{ +// Username: "example-user", +// }, nil) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +func GetUserExternalIdentity(ctx *pulumi.Context, args *GetUserExternalIdentityArgs, opts ...pulumi.InvokeOption) (*GetUserExternalIdentityResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetUserExternalIdentityResult + err := ctx.Invoke("github:index/getUserExternalIdentity:getUserExternalIdentity", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getUserExternalIdentity. +type GetUserExternalIdentityArgs struct { + // The username of the member to fetch external identity for. + Username string `pulumi:"username"` +} + +// A collection of values returned by getUserExternalIdentity. +type GetUserExternalIdentityResult struct { + // The provider-assigned unique ID for this managed resource. + Id string `pulumi:"id"` + // The username of the GitHub user + Login string `pulumi:"login"` + // An Object containing the user's SAML data. This object will + // be empty if the user is not managed by SAML. + SamlIdentity map[string]string `pulumi:"samlIdentity"` + // An Object contining the user's SCIM data. This object will + // be empty if the user is not managed by SCIM. + ScimIdentity map[string]string `pulumi:"scimIdentity"` + // The member's SAML Username + Username string `pulumi:"username"` +} + +func GetUserExternalIdentityOutput(ctx *pulumi.Context, args GetUserExternalIdentityOutputArgs, opts ...pulumi.InvokeOption) GetUserExternalIdentityResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetUserExternalIdentityResult, error) { + args := v.(GetUserExternalIdentityArgs) + r, err := GetUserExternalIdentity(ctx, &args, opts...) + var s GetUserExternalIdentityResult + if r != nil { + s = *r + } + return s, err + }).(GetUserExternalIdentityResultOutput) +} + +// A collection of arguments for invoking getUserExternalIdentity. +type GetUserExternalIdentityOutputArgs struct { + // The username of the member to fetch external identity for. + Username pulumi.StringInput `pulumi:"username"` +} + +func (GetUserExternalIdentityOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetUserExternalIdentityArgs)(nil)).Elem() +} + +// A collection of values returned by getUserExternalIdentity. +type GetUserExternalIdentityResultOutput struct{ *pulumi.OutputState } + +func (GetUserExternalIdentityResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetUserExternalIdentityResult)(nil)).Elem() +} + +func (o GetUserExternalIdentityResultOutput) ToGetUserExternalIdentityResultOutput() GetUserExternalIdentityResultOutput { + return o +} + +func (o GetUserExternalIdentityResultOutput) ToGetUserExternalIdentityResultOutputWithContext(ctx context.Context) GetUserExternalIdentityResultOutput { + return o +} + +// The provider-assigned unique ID for this managed resource. +func (o GetUserExternalIdentityResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetUserExternalIdentityResult) string { return v.Id }).(pulumi.StringOutput) +} + +// The username of the GitHub user +func (o GetUserExternalIdentityResultOutput) Login() pulumi.StringOutput { + return o.ApplyT(func(v GetUserExternalIdentityResult) string { return v.Login }).(pulumi.StringOutput) +} + +// An Object containing the user's SAML data. This object will +// be empty if the user is not managed by SAML. +func (o GetUserExternalIdentityResultOutput) SamlIdentity() pulumi.StringMapOutput { + return o.ApplyT(func(v GetUserExternalIdentityResult) map[string]string { return v.SamlIdentity }).(pulumi.StringMapOutput) +} + +// An Object contining the user's SCIM data. This object will +// be empty if the user is not managed by SCIM. +func (o GetUserExternalIdentityResultOutput) ScimIdentity() pulumi.StringMapOutput { + return o.ApplyT(func(v GetUserExternalIdentityResult) map[string]string { return v.ScimIdentity }).(pulumi.StringMapOutput) +} + +// The member's SAML Username +func (o GetUserExternalIdentityResultOutput) Username() pulumi.StringOutput { + return o.ApplyT(func(v GetUserExternalIdentityResult) string { return v.Username }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetUserExternalIdentityResultOutput{}) +} diff --git a/sdk/go/github/repositoryDeploymentBranchPolicy.go b/sdk/go/github/repositoryDeploymentBranchPolicy.go index 24b2e513..c6fb9ced 100644 --- a/sdk/go/github/repositoryDeploymentBranchPolicy.go +++ b/sdk/go/github/repositoryDeploymentBranchPolicy.go @@ -28,21 +28,23 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := github.NewRepositoryEnvironment(ctx, "env", &github.RepositoryEnvironmentArgs{ +// env, err := github.NewRepositoryEnvironment(ctx, "env", &github.RepositoryEnvironmentArgs{ +// Repository: pulumi.String("my_repo"), +// Environment: pulumi.String("my_env"), // DeploymentBranchPolicy: &github.RepositoryEnvironmentDeploymentBranchPolicyArgs{ -// CustomBranchPolicies: pulumi.Bool(true), // ProtectedBranches: pulumi.Bool(false), +// CustomBranchPolicies: pulumi.Bool(true), // }, -// Environment: pulumi.String("my_env"), -// Repository: pulumi.String("my_repo"), // }) // if err != nil { // return err // } // _, err = github.NewRepositoryDeploymentBranchPolicy(ctx, "foo", &github.RepositoryDeploymentBranchPolicyArgs{ -// EnvironmentName: pulumi.String("my_env"), // Repository: pulumi.String("my_repo"), -// }) +// EnvironmentName: pulumi.String("my_env"), +// }, pulumi.DependsOn([]pulumi.Resource{ +// env, +// })) // if err != nil { // return err // } @@ -62,7 +64,7 @@ import ( type RepositoryDeploymentBranchPolicy struct { pulumi.CustomResourceState - // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. EnvironmentName pulumi.StringOutput `pulumi:"environmentName"` // An etag representing the Branch object. Etag pulumi.StringOutput `pulumi:"etag"` @@ -108,7 +110,7 @@ func GetRepositoryDeploymentBranchPolicy(ctx *pulumi.Context, // Input properties used for looking up and filtering RepositoryDeploymentBranchPolicy resources. type repositoryDeploymentBranchPolicyState struct { - // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. EnvironmentName *string `pulumi:"environmentName"` // An etag representing the Branch object. Etag *string `pulumi:"etag"` @@ -119,7 +121,7 @@ type repositoryDeploymentBranchPolicyState struct { } type RepositoryDeploymentBranchPolicyState struct { - // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. EnvironmentName pulumi.StringPtrInput // An etag representing the Branch object. Etag pulumi.StringPtrInput @@ -134,7 +136,7 @@ func (RepositoryDeploymentBranchPolicyState) ElementType() reflect.Type { } type repositoryDeploymentBranchPolicyArgs struct { - // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. EnvironmentName string `pulumi:"environmentName"` // The name pattern that branches must match in order to deploy to the environment. Name *string `pulumi:"name"` @@ -144,7 +146,7 @@ type repositoryDeploymentBranchPolicyArgs struct { // The set of arguments for constructing a RepositoryDeploymentBranchPolicy resource. type RepositoryDeploymentBranchPolicyArgs struct { - // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + // The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. EnvironmentName pulumi.StringInput // The name pattern that branches must match in order to deploy to the environment. Name pulumi.StringPtrInput @@ -239,7 +241,7 @@ func (o RepositoryDeploymentBranchPolicyOutput) ToRepositoryDeploymentBranchPoli return o } -// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. +// The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. func (o RepositoryDeploymentBranchPolicyOutput) EnvironmentName() pulumi.StringOutput { return o.ApplyT(func(v *RepositoryDeploymentBranchPolicy) pulumi.StringOutput { return v.EnvironmentName }).(pulumi.StringOutput) } diff --git a/sdk/go/github/teamMembers.go b/sdk/go/github/teamMembers.go index 79de1d2f..21563d5f 100644 --- a/sdk/go/github/teamMembers.go +++ b/sdk/go/github/teamMembers.go @@ -86,7 +86,6 @@ import ( type TeamMembers struct { pulumi.CustomResourceState - Etag pulumi.StringOutput `pulumi:"etag"` // List of team members. See Members below for details. Members TeamMembersMemberArrayOutput `pulumi:"members"` // The GitHub team id or the GitHub team slug @@ -129,7 +128,6 @@ func GetTeamMembers(ctx *pulumi.Context, // Input properties used for looking up and filtering TeamMembers resources. type teamMembersState struct { - Etag *string `pulumi:"etag"` // List of team members. See Members below for details. Members []TeamMembersMember `pulumi:"members"` // The GitHub team id or the GitHub team slug @@ -137,7 +135,6 @@ type teamMembersState struct { } type TeamMembersState struct { - Etag pulumi.StringPtrInput // List of team members. See Members below for details. Members TeamMembersMemberArrayInput // The GitHub team id or the GitHub team slug @@ -250,10 +247,6 @@ func (o TeamMembersOutput) ToTeamMembersOutputWithContext(ctx context.Context) T return o } -func (o TeamMembersOutput) Etag() pulumi.StringOutput { - return o.ApplyT(func(v *TeamMembers) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput) -} - // List of team members. See Members below for details. func (o TeamMembersOutput) Members() TeamMembersMemberArrayOutput { return o.ApplyT(func(v *TeamMembers) TeamMembersMemberArrayOutput { return v.Members }).(TeamMembersMemberArrayOutput) diff --git a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java index 7456f94d..8fd8c469 100644 --- a/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/github/GithubFunctions.java @@ -89,6 +89,8 @@ import com.pulumi.github.inputs.GetTreeArgs; import com.pulumi.github.inputs.GetTreePlainArgs; import com.pulumi.github.inputs.GetUserArgs; +import com.pulumi.github.inputs.GetUserExternalIdentityArgs; +import com.pulumi.github.inputs.GetUserExternalIdentityPlainArgs; import com.pulumi.github.inputs.GetUserPlainArgs; import com.pulumi.github.inputs.GetUsersArgs; import com.pulumi.github.inputs.GetUsersPlainArgs; @@ -150,6 +152,7 @@ import com.pulumi.github.outputs.GetSshKeysResult; import com.pulumi.github.outputs.GetTeamResult; import com.pulumi.github.outputs.GetTreeResult; +import com.pulumi.github.outputs.GetUserExternalIdentityResult; import com.pulumi.github.outputs.GetUserResult; import com.pulumi.github.outputs.GetUsersResult; import com.pulumi.resources.InvokeArgs; @@ -10922,6 +10925,158 @@ public static Output getUser(GetUserArgs args, InvokeOptions opti public static CompletableFuture getUserPlain(GetUserPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("github:index/getUser:getUser", TypeShape.of(GetUserResult.class), args, Utilities.withVersion(options)); } + /** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.GithubFunctions; + * import com.pulumi.github.inputs.GetUserExternalIdentityArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder() + * .username("example-user") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getUserExternalIdentity(GetUserExternalIdentityArgs args) { + return getUserExternalIdentity(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.GithubFunctions; + * import com.pulumi.github.inputs.GetUserExternalIdentityArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder() + * .username("example-user") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getUserExternalIdentityPlain(GetUserExternalIdentityPlainArgs args) { + return getUserExternalIdentityPlain(args, InvokeOptions.Empty); + } + /** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.GithubFunctions; + * import com.pulumi.github.inputs.GetUserExternalIdentityArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder() + * .username("example-user") + * .build()); + * + * } + * } + * ``` + * + */ + public static Output getUserExternalIdentity(GetUserExternalIdentityArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("github:index/getUserExternalIdentity:getUserExternalIdentity", TypeShape.of(GetUserExternalIdentityResult.class), args, Utilities.withVersion(options)); + } + /** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.github.GithubFunctions; + * import com.pulumi.github.inputs.GetUserExternalIdentityArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * final var exampleUser = GithubFunctions.getUserExternalIdentity(GetUserExternalIdentityArgs.builder() + * .username("example-user") + * .build()); + * + * } + * } + * ``` + * + */ + public static CompletableFuture getUserExternalIdentityPlain(GetUserExternalIdentityPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("github:index/getUserExternalIdentity:getUserExternalIdentity", TypeShape.of(GetUserExternalIdentityResult.class), args, Utilities.withVersion(options)); + } /** * Use this data source to retrieve information about multiple GitHub users at once. * diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicy.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicy.java index 82a49c09..067b96bf 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicy.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicy.java @@ -28,6 +28,7 @@ * import com.pulumi.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs; * import com.pulumi.github.RepositoryDeploymentBranchPolicy; * import com.pulumi.github.RepositoryDeploymentBranchPolicyArgs; + * import com.pulumi.resources.CustomResourceOptions; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -42,18 +43,20 @@ * * public static void stack(Context ctx) { * var env = new RepositoryEnvironment("env", RepositoryEnvironmentArgs.builder() + * .repository("my_repo") + * .environment("my_env") * .deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs.builder() - * .customBranchPolicies(true) * .protectedBranches(false) + * .customBranchPolicies(true) * .build()) - * .environment("my_env") - * .repository("my_repo") * .build()); * * var foo = new RepositoryDeploymentBranchPolicy("foo", RepositoryDeploymentBranchPolicyArgs.builder() - * .environmentName("my_env") * .repository("my_repo") - * .build()); + * .environmentName("my_env") + * .build(), CustomResourceOptions.builder() + * .dependsOn(env) + * .build()); * * } * } @@ -69,14 +72,14 @@ @ResourceType(type="github:index/repositoryDeploymentBranchPolicy:RepositoryDeploymentBranchPolicy") public class RepositoryDeploymentBranchPolicy extends com.pulumi.resources.CustomResource { /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ @Export(name="environmentName", type=String.class, parameters={}) private Output environmentName; /** - * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ public Output environmentName() { diff --git a/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicyArgs.java b/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicyArgs.java index 519837a9..4424d7c5 100644 --- a/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicyArgs.java +++ b/sdk/java/src/main/java/com/pulumi/github/RepositoryDeploymentBranchPolicyArgs.java @@ -16,14 +16,14 @@ public final class RepositoryDeploymentBranchPolicyArgs extends com.pulumi.resou public static final RepositoryDeploymentBranchPolicyArgs Empty = new RepositoryDeploymentBranchPolicyArgs(); /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ @Import(name="environmentName", required=true) private Output environmentName; /** - * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ public Output environmentName() { @@ -87,7 +87,7 @@ public Builder(RepositoryDeploymentBranchPolicyArgs defaults) { } /** - * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * * @return builder * @@ -98,7 +98,7 @@ public Builder environmentName(Output environmentName) { } /** - * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/TeamMembers.java b/sdk/java/src/main/java/com/pulumi/github/TeamMembers.java index f1cd47b2..0adfd240 100644 --- a/sdk/java/src/main/java/com/pulumi/github/TeamMembers.java +++ b/sdk/java/src/main/java/com/pulumi/github/TeamMembers.java @@ -89,12 +89,6 @@ */ @ResourceType(type="github:index/teamMembers:TeamMembers") public class TeamMembers extends com.pulumi.resources.CustomResource { - @Export(name="etag", type=String.class, parameters={}) - private Output etag; - - public Output etag() { - return this.etag; - } /** * List of team members. See Members below for details. * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityArgs.java new file mode 100644 index 00000000..37ead2c0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityArgs.java @@ -0,0 +1,82 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetUserExternalIdentityArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetUserExternalIdentityArgs Empty = new GetUserExternalIdentityArgs(); + + /** + * The username of the member to fetch external identity for. + * + */ + @Import(name="username", required=true) + private Output username; + + /** + * @return The username of the member to fetch external identity for. + * + */ + public Output username() { + return this.username; + } + + private GetUserExternalIdentityArgs() {} + + private GetUserExternalIdentityArgs(GetUserExternalIdentityArgs $) { + this.username = $.username; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetUserExternalIdentityArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetUserExternalIdentityArgs $; + + public Builder() { + $ = new GetUserExternalIdentityArgs(); + } + + public Builder(GetUserExternalIdentityArgs defaults) { + $ = new GetUserExternalIdentityArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param username The username of the member to fetch external identity for. + * + * @return builder + * + */ + public Builder username(Output username) { + $.username = username; + return this; + } + + /** + * @param username The username of the member to fetch external identity for. + * + * @return builder + * + */ + public Builder username(String username) { + return username(Output.of(username)); + } + + public GetUserExternalIdentityArgs build() { + $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityPlainArgs.java b/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityPlainArgs.java new file mode 100644 index 00000000..7347f066 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/GetUserExternalIdentityPlainArgs.java @@ -0,0 +1,71 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.inputs; + +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; + + +public final class GetUserExternalIdentityPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetUserExternalIdentityPlainArgs Empty = new GetUserExternalIdentityPlainArgs(); + + /** + * The username of the member to fetch external identity for. + * + */ + @Import(name="username", required=true) + private String username; + + /** + * @return The username of the member to fetch external identity for. + * + */ + public String username() { + return this.username; + } + + private GetUserExternalIdentityPlainArgs() {} + + private GetUserExternalIdentityPlainArgs(GetUserExternalIdentityPlainArgs $) { + this.username = $.username; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetUserExternalIdentityPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetUserExternalIdentityPlainArgs $; + + public Builder() { + $ = new GetUserExternalIdentityPlainArgs(); + } + + public Builder(GetUserExternalIdentityPlainArgs defaults) { + $ = new GetUserExternalIdentityPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param username The username of the member to fetch external identity for. + * + * @return builder + * + */ + public Builder username(String username) { + $.username = username; + return this; + } + + public GetUserExternalIdentityPlainArgs build() { + $.username = Objects.requireNonNull($.username, "expected parameter 'username' to be non-null"); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDeploymentBranchPolicyState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDeploymentBranchPolicyState.java index f3b6aecf..f887e302 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDeploymentBranchPolicyState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/RepositoryDeploymentBranchPolicyState.java @@ -16,14 +16,14 @@ public final class RepositoryDeploymentBranchPolicyState extends com.pulumi.reso public static final RepositoryDeploymentBranchPolicyState Empty = new RepositoryDeploymentBranchPolicyState(); /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ @Import(name="environmentName") private @Nullable Output environmentName; /** - * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @return The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * */ public Optional> environmentName() { @@ -103,7 +103,7 @@ public Builder(RepositoryDeploymentBranchPolicyState defaults) { } /** - * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * * @return builder * @@ -114,7 +114,7 @@ public Builder environmentName(@Nullable Output environmentName) { } /** - * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * @param environmentName The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/github/inputs/TeamMembersState.java b/sdk/java/src/main/java/com/pulumi/github/inputs/TeamMembersState.java index 792b9511..314a19b4 100644 --- a/sdk/java/src/main/java/com/pulumi/github/inputs/TeamMembersState.java +++ b/sdk/java/src/main/java/com/pulumi/github/inputs/TeamMembersState.java @@ -17,13 +17,6 @@ public final class TeamMembersState extends com.pulumi.resources.ResourceArgs { public static final TeamMembersState Empty = new TeamMembersState(); - @Import(name="etag") - private @Nullable Output etag; - - public Optional> etag() { - return Optional.ofNullable(this.etag); - } - /** * List of team members. See Members below for details. * @@ -57,7 +50,6 @@ public Optional> teamId() { private TeamMembersState() {} private TeamMembersState(TeamMembersState $) { - this.etag = $.etag; this.members = $.members; this.teamId = $.teamId; } @@ -80,15 +72,6 @@ public Builder(TeamMembersState defaults) { $ = new TeamMembersState(Objects.requireNonNull(defaults)); } - public Builder etag(@Nullable Output etag) { - $.etag = etag; - return this; - } - - public Builder etag(String etag) { - return etag(Output.of(etag)); - } - /** * @param members List of team members. See Members below for details. * diff --git a/sdk/java/src/main/java/com/pulumi/github/outputs/GetUserExternalIdentityResult.java b/sdk/java/src/main/java/com/pulumi/github/outputs/GetUserExternalIdentityResult.java new file mode 100644 index 00000000..620a527e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/github/outputs/GetUserExternalIdentityResult.java @@ -0,0 +1,139 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.github.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Map; +import java.util.Objects; + +@CustomType +public final class GetUserExternalIdentityResult { + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + private String id; + /** + * @return The username of the GitHub user + * + */ + private String login; + /** + * @return An Object containing the user's SAML data. This object will + * be empty if the user is not managed by SAML. + * + */ + private Map samlIdentity; + /** + * @return An Object contining the user's SCIM data. This object will + * be empty if the user is not managed by SCIM. + * + */ + private Map scimIdentity; + /** + * @return The member's SAML Username + * + */ + private String username; + + private GetUserExternalIdentityResult() {} + /** + * @return The provider-assigned unique ID for this managed resource. + * + */ + public String id() { + return this.id; + } + /** + * @return The username of the GitHub user + * + */ + public String login() { + return this.login; + } + /** + * @return An Object containing the user's SAML data. This object will + * be empty if the user is not managed by SAML. + * + */ + public Map samlIdentity() { + return this.samlIdentity; + } + /** + * @return An Object contining the user's SCIM data. This object will + * be empty if the user is not managed by SCIM. + * + */ + public Map scimIdentity() { + return this.scimIdentity; + } + /** + * @return The member's SAML Username + * + */ + public String username() { + return this.username; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetUserExternalIdentityResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private String login; + private Map samlIdentity; + private Map scimIdentity; + private String username; + public Builder() {} + public Builder(GetUserExternalIdentityResult defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.login = defaults.login; + this.samlIdentity = defaults.samlIdentity; + this.scimIdentity = defaults.scimIdentity; + this.username = defaults.username; + } + + @CustomType.Setter + public Builder id(String id) { + this.id = Objects.requireNonNull(id); + return this; + } + @CustomType.Setter + public Builder login(String login) { + this.login = Objects.requireNonNull(login); + return this; + } + @CustomType.Setter + public Builder samlIdentity(Map samlIdentity) { + this.samlIdentity = Objects.requireNonNull(samlIdentity); + return this; + } + @CustomType.Setter + public Builder scimIdentity(Map scimIdentity) { + this.scimIdentity = Objects.requireNonNull(scimIdentity); + return this; + } + @CustomType.Setter + public Builder username(String username) { + this.username = Objects.requireNonNull(username); + return this; + } + public GetUserExternalIdentityResult build() { + final var o = new GetUserExternalIdentityResult(); + o.id = id; + o.login = login; + o.samlIdentity = samlIdentity; + o.scimIdentity = scimIdentity; + o.username = username; + return o; + } + } +} diff --git a/sdk/nodejs/getUserExternalIdentity.ts b/sdk/nodejs/getUserExternalIdentity.ts new file mode 100644 index 00000000..51e3d1e5 --- /dev/null +++ b/sdk/nodejs/getUserExternalIdentity.ts @@ -0,0 +1,94 @@ +// *** 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"; + +/** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const exampleUser = github.getUserExternalIdentity({ + * username: "example-user", + * }); + * ``` + */ +export function getUserExternalIdentity(args: GetUserExternalIdentityArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("github:index/getUserExternalIdentity:getUserExternalIdentity", { + "username": args.username, + }, opts); +} + +/** + * A collection of arguments for invoking getUserExternalIdentity. + */ +export interface GetUserExternalIdentityArgs { + /** + * The username of the member to fetch external identity for. + */ + username: string; +} + +/** + * A collection of values returned by getUserExternalIdentity. + */ +export interface GetUserExternalIdentityResult { + /** + * The provider-assigned unique ID for this managed resource. + */ + readonly id: string; + /** + * The username of the GitHub user + */ + readonly login: string; + /** + * An Object containing the user's SAML data. This object will + * be empty if the user is not managed by SAML. + */ + readonly samlIdentity: {[key: string]: string}; + /** + * An Object contining the user's SCIM data. This object will + * be empty if the user is not managed by SCIM. + */ + readonly scimIdentity: {[key: string]: string}; + /** + * The member's SAML Username + */ + readonly username: string; +} +/** + * Use this data source to retrieve a specific organization member's SAML or SCIM user + * attributes. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as github from "@pulumi/github"; + * + * const exampleUser = github.getUserExternalIdentity({ + * username: "example-user", + * }); + * ``` + */ +export function getUserExternalIdentityOutput(args: GetUserExternalIdentityOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getUserExternalIdentity(a, opts)) +} + +/** + * A collection of arguments for invoking getUserExternalIdentity. + */ +export interface GetUserExternalIdentityOutputArgs { + /** + * The username of the member to fetch external identity for. + */ + username: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 6e6f5fbe..6c03d83b 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -417,6 +417,11 @@ export const getUser: typeof import("./getUser").getUser = null as any; export const getUserOutput: typeof import("./getUser").getUserOutput = null as any; utilities.lazyLoad(exports, ["getUser","getUserOutput"], () => require("./getUser")); +export { GetUserExternalIdentityArgs, GetUserExternalIdentityResult, GetUserExternalIdentityOutputArgs } from "./getUserExternalIdentity"; +export const getUserExternalIdentity: typeof import("./getUserExternalIdentity").getUserExternalIdentity = null as any; +export const getUserExternalIdentityOutput: typeof import("./getUserExternalIdentity").getUserExternalIdentityOutput = null as any; +utilities.lazyLoad(exports, ["getUserExternalIdentity","getUserExternalIdentityOutput"], () => require("./getUserExternalIdentity")); + export { GetUsersArgs, GetUsersResult, GetUsersOutputArgs } from "./getUsers"; export const getUsers: typeof import("./getUsers").getUsers = null as any; export const getUsersOutput: typeof import("./getUsers").getUsersOutput = null as any; diff --git a/sdk/nodejs/repositoryDeploymentBranchPolicy.ts b/sdk/nodejs/repositoryDeploymentBranchPolicy.ts index d1db50ed..549b99cf 100644 --- a/sdk/nodejs/repositoryDeploymentBranchPolicy.ts +++ b/sdk/nodejs/repositoryDeploymentBranchPolicy.ts @@ -14,16 +14,18 @@ import * as utilities from "./utilities"; * import * as github from "@pulumi/github"; * * const env = new github.RepositoryEnvironment("env", { + * repository: "my_repo", + * environment: "my_env", * deploymentBranchPolicy: { - * customBranchPolicies: true, * protectedBranches: false, + * customBranchPolicies: true, * }, - * environment: "my_env", - * repository: "my_repo", * }); * const foo = new github.RepositoryDeploymentBranchPolicy("foo", { - * environmentName: "my_env", * repository: "my_repo", + * environmentName: "my_env", + * }, { + * dependsOn: [env], * }); * ``` * @@ -62,7 +64,7 @@ export class RepositoryDeploymentBranchPolicy extends pulumi.CustomResource { } /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. */ public readonly environmentName!: pulumi.Output; /** @@ -118,7 +120,7 @@ export class RepositoryDeploymentBranchPolicy extends pulumi.CustomResource { */ export interface RepositoryDeploymentBranchPolicyState { /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. */ environmentName?: pulumi.Input; /** @@ -140,7 +142,7 @@ export interface RepositoryDeploymentBranchPolicyState { */ export interface RepositoryDeploymentBranchPolicyArgs { /** - * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + * The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. */ environmentName: pulumi.Input; /** diff --git a/sdk/nodejs/teamMembers.ts b/sdk/nodejs/teamMembers.ts index 25d939c9..67acfef5 100644 --- a/sdk/nodejs/teamMembers.ts +++ b/sdk/nodejs/teamMembers.ts @@ -78,7 +78,6 @@ export class TeamMembers extends pulumi.CustomResource { return obj['__pulumiType'] === TeamMembers.__pulumiType; } - public /*out*/ readonly etag!: pulumi.Output; /** * List of team members. See Members below for details. */ @@ -101,7 +100,6 @@ export class TeamMembers extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as TeamMembersState | undefined; - resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["members"] = state ? state.members : undefined; resourceInputs["teamId"] = state ? state.teamId : undefined; } else { @@ -114,7 +112,6 @@ export class TeamMembers extends pulumi.CustomResource { } resourceInputs["members"] = args ? args.members : undefined; resourceInputs["teamId"] = args ? args.teamId : undefined; - resourceInputs["etag"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(TeamMembers.__pulumiType, name, resourceInputs, opts); @@ -125,7 +122,6 @@ export class TeamMembers extends pulumi.CustomResource { * Input properties used for looking up and filtering TeamMembers resources. */ export interface TeamMembersState { - etag?: pulumi.Input; /** * List of team members. See Members below for details. */ diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index fb9331eb..584a0727 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -101,6 +101,7 @@ "getTeam.ts", "getTree.ts", "getUser.ts", + "getUserExternalIdentity.ts", "getUsers.ts", "index.ts", "issue.ts", diff --git a/sdk/python/pulumi_github/__init__.py b/sdk/python/pulumi_github/__init__.py index 554dbeba..f769aac3 100644 --- a/sdk/python/pulumi_github/__init__.py +++ b/sdk/python/pulumi_github/__init__.py @@ -91,6 +91,7 @@ from .get_team import * from .get_tree import * from .get_user import * +from .get_user_external_identity import * from .get_users import * from .issue import * from .issue_label import * diff --git a/sdk/python/pulumi_github/get_user_external_identity.py b/sdk/python/pulumi_github/get_user_external_identity.py new file mode 100644 index 00000000..f8755dcd --- /dev/null +++ b/sdk/python/pulumi_github/get_user_external_identity.py @@ -0,0 +1,147 @@ +# 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 pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = [ + 'GetUserExternalIdentityResult', + 'AwaitableGetUserExternalIdentityResult', + 'get_user_external_identity', + 'get_user_external_identity_output', +] + +@pulumi.output_type +class GetUserExternalIdentityResult: + """ + A collection of values returned by getUserExternalIdentity. + """ + def __init__(__self__, id=None, login=None, saml_identity=None, scim_identity=None, username=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if login and not isinstance(login, str): + raise TypeError("Expected argument 'login' to be a str") + pulumi.set(__self__, "login", login) + if saml_identity and not isinstance(saml_identity, dict): + raise TypeError("Expected argument 'saml_identity' to be a dict") + pulumi.set(__self__, "saml_identity", saml_identity) + if scim_identity and not isinstance(scim_identity, dict): + raise TypeError("Expected argument 'scim_identity' to be a dict") + pulumi.set(__self__, "scim_identity", scim_identity) + if username and not isinstance(username, str): + raise TypeError("Expected argument 'username' to be a str") + pulumi.set(__self__, "username", username) + + @property + @pulumi.getter + def id(self) -> str: + """ + The provider-assigned unique ID for this managed resource. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def login(self) -> str: + """ + The username of the GitHub user + """ + return pulumi.get(self, "login") + + @property + @pulumi.getter(name="samlIdentity") + def saml_identity(self) -> Mapping[str, str]: + """ + An Object containing the user's SAML data. This object will + be empty if the user is not managed by SAML. + """ + return pulumi.get(self, "saml_identity") + + @property + @pulumi.getter(name="scimIdentity") + def scim_identity(self) -> Mapping[str, str]: + """ + An Object contining the user's SCIM data. This object will + be empty if the user is not managed by SCIM. + """ + return pulumi.get(self, "scim_identity") + + @property + @pulumi.getter + def username(self) -> str: + """ + The member's SAML Username + """ + return pulumi.get(self, "username") + + +class AwaitableGetUserExternalIdentityResult(GetUserExternalIdentityResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetUserExternalIdentityResult( + id=self.id, + login=self.login, + saml_identity=self.saml_identity, + scim_identity=self.scim_identity, + username=self.username) + + +def get_user_external_identity(username: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserExternalIdentityResult: + """ + Use this data source to retrieve a specific organization member's SAML or SCIM user + attributes. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example_user = github.get_user_external_identity(username="example-user") + ``` + + + :param str username: The username of the member to fetch external identity for. + """ + __args__ = dict() + __args__['username'] = username + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('github:index/getUserExternalIdentity:getUserExternalIdentity', __args__, opts=opts, typ=GetUserExternalIdentityResult).value + + return AwaitableGetUserExternalIdentityResult( + id=pulumi.get(__ret__, 'id'), + login=pulumi.get(__ret__, 'login'), + saml_identity=pulumi.get(__ret__, 'saml_identity'), + scim_identity=pulumi.get(__ret__, 'scim_identity'), + username=pulumi.get(__ret__, 'username')) + + +@_utilities.lift_output_func(get_user_external_identity) +def get_user_external_identity_output(username: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUserExternalIdentityResult]: + """ + Use this data source to retrieve a specific organization member's SAML or SCIM user + attributes. + + ## Example Usage + + ```python + import pulumi + import pulumi_github as github + + example_user = github.get_user_external_identity(username="example-user") + ``` + + + :param str username: The username of the member to fetch external identity for. + """ + ... diff --git a/sdk/python/pulumi_github/repository_deployment_branch_policy.py b/sdk/python/pulumi_github/repository_deployment_branch_policy.py index 8589126e..2a8e54f0 100644 --- a/sdk/python/pulumi_github/repository_deployment_branch_policy.py +++ b/sdk/python/pulumi_github/repository_deployment_branch_policy.py @@ -19,7 +19,7 @@ def __init__(__self__, *, name: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a RepositoryDeploymentBranchPolicy resource. - :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. :param pulumi.Input[str] repository: The repository to create the policy in. :param pulumi.Input[str] name: The name pattern that branches must match in order to deploy to the environment. """ @@ -32,7 +32,7 @@ def __init__(__self__, *, @pulumi.getter(name="environmentName") def environment_name(self) -> pulumi.Input[str]: """ - The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. """ return pulumi.get(self, "environment_name") @@ -74,7 +74,7 @@ def __init__(__self__, *, repository: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RepositoryDeploymentBranchPolicy resources. - :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. :param pulumi.Input[str] etag: An etag representing the Branch object. :param pulumi.Input[str] name: The name pattern that branches must match in order to deploy to the environment. :param pulumi.Input[str] repository: The repository to create the policy in. @@ -92,7 +92,7 @@ def __init__(__self__, *, @pulumi.getter(name="environmentName") def environment_name(self) -> Optional[pulumi.Input[str]]: """ - The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. """ return pulumi.get(self, "environment_name") @@ -156,15 +156,16 @@ def __init__(__self__, import pulumi_github as github env = github.RepositoryEnvironment("env", + repository="my_repo", + environment="my_env", deployment_branch_policy=github.RepositoryEnvironmentDeploymentBranchPolicyArgs( - custom_branch_policies=True, protected_branches=False, - ), - environment="my_env", - repository="my_repo") + custom_branch_policies=True, + )) foo = github.RepositoryDeploymentBranchPolicy("foo", + repository="my_repo", environment_name="my_env", - repository="my_repo") + opts=pulumi.ResourceOptions(depends_on=[env])) ``` ## Import @@ -175,7 +176,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. :param pulumi.Input[str] name: The name pattern that branches must match in order to deploy to the environment. :param pulumi.Input[str] repository: The repository to create the policy in. """ @@ -195,15 +196,16 @@ def __init__(__self__, import pulumi_github as github env = github.RepositoryEnvironment("env", + repository="my_repo", + environment="my_env", deployment_branch_policy=github.RepositoryEnvironmentDeploymentBranchPolicyArgs( - custom_branch_policies=True, protected_branches=False, - ), - environment="my_env", - repository="my_repo") + custom_branch_policies=True, + )) foo = github.RepositoryDeploymentBranchPolicy("foo", + repository="my_repo", environment_name="my_env", - repository="my_repo") + opts=pulumi.ResourceOptions(depends_on=[env])) ``` ## Import @@ -268,7 +270,7 @@ 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] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + :param pulumi.Input[str] environment_name: The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. :param pulumi.Input[str] etag: An etag representing the Branch object. :param pulumi.Input[str] name: The name pattern that branches must match in order to deploy to the environment. :param pulumi.Input[str] repository: The repository to create the policy in. @@ -287,7 +289,7 @@ def get(resource_name: str, @pulumi.getter(name="environmentName") def environment_name(self) -> pulumi.Output[str]: """ - The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true. + The name of the environment. This environment must have `deployment_branch_policy.custom_branch_policies` set to true or a 404 error will be thrown. """ return pulumi.get(self, "environment_name") diff --git a/sdk/python/pulumi_github/team_members.py b/sdk/python/pulumi_github/team_members.py index 0357006f..7a71d36d 100644 --- a/sdk/python/pulumi_github/team_members.py +++ b/sdk/python/pulumi_github/team_members.py @@ -54,7 +54,6 @@ def team_id(self, value: pulumi.Input[str]): @pulumi.input_type class _TeamMembersState: def __init__(__self__, *, - etag: Optional[pulumi.Input[str]] = None, members: Optional[pulumi.Input[Sequence[pulumi.Input['TeamMembersMemberArgs']]]] = None, team_id: Optional[pulumi.Input[str]] = None): """ @@ -62,22 +61,11 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['TeamMembersMemberArgs']]] members: List of team members. See Members below for details. :param pulumi.Input[str] team_id: The GitHub team id or the GitHub team slug """ - if etag is not None: - pulumi.set(__self__, "etag", etag) if members is not None: pulumi.set(__self__, "members", members) if team_id is not None: pulumi.set(__self__, "team_id", team_id) - @property - @pulumi.getter - def etag(self) -> Optional[pulumi.Input[str]]: - return pulumi.get(self, "etag") - - @etag.setter - def etag(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "etag", value) - @property @pulumi.getter def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['TeamMembersMemberArgs']]]]: @@ -236,7 +224,6 @@ def _internal_init(__self__, if team_id is None and not opts.urn: raise TypeError("Missing required property 'team_id'") __props__.__dict__["team_id"] = team_id - __props__.__dict__["etag"] = None super(TeamMembers, __self__).__init__( 'github:index/teamMembers:TeamMembers', resource_name, @@ -247,7 +234,6 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - etag: Optional[pulumi.Input[str]] = None, members: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['TeamMembersMemberArgs']]]]] = None, team_id: Optional[pulumi.Input[str]] = None) -> 'TeamMembers': """ @@ -264,16 +250,10 @@ def get(resource_name: str, __props__ = _TeamMembersState.__new__(_TeamMembersState) - __props__.__dict__["etag"] = etag __props__.__dict__["members"] = members __props__.__dict__["team_id"] = team_id return TeamMembers(resource_name, opts=opts, __props__=__props__) - @property - @pulumi.getter - def etag(self) -> pulumi.Output[str]: - return pulumi.get(self, "etag") - @property @pulumi.getter def members(self) -> pulumi.Output[Sequence['outputs.TeamMembersMember']]: