From 27ec79117aece6f9f4269b6a227d9a1d78e84f1f Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Fri, 16 Aug 2024 05:06:45 -0600 Subject: [PATCH] Upgrade terraform-provider-gitlab to v17.3.0 (#690) This PR was generated via `$ upgrade-provider pulumi/pulumi-gitlab --kind=all --target-bridge-version=latest`. --- - Updating Java Gen version from 0.14.0 to 0.15.0. - Upgrading terraform-provider-gitlab from 17.2.0 to 17.3.0. Fixes #689 --- .pulumi-java-gen.version | 2 +- patches/0001-fork.patch | 2 +- .../bridge-metadata.json | 18 + .../cmd/pulumi-resource-gitlab/schema.json | 235 +++++++++- provider/go.mod | 32 +- provider/go.sum | 72 ++-- sdk/dotnet/ApplicationSettings.cs | 9 + sdk/dotnet/GetGroupIds.cs | 153 +++++++ sdk/dotnet/GetProjectIds.cs | 153 +++++++ sdk/dotnet/Group.cs | 18 + sdk/dotnet/GroupAccessToken.cs | 2 +- sdk/dotnet/GroupSecurityPolicyAttachment.cs | 210 +++++++++ sdk/dotnet/ProjectJobTokenScopes.cs | 75 +++- sdk/dotnet/ProjectSecurityPolicyAttachment.cs | 4 +- sdk/go/gitlab/applicationSettings.go | 19 +- sdk/go/gitlab/getGroupIds.go | 143 ++++++ sdk/go/gitlab/getProjectIds.go | 143 ++++++ sdk/go/gitlab/group.go | 15 + sdk/go/gitlab/groupAccessToken.go | 2 +- .../gitlab/groupSecurityPolicyAttachment.go | 351 +++++++++++++++ sdk/go/gitlab/init.go | 7 + sdk/go/gitlab/projectJobTokenScopes.go | 74 +++- .../gitlab/projectSecurityPolicyAttachment.go | 4 +- sdk/java/build.gradle | 2 +- .../pulumi/gitlab/ApplicationSettings.java | 6 + .../gitlab/ApplicationSettingsArgs.java | 17 + .../com/pulumi/gitlab/GitlabFunctions.java | 406 ++++++++++++++++++ .../main/java/com/pulumi/gitlab/Group.java | 14 + .../com/pulumi/gitlab/GroupAccessToken.java | 2 +- .../java/com/pulumi/gitlab/GroupArgs.java | 37 ++ .../gitlab/GroupSecurityPolicyAttachment.java | 226 ++++++++++ .../GroupSecurityPolicyAttachmentArgs.java | 125 ++++++ .../pulumi/gitlab/ProjectJobTokenScopes.java | 55 ++- .../gitlab/ProjectJobTokenScopesArgs.java | 130 +++++- .../ProjectSecurityPolicyAttachment.java | 4 +- .../inputs/ApplicationSettingsState.java | 17 + .../pulumi/gitlab/inputs/GetGroupIdsArgs.java | 85 ++++ .../gitlab/inputs/GetGroupIdsPlainArgs.java | 74 ++++ .../gitlab/inputs/GetProjectIdsArgs.java | 85 ++++ .../gitlab/inputs/GetProjectIdsPlainArgs.java | 74 ++++ .../GroupSecurityPolicyAttachmentState.java | 194 +++++++++ .../com/pulumi/gitlab/inputs/GroupState.java | 37 ++ .../inputs/ProjectJobTokenScopesState.java | 101 +++++ .../gitlab/outputs/GetGroupIdsResult.java | 142 ++++++ .../gitlab/outputs/GetProjectIdsResult.java | 142 ++++++ sdk/nodejs/applicationSettings.ts | 5 + sdk/nodejs/getGroupIds.ts | 99 +++++ sdk/nodejs/getProjectIds.ts | 99 +++++ sdk/nodejs/group.ts | 14 + sdk/nodejs/groupAccessToken.ts | 2 +- sdk/nodejs/groupSecurityPolicyAttachment.ts | 182 ++++++++ sdk/nodejs/index.ts | 18 + sdk/nodejs/projectJobTokenScopes.ts | 62 ++- sdk/nodejs/projectSecurityPolicyAttachment.ts | 4 +- sdk/nodejs/tsconfig.json | 3 + sdk/python/pulumi_gitlab/__init__.py | 11 + .../pulumi_gitlab/application_settings.py | 34 ++ sdk/python/pulumi_gitlab/get_group_ids.py | 152 +++++++ sdk/python/pulumi_gitlab/get_project_ids.py | 152 +++++++ sdk/python/pulumi_gitlab/group.py | 47 ++ .../pulumi_gitlab/group_access_token.py | 4 +- .../group_security_policy_attachment.py | 360 ++++++++++++++++ .../pulumi_gitlab/project_job_token_scopes.py | 157 ++++++- .../project_security_policy_attachment.py | 8 +- upstream | 2 +- 65 files changed, 4965 insertions(+), 168 deletions(-) create mode 100644 sdk/dotnet/GetGroupIds.cs create mode 100644 sdk/dotnet/GetProjectIds.cs create mode 100644 sdk/dotnet/GroupSecurityPolicyAttachment.cs create mode 100644 sdk/go/gitlab/getGroupIds.go create mode 100644 sdk/go/gitlab/getProjectIds.go create mode 100644 sdk/go/gitlab/groupSecurityPolicyAttachment.go create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachment.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachmentArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsPlainArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsPlainArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupSecurityPolicyAttachmentState.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetGroupIdsResult.java create mode 100644 sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetProjectIdsResult.java create mode 100644 sdk/nodejs/getGroupIds.ts create mode 100644 sdk/nodejs/getProjectIds.ts create mode 100644 sdk/nodejs/groupSecurityPolicyAttachment.ts create mode 100644 sdk/python/pulumi_gitlab/get_group_ids.py create mode 100644 sdk/python/pulumi_gitlab/get_project_ids.py create mode 100644 sdk/python/pulumi_gitlab/group_security_policy_attachment.py diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index 0548fb4e..7092c7c4 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.14.0 \ No newline at end of file +0.15.0 \ No newline at end of file diff --git a/patches/0001-fork.patch b/patches/0001-fork.patch index af6d81bc..d3ab30a6 100644 --- a/patches/0001-fork.patch +++ b/patches/0001-fork.patch @@ -5,7 +5,7 @@ Subject: [PATCH] fork diff --git a/internal/provider/sdk/resource_gitlab_project.go b/internal/provider/sdk/resource_gitlab_project.go -index 54a23f4b..480bcd1e 100644 +index d449486f..617bfc13 100644 --- a/internal/provider/sdk/resource_gitlab_project.go +++ b/internal/provider/sdk/resource_gitlab_project.go @@ -398,33 +398,34 @@ var resourceGitLabProjectSchema = map[string]*schema.Schema{ diff --git a/provider/cmd/pulumi-resource-gitlab/bridge-metadata.json b/provider/cmd/pulumi-resource-gitlab/bridge-metadata.json index c9fea643..f30cdf1f 100644 --- a/provider/cmd/pulumi-resource-gitlab/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-gitlab/bridge-metadata.json @@ -206,6 +206,10 @@ "current": "gitlab:index/groupSamlLink:GroupSamlLink", "majorVersion": 8 }, + "gitlab_group_security_policy_attachment": { + "current": "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", + "majorVersion": 8 + }, "gitlab_group_share_group": { "current": "gitlab:index/groupShareGroup:GroupShareGroup", "majorVersion": 8 @@ -405,6 +409,9 @@ "current": "gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes", "majorVersion": 8, "fields": { + "target_group_ids": { + "maxItemsOne": false + }, "target_project_ids": { "maxItemsOne": false } @@ -646,6 +653,10 @@ } } }, + "gitlab_group_ids": { + "current": "gitlab:index/getGroupIds:getGroupIds", + "majorVersion": 8 + }, "gitlab_group_membership": { "current": "gitlab:index/getGroupMembership:getGroupMembership", "majorVersion": 8, @@ -776,6 +787,10 @@ } } }, + "gitlab_project_ids": { + "current": "gitlab:index/getProjectIds:getProjectIds", + "majorVersion": 8 + }, "gitlab_project_issue": { "current": "gitlab:index/getProjectIssue:getProjectIssue", "majorVersion": 8, @@ -1082,6 +1097,7 @@ "gitlab:index/groupProjectFileTemplate:GroupProjectFileTemplate": 0, "gitlab:index/groupProtectedEnvironment:GroupProtectedEnvironment": 1, "gitlab:index/groupSamlLink:GroupSamlLink": 0, + "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment": 1, "gitlab:index/groupShareGroup:GroupShareGroup": 0, "gitlab:index/groupVariable:GroupVariable": 0, "gitlab:index/instanceCluster:InstanceCluster": 0, @@ -1160,6 +1176,7 @@ "gitlab:index/getGroup:getGroup": 0, "gitlab:index/getGroupHook:getGroupHook": 0, "gitlab:index/getGroupHooks:getGroupHooks": 0, + "gitlab:index/getGroupIds:getGroupIds": 1, "gitlab:index/getGroupMembership:getGroupMembership": 0, "gitlab:index/getGroupSubgroups:getGroupSubgroups": 0, "gitlab:index/getGroupVariable:getGroupVariable": 0, @@ -1173,6 +1190,7 @@ "gitlab:index/getProjectBranches:getProjectBranches": 0, "gitlab:index/getProjectHook:getProjectHook": 0, "gitlab:index/getProjectHooks:getProjectHooks": 0, + "gitlab:index/getProjectIds:getProjectIds": 1, "gitlab:index/getProjectIssue:getProjectIssue": 0, "gitlab:index/getProjectIssues:getProjectIssues": 0, "gitlab:index/getProjectMembership:getProjectMembership": 0, diff --git a/provider/cmd/pulumi-resource-gitlab/schema.json b/provider/cmd/pulumi-resource-gitlab/schema.json index 4b7bf911..49eb6789 100644 --- a/provider/cmd/pulumi-resource-gitlab/schema.json +++ b/provider/cmd/pulumi-resource-gitlab/schema.json @@ -4735,6 +4735,9 @@ "type": "integer", "description": "Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6.\n" }, + "maxTerraformStateSizeBytes": { + "type": "integer" + }, "metricsMethodCallThreshold": { "type": "integer", "description": "A method call is only tracked when it takes longer than the given amount of milliseconds.\n" @@ -5314,6 +5317,7 @@ "maxPagesSize", "maxPersonalAccessTokenLifetime", "maxSshKeyLifetime", + "maxTerraformStateSizeBytes", "metricsMethodCallThreshold", "minimumPasswordLength", "mirrorAvailable", @@ -6006,6 +6010,9 @@ "type": "integer", "description": "Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6.\n" }, + "maxTerraformStateSizeBytes": { + "type": "integer" + }, "metricsMethodCallThreshold": { "type": "integer", "description": "A method call is only tracked when it takes longer than the given amount of milliseconds.\n" @@ -7035,6 +7042,9 @@ "type": "integer", "description": "Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6.\n" }, + "maxTerraformStateSizeBytes": { + "type": "integer" + }, "metricsMethodCallThreshold": { "type": "integer", "description": "A method call is only tracked when it takes longer than the given amount of milliseconds.\n" @@ -8753,6 +8763,10 @@ "type": "string", "description": "The path of the group.\n" }, + "permanentlyRemoveOnDelete": { + "type": "boolean", + "description": "Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run.\n" + }, "preventForkingOutsideGroup": { "type": "boolean", "description": "Defaults to false. When enabled, users can not fork projects from this group to external namespaces.\n" @@ -8900,6 +8914,10 @@ "type": "string", "description": "The path of the group.\n" }, + "permanentlyRemoveOnDelete": { + "type": "boolean", + "description": "Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run.\n" + }, "preventForkingOutsideGroup": { "type": "boolean", "description": "Defaults to false. When enabled, users can not fork projects from this group to external namespaces.\n" @@ -9026,6 +9044,10 @@ "type": "string", "description": "The path of the group.\n" }, + "permanentlyRemoveOnDelete": { + "type": "boolean", + "description": "Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run.\n" + }, "preventForkingOutsideGroup": { "type": "boolean", "description": "Defaults to false. When enabled, users can not fork projects from this group to external namespaces.\n" @@ -9088,7 +9110,7 @@ } }, "gitlab:index/groupAccessToken:GroupAccessToken": { - "description": "The `gitlab.GroupAccessToken` resource allows to manage the lifecycle of a group access token.\n\n\u003e Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/ee/operations/tracing.html)\n\n\u003e Use `rotation_configuration` to automatically rotate tokens instead of using `timestamp()` as timestamp will cause changes with every plan. `pulumi up` must still be run to rotate the token.\n\n\u003e Due to [Automatic reuse detection](https://docs.gitlab.com/ee/api/group_access_tokens.html#automatic-reuse-detection) it's possible that a new Group Access Token will immediately be revoked. Check if an old process using the old token is running if this happens.\n\n**Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst example = new gitlab.GroupAccessToken(\"example\", {\n group: \"25\",\n name: \"Example project access token\",\n expiresAt: \"2020-03-14\",\n accessLevel: \"developer\",\n scopes: [\"api\"],\n});\nconst exampleGroupVariable = new gitlab.GroupVariable(\"example\", {\n group: \"25\",\n key: \"gat\",\n value: example.token,\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nexample = gitlab.GroupAccessToken(\"example\",\n group=\"25\",\n name=\"Example project access token\",\n expires_at=\"2020-03-14\",\n access_level=\"developer\",\n scopes=[\"api\"])\nexample_group_variable = gitlab.GroupVariable(\"example\",\n group=\"25\",\n key=\"gat\",\n value=example.token)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new GitLab.GroupAccessToken(\"example\", new()\n {\n Group = \"25\",\n Name = \"Example project access token\",\n ExpiresAt = \"2020-03-14\",\n AccessLevel = \"developer\",\n Scopes = new[]\n {\n \"api\",\n },\n });\n\n var exampleGroupVariable = new GitLab.GroupVariable(\"example\", new()\n {\n Group = \"25\",\n Key = \"gat\",\n Value = example.Token,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewGroupAccessToken(ctx, \"example\", \u0026gitlab.GroupAccessTokenArgs{\n\t\t\tGroup: pulumi.String(\"25\"),\n\t\t\tName: pulumi.String(\"Example project access token\"),\n\t\t\tExpiresAt: pulumi.String(\"2020-03-14\"),\n\t\t\tAccessLevel: pulumi.String(\"developer\"),\n\t\t\tScopes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"api\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewGroupVariable(ctx, \"example\", \u0026gitlab.GroupVariableArgs{\n\t\t\tGroup: pulumi.String(\"25\"),\n\t\t\tKey: pulumi.String(\"gat\"),\n\t\t\tValue: example.Token,\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.gitlab.GroupAccessToken;\nimport com.pulumi.gitlab.GroupAccessTokenArgs;\nimport com.pulumi.gitlab.GroupVariable;\nimport com.pulumi.gitlab.GroupVariableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GroupAccessToken(\"example\", GroupAccessTokenArgs.builder()\n .group(\"25\")\n .name(\"Example project access token\")\n .expiresAt(\"2020-03-14\")\n .accessLevel(\"developer\")\n .scopes(\"api\")\n .build());\n\n var exampleGroupVariable = new GroupVariable(\"exampleGroupVariable\", GroupVariableArgs.builder()\n .group(\"25\")\n .key(\"gat\")\n .value(example.token())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: gitlab:GroupAccessToken\n properties:\n group: '25'\n name: Example project access token\n expiresAt: 2020-03-14\n accessLevel: developer\n scopes:\n - api\n exampleGroupVariable:\n type: gitlab:GroupVariable\n name: example\n properties:\n group: '25'\n key: gat\n value: ${example.token}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nA GitLab Group Access Token can be imported using a key composed of `\u003cgroup-id\u003e:\u003ctoken-id\u003e`, e.g.\n\n```sh\n$ pulumi import gitlab:index/groupAccessToken:GroupAccessToken example \"12345:1\"\n```\n\nATTENTION: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.\n\n", + "description": "The `gitlab.GroupAccessToken` resource allows to manage the lifecycle of a group access token.\n\n\u003e Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/ee/operations/tracing.html)\n\n\u003e Use `rotation_configuration` to automatically rotate tokens instead of using `timestamp()` as timestamp will cause changes with every plan. `pulumi up` must still be run to rotate the token.\n\n\u003e Due to [Automatic reuse detection](https://docs.gitlab.com/ee/api/group_access_tokens.html#automatic-reuse-detection) it's possible that a new Group Access Token will immediately be revoked. Check if an old process using the old token is running if this happens.\n\n**Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst example = new gitlab.GroupAccessToken(\"example\", {\n group: \"25\",\n name: \"Example group access token\",\n expiresAt: \"2020-03-14\",\n accessLevel: \"developer\",\n scopes: [\"api\"],\n});\nconst exampleGroupVariable = new gitlab.GroupVariable(\"example\", {\n group: \"25\",\n key: \"gat\",\n value: example.token,\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nexample = gitlab.GroupAccessToken(\"example\",\n group=\"25\",\n name=\"Example group access token\",\n expires_at=\"2020-03-14\",\n access_level=\"developer\",\n scopes=[\"api\"])\nexample_group_variable = gitlab.GroupVariable(\"example\",\n group=\"25\",\n key=\"gat\",\n value=example.token)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = new GitLab.GroupAccessToken(\"example\", new()\n {\n Group = \"25\",\n Name = \"Example group access token\",\n ExpiresAt = \"2020-03-14\",\n AccessLevel = \"developer\",\n Scopes = new[]\n {\n \"api\",\n },\n });\n\n var exampleGroupVariable = new GitLab.GroupVariable(\"example\", new()\n {\n Group = \"25\",\n Key = \"gat\",\n Value = example.Token,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewGroupAccessToken(ctx, \"example\", \u0026gitlab.GroupAccessTokenArgs{\n\t\t\tGroup: pulumi.String(\"25\"),\n\t\t\tName: pulumi.String(\"Example group access token\"),\n\t\t\tExpiresAt: pulumi.String(\"2020-03-14\"),\n\t\t\tAccessLevel: pulumi.String(\"developer\"),\n\t\t\tScopes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"api\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewGroupVariable(ctx, \"example\", \u0026gitlab.GroupVariableArgs{\n\t\t\tGroup: pulumi.String(\"25\"),\n\t\t\tKey: pulumi.String(\"gat\"),\n\t\t\tValue: example.Token,\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.gitlab.GroupAccessToken;\nimport com.pulumi.gitlab.GroupAccessTokenArgs;\nimport com.pulumi.gitlab.GroupVariable;\nimport com.pulumi.gitlab.GroupVariableArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var example = new GroupAccessToken(\"example\", GroupAccessTokenArgs.builder()\n .group(\"25\")\n .name(\"Example group access token\")\n .expiresAt(\"2020-03-14\")\n .accessLevel(\"developer\")\n .scopes(\"api\")\n .build());\n\n var exampleGroupVariable = new GroupVariable(\"exampleGroupVariable\", GroupVariableArgs.builder()\n .group(\"25\")\n .key(\"gat\")\n .value(example.token())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n example:\n type: gitlab:GroupAccessToken\n properties:\n group: '25'\n name: Example group access token\n expiresAt: 2020-03-14\n accessLevel: developer\n scopes:\n - api\n exampleGroupVariable:\n type: gitlab:GroupVariable\n name: example\n properties:\n group: '25'\n key: gat\n value: ${example.token}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nA GitLab Group Access Token can be imported using a key composed of `\u003cgroup-id\u003e:\u003ctoken-id\u003e`, e.g.\n\n```sh\n$ pulumi import gitlab:index/groupAccessToken:GroupAccessToken example \"12345:1\"\n```\n\nATTENTION: the `token` resource attribute is not available for imported resources as this information cannot be read from the GitLab API.\n\n", "properties": { "accessLevel": { "type": "string", @@ -10556,6 +10578,69 @@ "type": "object" } }, + "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment": { + "description": "The `gitlab.GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group.\n\n**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\n// This resource can be used to attach a security policy to a pre-existing group\nconst foo = new gitlab.GroupSecurityPolicyAttachment(\"foo\", {\n group: \"1234\",\n policyProject: \"4567\",\n});\n// Or you can use Terraform to create a new project, add a policy to that project,\n// then attach that policy project to other groups.\nconst my_policy_project = new gitlab.Project(\"my-policy-project\", {name: \"security-policy-project\"});\nconst policy_yml = new gitlab.RepositoryFile(\"policy-yml\", {\n project: my_policy_project.id,\n filePath: \".gitlab/security-policies/my-policy.yml\",\n branch: \"master\",\n encoding: \"text\",\n content: `---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`,\n});\nconst my_policy = new gitlab.GroupSecurityPolicyAttachment(\"my-policy\", {\n group: \"1234\",\n policyProject: my_policy_project.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\n# This resource can be used to attach a security policy to a pre-existing group\nfoo = gitlab.GroupSecurityPolicyAttachment(\"foo\",\n group=\"1234\",\n policy_project=\"4567\")\n# Or you can use Terraform to create a new project, add a policy to that project,\n# then attach that policy project to other groups.\nmy_policy_project = gitlab.Project(\"my-policy-project\", name=\"security-policy-project\")\npolicy_yml = gitlab.RepositoryFile(\"policy-yml\",\n project=my_policy_project.id,\n file_path=\".gitlab/security-policies/my-policy.yml\",\n branch=\"master\",\n encoding=\"text\",\n content=\"\"\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\"\"\")\nmy_policy = gitlab.GroupSecurityPolicyAttachment(\"my-policy\",\n group=\"1234\",\n policy_project=my_policy_project.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // This resource can be used to attach a security policy to a pre-existing group\n var foo = new GitLab.GroupSecurityPolicyAttachment(\"foo\", new()\n {\n Group = \"1234\",\n PolicyProject = \"4567\",\n });\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other groups.\n var my_policy_project = new GitLab.Project(\"my-policy-project\", new()\n {\n Name = \"security-policy-project\",\n });\n\n var policy_yml = new GitLab.RepositoryFile(\"policy-yml\", new()\n {\n Project = my_policy_project.Id,\n FilePath = \".gitlab/security-policies/my-policy.yml\",\n Branch = \"master\",\n Encoding = \"text\",\n Content = @\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\",\n });\n\n var my_policy = new GitLab.GroupSecurityPolicyAttachment(\"my-policy\", new()\n {\n Group = \"1234\",\n PolicyProject = my_policy_project.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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// This resource can be used to attach a security policy to a pre-existing group\n\t\t_, err := gitlab.NewGroupSecurityPolicyAttachment(ctx, \"foo\", \u0026gitlab.GroupSecurityPolicyAttachmentArgs{\n\t\t\tGroup: pulumi.String(\"1234\"),\n\t\t\tPolicyProject: pulumi.String(\"4567\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Or you can use Terraform to create a new project, add a policy to that project,\n\t\t// then attach that policy project to other groups.\n\t\t_, err = gitlab.NewProject(ctx, \"my-policy-project\", \u0026gitlab.ProjectArgs{\n\t\t\tName: pulumi.String(\"security-policy-project\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewRepositoryFile(ctx, \"policy-yml\", \u0026gitlab.RepositoryFileArgs{\n\t\t\tProject: my_policy_project.ID(),\n\t\t\tFilePath: pulumi.String(\".gitlab/security-policies/my-policy.yml\"),\n\t\t\tBranch: pulumi.String(\"master\"),\n\t\t\tEncoding: pulumi.String(\"text\"),\n\t\t\tContent: pulumi.String(`---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewGroupSecurityPolicyAttachment(ctx, \"my-policy\", \u0026gitlab.GroupSecurityPolicyAttachmentArgs{\n\t\t\tGroup: pulumi.String(\"1234\"),\n\t\t\tPolicyProject: my_policy_project.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.gitlab.GroupSecurityPolicyAttachment;\nimport com.pulumi.gitlab.GroupSecurityPolicyAttachmentArgs;\nimport com.pulumi.gitlab.Project;\nimport com.pulumi.gitlab.ProjectArgs;\nimport com.pulumi.gitlab.RepositoryFile;\nimport com.pulumi.gitlab.RepositoryFileArgs;\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 // This resource can be used to attach a security policy to a pre-existing group\n var foo = new GroupSecurityPolicyAttachment(\"foo\", GroupSecurityPolicyAttachmentArgs.builder()\n .group(1234)\n .policyProject(4567)\n .build());\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other groups.\n var my_policy_project = new Project(\"my-policy-project\", ProjectArgs.builder()\n .name(\"security-policy-project\")\n .build());\n\n var policy_yml = new RepositoryFile(\"policy-yml\", RepositoryFileArgs.builder()\n .project(my_policy_project.id())\n .filePath(\".gitlab/security-policies/my-policy.yml\")\n .branch(\"master\")\n .encoding(\"text\")\n .content(\"\"\"\n---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n \"\"\")\n .build());\n\n var my_policy = new GroupSecurityPolicyAttachment(\"my-policy\", GroupSecurityPolicyAttachmentArgs.builder()\n .group(1234)\n .policyProject(my_policy_project.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # This resource can be used to attach a security policy to a pre-existing group\n foo:\n type: gitlab:GroupSecurityPolicyAttachment\n properties:\n group: 1234\n policyProject: 4567\n # Or you can use Terraform to create a new project, add a policy to that project,\n # then attach that policy project to other groups.\n my-policy-project:\n type: gitlab:Project\n properties:\n name: security-policy-project\n policy-yml:\n type: gitlab:RepositoryFile\n properties:\n project: ${[\"my-policy-project\"].id}\n filePath: .gitlab/security-policies/my-policy.yml\n branch: master\n encoding: text\n content: |\n ---\n approval_policy:\n - name: test\n description: test\n enabled: true\n rules:\n - type: any_merge_request\n branch_type: protected\n commits: any\n approval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\n fallback_behavior:\n fail: closed\n actions:\n - type: send_bot_message\n enabled: true\n my-policy:\n type: gitlab:GroupSecurityPolicyAttachment\n properties:\n group: 1234\n policyProject: ${[\"my-policy-project\"].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g.\n\n```sh\n$ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2\n```\n\n", + "properties": { + "group": { + "type": "string", + "description": "The ID or Full Path of the group which will have the security policy project assigned to it.\n" + }, + "groupGraphqlId": { + "type": "string", + "description": "The GraphQL ID of the group to which the security policty project will be attached.\n" + }, + "policyProject": { + "type": "string", + "description": "The ID or Full Path of the security policy project.\n" + }, + "policyProjectGraphqlId": { + "type": "string", + "description": "The GraphQL ID of the security policy project.\n" + } + }, + "required": [ + "group", + "groupGraphqlId", + "policyProject", + "policyProjectGraphqlId" + ], + "inputProperties": { + "group": { + "type": "string", + "description": "The ID or Full Path of the group which will have the security policy project assigned to it.\n" + }, + "policyProject": { + "type": "string", + "description": "The ID or Full Path of the security policy project.\n" + } + }, + "requiredInputs": [ + "group", + "policyProject" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering GroupSecurityPolicyAttachment resources.\n", + "properties": { + "group": { + "type": "string", + "description": "The ID or Full Path of the group which will have the security policy project assigned to it.\n" + }, + "groupGraphqlId": { + "type": "string", + "description": "The GraphQL ID of the group to which the security policty project will be attached.\n" + }, + "policyProject": { + "type": "string", + "description": "The ID or Full Path of the security policy project.\n" + }, + "policyProjectGraphqlId": { + "type": "string", + "description": "The GraphQL ID of the security policy project.\n" + } + }, + "type": "object" + } + }, "gitlab:index/groupShareGroup:GroupShareGroup": { "description": "The `gitlab.GroupShareGroup` resource allows to manage the lifecycle of group shared with another group.\n\n**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/groups.html#share-groups-with-groups)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst test = new gitlab.GroupShareGroup(\"test\", {\n groupId: foo.id,\n shareGroupId: bar.id,\n groupAccess: \"guest\",\n expiresAt: \"2099-01-01\",\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\ntest = gitlab.GroupShareGroup(\"test\",\n group_id=foo[\"id\"],\n share_group_id=bar[\"id\"],\n group_access=\"guest\",\n expires_at=\"2099-01-01\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var test = new GitLab.GroupShareGroup(\"test\", new()\n {\n GroupId = foo.Id,\n ShareGroupId = bar.Id,\n GroupAccess = \"guest\",\n ExpiresAt = \"2099-01-01\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewGroupShareGroup(ctx, \"test\", \u0026gitlab.GroupShareGroupArgs{\n\t\t\tGroupId: pulumi.Any(foo.Id),\n\t\t\tShareGroupId: pulumi.Any(bar.Id),\n\t\t\tGroupAccess: pulumi.String(\"guest\"),\n\t\t\tExpiresAt: pulumi.String(\"2099-01-01\"),\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.gitlab.GroupShareGroup;\nimport com.pulumi.gitlab.GroupShareGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var test = new GroupShareGroup(\"test\", GroupShareGroupArgs.builder()\n .groupId(foo.id())\n .shareGroupId(bar.id())\n .groupAccess(\"guest\")\n .expiresAt(\"2099-01-01\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n test:\n type: gitlab:GroupShareGroup\n properties:\n groupId: ${foo.id}\n shareGroupId: ${bar.id}\n groupAccess: guest\n expiresAt: 2099-01-01\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab group shares can be imported using an id made up of `mainGroupId:shareGroupId`, e.g.\n\n```sh\n$ pulumi import gitlab:index/groupShareGroup:GroupShareGroup test 12345:1337\n```\n\n", "properties": { @@ -16803,11 +16888,23 @@ } }, "gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes": { - "description": "The `gitlab.ProjectJobTokenScopes` resource allows to manage the CI/CD Job Token scopes in a project.\nAny project not within the defined set in this attribute will be removed, which allows this resource to be used as an explicit deny.\n\n\u003e Conflicts with the use of `gitlab.ProjectJobTokenScope` when used on the same project. Use one or the other to ensure the desired state.\n\n**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_job_token_scopes.html)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst allowedSingleProject = new gitlab.ProjectJobTokenScopes(\"allowed_single_project\", {\n projectId: 111,\n targetProjectIds: [123],\n});\nconst allowedMultipleProject = new gitlab.ProjectJobTokenScopes(\"allowed_multiple_project\", {\n projectId: 111,\n targetProjectIds: [\n 123,\n 456,\n 789,\n ],\n});\n// This will remove all job token scopes, even if added outside of TF.\nconst explicitDeny = new gitlab.ProjectJobTokenScopes(\"explicit_deny\", {\n projectId: 111,\n targetProjectIds: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nallowed_single_project = gitlab.ProjectJobTokenScopes(\"allowed_single_project\",\n project_id=111,\n target_project_ids=[123])\nallowed_multiple_project = gitlab.ProjectJobTokenScopes(\"allowed_multiple_project\",\n project_id=111,\n target_project_ids=[\n 123,\n 456,\n 789,\n ])\n# This will remove all job token scopes, even if added outside of TF.\nexplicit_deny = gitlab.ProjectJobTokenScopes(\"explicit_deny\",\n project_id=111,\n target_project_ids=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var allowedSingleProject = new GitLab.ProjectJobTokenScopes(\"allowed_single_project\", new()\n {\n ProjectId = 111,\n TargetProjectIds = new[]\n {\n 123,\n },\n });\n\n var allowedMultipleProject = new GitLab.ProjectJobTokenScopes(\"allowed_multiple_project\", new()\n {\n ProjectId = 111,\n TargetProjectIds = new[]\n {\n 123,\n 456,\n 789,\n },\n });\n\n // This will remove all job token scopes, even if added outside of TF.\n var explicitDeny = new GitLab.ProjectJobTokenScopes(\"explicit_deny\", new()\n {\n ProjectId = 111,\n TargetProjectIds = new[] {},\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewProjectJobTokenScopes(ctx, \"allowed_single_project\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProjectId: pulumi.Int(111),\n\t\t\tTargetProjectIds: pulumi.IntArray{\n\t\t\t\tpulumi.Int(123),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewProjectJobTokenScopes(ctx, \"allowed_multiple_project\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProjectId: pulumi.Int(111),\n\t\t\tTargetProjectIds: pulumi.IntArray{\n\t\t\t\tpulumi.Int(123),\n\t\t\t\tpulumi.Int(456),\n\t\t\t\tpulumi.Int(789),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// This will remove all job token scopes, even if added outside of TF.\n\t\t_, err = gitlab.NewProjectJobTokenScopes(ctx, \"explicit_deny\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProjectId: pulumi.Int(111),\n\t\t\tTargetProjectIds: pulumi.IntArray{},\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.gitlab.ProjectJobTokenScopes;\nimport com.pulumi.gitlab.ProjectJobTokenScopesArgs;\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 allowedSingleProject = new ProjectJobTokenScopes(\"allowedSingleProject\", ProjectJobTokenScopesArgs.builder()\n .projectId(111)\n .targetProjectIds(123)\n .build());\n\n var allowedMultipleProject = new ProjectJobTokenScopes(\"allowedMultipleProject\", ProjectJobTokenScopesArgs.builder()\n .projectId(111)\n .targetProjectIds( \n 123,\n 456,\n 789)\n .build());\n\n // This will remove all job token scopes, even if added outside of TF.\n var explicitDeny = new ProjectJobTokenScopes(\"explicitDeny\", ProjectJobTokenScopesArgs.builder()\n .projectId(111)\n .targetProjectIds()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowedSingleProject:\n type: gitlab:ProjectJobTokenScopes\n name: allowed_single_project\n properties:\n projectId: 111\n targetProjectIds:\n - 123\n allowedMultipleProject:\n type: gitlab:ProjectJobTokenScopes\n name: allowed_multiple_project\n properties:\n projectId: 111\n targetProjectIds:\n - 123\n - 456\n - 789\n # This will remove all job token scopes, even if added outside of TF.\n explicitDeny:\n type: gitlab:ProjectJobTokenScopes\n name: explicit_deny\n properties:\n projectId: 111\n targetProjectIds: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer\n\n```sh\n$ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123\n```\n\n", + "description": "The `gitlab.ProjectJobTokenScopes` resource allows to manage the CI/CD Job Token scopes in a project.\nAny project not within the defined set in this attribute will be removed, which allows this resource to be used as an explicit deny.\n\n\u003e Conflicts with the use of `gitlab.ProjectJobTokenScope` when used on the same project. Use one or the other to ensure the desired state.\n\n**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_job_token_scopes.html)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst allowedSingleProject = new gitlab.ProjectJobTokenScopes(\"allowed_single_project\", {\n project: \"111\",\n targetProjectIds: [123],\n});\nconst allowedMultipleProject = new gitlab.ProjectJobTokenScopes(\"allowed_multiple_project\", {\n project: \"111\",\n targetProjectIds: [\n 123,\n 456,\n 789,\n ],\n});\nconst allowedMultipleGroups = new gitlab.ProjectJobTokenScopes(\"allowed_multiple_groups\", {\n projectId: 111,\n targetProjectIds: [],\n targetGroupIds: [\n 321,\n 654,\n ],\n});\n// This will remove all job token scopes, even if added outside of TF.\nconst explicitDeny = new gitlab.ProjectJobTokenScopes(\"explicit_deny\", {\n project: \"111\",\n targetProjectIds: [],\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nallowed_single_project = gitlab.ProjectJobTokenScopes(\"allowed_single_project\",\n project=\"111\",\n target_project_ids=[123])\nallowed_multiple_project = gitlab.ProjectJobTokenScopes(\"allowed_multiple_project\",\n project=\"111\",\n target_project_ids=[\n 123,\n 456,\n 789,\n ])\nallowed_multiple_groups = gitlab.ProjectJobTokenScopes(\"allowed_multiple_groups\",\n project_id=111,\n target_project_ids=[],\n target_group_ids=[\n 321,\n 654,\n ])\n# This will remove all job token scopes, even if added outside of TF.\nexplicit_deny = gitlab.ProjectJobTokenScopes(\"explicit_deny\",\n project=\"111\",\n target_project_ids=[])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var allowedSingleProject = new GitLab.ProjectJobTokenScopes(\"allowed_single_project\", new()\n {\n Project = \"111\",\n TargetProjectIds = new[]\n {\n 123,\n },\n });\n\n var allowedMultipleProject = new GitLab.ProjectJobTokenScopes(\"allowed_multiple_project\", new()\n {\n Project = \"111\",\n TargetProjectIds = new[]\n {\n 123,\n 456,\n 789,\n },\n });\n\n var allowedMultipleGroups = new GitLab.ProjectJobTokenScopes(\"allowed_multiple_groups\", new()\n {\n ProjectId = 111,\n TargetProjectIds = new[] {},\n TargetGroupIds = new[]\n {\n 321,\n 654,\n },\n });\n\n // This will remove all job token scopes, even if added outside of TF.\n var explicitDeny = new GitLab.ProjectJobTokenScopes(\"explicit_deny\", new()\n {\n Project = \"111\",\n TargetProjectIds = new[] {},\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewProjectJobTokenScopes(ctx, \"allowed_single_project\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProject: pulumi.String(\"111\"),\n\t\t\tTargetProjectIds: pulumi.IntArray{\n\t\t\t\tpulumi.Int(123),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewProjectJobTokenScopes(ctx, \"allowed_multiple_project\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProject: pulumi.String(\"111\"),\n\t\t\tTargetProjectIds: pulumi.IntArray{\n\t\t\t\tpulumi.Int(123),\n\t\t\t\tpulumi.Int(456),\n\t\t\t\tpulumi.Int(789),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewProjectJobTokenScopes(ctx, \"allowed_multiple_groups\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProjectId: pulumi.Int(111),\n\t\t\tTargetProjectIds: pulumi.IntArray{},\n\t\t\tTargetGroupIds: pulumi.IntArray{\n\t\t\t\tpulumi.Int(321),\n\t\t\t\tpulumi.Int(654),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// This will remove all job token scopes, even if added outside of TF.\n\t\t_, err = gitlab.NewProjectJobTokenScopes(ctx, \"explicit_deny\", \u0026gitlab.ProjectJobTokenScopesArgs{\n\t\t\tProject: pulumi.String(\"111\"),\n\t\t\tTargetProjectIds: pulumi.IntArray{},\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.gitlab.ProjectJobTokenScopes;\nimport com.pulumi.gitlab.ProjectJobTokenScopesArgs;\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 allowedSingleProject = new ProjectJobTokenScopes(\"allowedSingleProject\", ProjectJobTokenScopesArgs.builder()\n .project(\"111\")\n .targetProjectIds(123)\n .build());\n\n var allowedMultipleProject = new ProjectJobTokenScopes(\"allowedMultipleProject\", ProjectJobTokenScopesArgs.builder()\n .project(\"111\")\n .targetProjectIds( \n 123,\n 456,\n 789)\n .build());\n\n var allowedMultipleGroups = new ProjectJobTokenScopes(\"allowedMultipleGroups\", ProjectJobTokenScopesArgs.builder()\n .projectId(111)\n .targetProjectIds()\n .targetGroupIds( \n 321,\n 654)\n .build());\n\n // This will remove all job token scopes, even if added outside of TF.\n var explicitDeny = new ProjectJobTokenScopes(\"explicitDeny\", ProjectJobTokenScopesArgs.builder()\n .project(\"111\")\n .targetProjectIds()\n .build());\n\n }\n}\n```\n```yaml\nresources:\n allowedSingleProject:\n type: gitlab:ProjectJobTokenScopes\n name: allowed_single_project\n properties:\n project: '111'\n targetProjectIds:\n - 123\n allowedMultipleProject:\n type: gitlab:ProjectJobTokenScopes\n name: allowed_multiple_project\n properties:\n project: '111'\n targetProjectIds:\n - 123\n - 456\n - 789\n allowedMultipleGroups:\n type: gitlab:ProjectJobTokenScopes\n name: allowed_multiple_groups\n properties:\n projectId: 111\n targetProjectIds: []\n targetGroupIds:\n - 321\n - 654\n # This will remove all job token scopes, even if added outside of TF.\n explicitDeny:\n type: gitlab:ProjectJobTokenScopes\n name: explicit_deny\n properties:\n project: '111'\n targetProjectIds: []\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab project job token scopes can be imported using an id made up of just the `project_id`\n\n```sh\n$ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123\n```\n\n", "properties": { + "project": { + "type": "string", + "description": "The ID or full path of the project.\n" + }, "projectId": { "type": "integer", - "description": "The ID of the project.\n" + "description": "The ID of the project.\n", + "deprecationMessage": "`project_id` has been deprecated. Use `project` instead." + }, + "targetGroupIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A set of group IDs that are in the CI/CD job token inbound allowlist.\n" }, "targetProjectIds": { "type": "array", @@ -16818,13 +16915,27 @@ } }, "required": [ + "project", "projectId", + "targetGroupIds", "targetProjectIds" ], "inputProperties": { + "project": { + "type": "string", + "description": "The ID or full path of the project.\n" + }, "projectId": { "type": "integer", - "description": "The ID of the project.\n" + "description": "The ID of the project.\n", + "deprecationMessage": "`project_id` has been deprecated. Use `project` instead." + }, + "targetGroupIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A set of group IDs that are in the CI/CD job token inbound allowlist.\n" }, "targetProjectIds": { "type": "array", @@ -16834,16 +16945,24 @@ "description": "A set of project IDs that are in the CI/CD job token inbound allowlist.\n" } }, - "requiredInputs": [ - "projectId", - "targetProjectIds" - ], "stateInputs": { "description": "Input properties used for looking up and filtering ProjectJobTokenScopes resources.\n", "properties": { + "project": { + "type": "string", + "description": "The ID or full path of the project.\n" + }, "projectId": { "type": "integer", - "description": "The ID of the project.\n" + "description": "The ID of the project.\n", + "deprecationMessage": "`project_id` has been deprecated. Use `project` instead." + }, + "targetGroupIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A set of group IDs that are in the CI/CD job token inbound allowlist.\n" }, "targetProjectIds": { "type": "array", @@ -17966,7 +18085,7 @@ } }, "gitlab:index/projectSecurityPolicyAttachment:ProjectSecurityPolicyAttachment": { - "description": "The `gitlab.ProjectSecurityPolicyAttachment` resource allows to attach a security policy project to a project.\n\n**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\n// This resource can be used to attach a security policy to a pre-existing project\nconst foo = new gitlab.ProjectSecurityPolicyAttachment(\"foo\", {\n project: \"1234\",\n policyProject: \"4567\",\n});\n// Or you can use Terraform to create a new project, add a policy to that project,\n// then attach that policy project to other projects.\nconst my_policy_project = new gitlab.Project(\"my-policy-project\", {name: \"security-policy-project\"});\nconst policy_yml = new gitlab.RepositoryFile(\"policy-yml\", {\n project: my_policy_project.id,\n filePath: \".gitlab/security-policies/my-policy.yml\",\n branch: \"master\",\n encoding: \"text\",\n content: `---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`,\n});\nconst my_policy = new gitlab.index.ProjectSecurityPolicy(\"my-policy\", {\n project: 1234,\n policyProject: my_policy_project.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\n# This resource can be used to attach a security policy to a pre-existing project\nfoo = gitlab.ProjectSecurityPolicyAttachment(\"foo\",\n project=\"1234\",\n policy_project=\"4567\")\n# Or you can use Terraform to create a new project, add a policy to that project,\n# then attach that policy project to other projects.\nmy_policy_project = gitlab.Project(\"my-policy-project\", name=\"security-policy-project\")\npolicy_yml = gitlab.RepositoryFile(\"policy-yml\",\n project=my_policy_project.id,\n file_path=\".gitlab/security-policies/my-policy.yml\",\n branch=\"master\",\n encoding=\"text\",\n content=\"\"\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\"\"\")\nmy_policy = gitlab.index.ProjectSecurityPolicy(\"my-policy\",\n project=1234,\n policy_project=my_policy_project.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // This resource can be used to attach a security policy to a pre-existing project\n var foo = new GitLab.ProjectSecurityPolicyAttachment(\"foo\", new()\n {\n Project = \"1234\",\n PolicyProject = \"4567\",\n });\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other projects.\n var my_policy_project = new GitLab.Project(\"my-policy-project\", new()\n {\n Name = \"security-policy-project\",\n });\n\n var policy_yml = new GitLab.RepositoryFile(\"policy-yml\", new()\n {\n Project = my_policy_project.Id,\n FilePath = \".gitlab/security-policies/my-policy.yml\",\n Branch = \"master\",\n Encoding = \"text\",\n Content = @\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\",\n });\n\n var my_policy = new GitLab.Index.ProjectSecurityPolicy(\"my-policy\", new()\n {\n Project = 1234,\n PolicyProject = my_policy_project.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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// This resource can be used to attach a security policy to a pre-existing project\n\t\t_, err := gitlab.NewProjectSecurityPolicyAttachment(ctx, \"foo\", \u0026gitlab.ProjectSecurityPolicyAttachmentArgs{\n\t\t\tProject: pulumi.String(\"1234\"),\n\t\t\tPolicyProject: pulumi.String(\"4567\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Or you can use Terraform to create a new project, add a policy to that project,\n\t\t// then attach that policy project to other projects.\n\t\t_, err = gitlab.NewProject(ctx, \"my-policy-project\", \u0026gitlab.ProjectArgs{\n\t\t\tName: pulumi.String(\"security-policy-project\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewRepositoryFile(ctx, \"policy-yml\", \u0026gitlab.RepositoryFileArgs{\n\t\t\tProject: my_policy_project.ID(),\n\t\t\tFilePath: pulumi.String(\".gitlab/security-policies/my-policy.yml\"),\n\t\t\tBranch: pulumi.String(\"master\"),\n\t\t\tEncoding: pulumi.String(\"text\"),\n\t\t\tContent: pulumi.String(`---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewProjectSecurityPolicy(ctx, \"my-policy\", \u0026gitlab.ProjectSecurityPolicyArgs{\n\t\t\tProject: 1234,\n\t\t\tPolicyProject: my_policy_project.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.gitlab.ProjectSecurityPolicyAttachment;\nimport com.pulumi.gitlab.ProjectSecurityPolicyAttachmentArgs;\nimport com.pulumi.gitlab.Project;\nimport com.pulumi.gitlab.ProjectArgs;\nimport com.pulumi.gitlab.RepositoryFile;\nimport com.pulumi.gitlab.RepositoryFileArgs;\nimport com.pulumi.gitlab.projectSecurityPolicy;\nimport com.pulumi.gitlab.ProjectSecurityPolicyArgs;\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 // This resource can be used to attach a security policy to a pre-existing project\n var foo = new ProjectSecurityPolicyAttachment(\"foo\", ProjectSecurityPolicyAttachmentArgs.builder()\n .project(1234)\n .policyProject(4567)\n .build());\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other projects.\n var my_policy_project = new Project(\"my-policy-project\", ProjectArgs.builder()\n .name(\"security-policy-project\")\n .build());\n\n var policy_yml = new RepositoryFile(\"policy-yml\", RepositoryFileArgs.builder()\n .project(my_policy_project.id())\n .filePath(\".gitlab/security-policies/my-policy.yml\")\n .branch(\"master\")\n .encoding(\"text\")\n .content(\"\"\"\n---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n \"\"\")\n .build());\n\n var my_policy = new ProjectSecurityPolicy(\"my-policy\", ProjectSecurityPolicyArgs.builder()\n .project(1234)\n .policyProject(my_policy_project.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # This resource can be used to attach a security policy to a pre-existing project\n foo:\n type: gitlab:ProjectSecurityPolicyAttachment\n properties:\n project: 1234\n policyProject: 4567\n # Or you can use Terraform to create a new project, add a policy to that project,\n # then attach that policy project to other projects.\n my-policy-project:\n type: gitlab:Project\n properties:\n name: security-policy-project\n policy-yml:\n type: gitlab:RepositoryFile\n properties:\n project: ${[\"my-policy-project\"].id}\n filePath: .gitlab/security-policies/my-policy.yml\n branch: master\n encoding: text\n content: |\n ---\n approval_policy:\n - name: test\n description: test\n enabled: true\n rules:\n - type: any_merge_request\n branch_type: protected\n commits: any\n approval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\n fallback_behavior:\n fail: closed\n actions:\n - type: send_bot_message\n enabled: true\n my-policy:\n type: gitlab:projectSecurityPolicy\n properties:\n project: 1234\n policyProject: ${[\"my-policy-project\"].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab project security policy attachments can be imported using an id made up of `project:policy_project_id` where the policy project ID is the project ID of the policy project, e.g.\n\n```sh\n$ pulumi import gitlab:index/projectSecurityPolicyAttachment:ProjectSecurityPolicyAttachment foo 1:2\n```\n\n", + "description": "The `gitlab.ProjectSecurityPolicyAttachment` resource allows to attach a security policy project to a project.\n\n**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\n// This resource can be used to attach a security policy to a pre-existing project\nconst foo = new gitlab.ProjectSecurityPolicyAttachment(\"foo\", {\n project: \"1234\",\n policyProject: \"4567\",\n});\n// Or you can use Terraform to create a new project, add a policy to that project,\n// then attach that policy project to other projects.\nconst my_policy_project = new gitlab.Project(\"my-policy-project\", {name: \"security-policy-project\"});\nconst policy_yml = new gitlab.RepositoryFile(\"policy-yml\", {\n project: my_policy_project.id,\n filePath: \".gitlab/security-policies/my-policy.yml\",\n branch: \"master\",\n encoding: \"text\",\n content: `---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`,\n});\nconst my_policy = new gitlab.ProjectSecurityPolicyAttachment(\"my-policy\", {\n project: \"1234\",\n policyProject: my_policy_project.id,\n});\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\n# This resource can be used to attach a security policy to a pre-existing project\nfoo = gitlab.ProjectSecurityPolicyAttachment(\"foo\",\n project=\"1234\",\n policy_project=\"4567\")\n# Or you can use Terraform to create a new project, add a policy to that project,\n# then attach that policy project to other projects.\nmy_policy_project = gitlab.Project(\"my-policy-project\", name=\"security-policy-project\")\npolicy_yml = gitlab.RepositoryFile(\"policy-yml\",\n project=my_policy_project.id,\n file_path=\".gitlab/security-policies/my-policy.yml\",\n branch=\"master\",\n encoding=\"text\",\n content=\"\"\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\"\"\")\nmy_policy = gitlab.ProjectSecurityPolicyAttachment(\"my-policy\",\n project=\"1234\",\n policy_project=my_policy_project.id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // This resource can be used to attach a security policy to a pre-existing project\n var foo = new GitLab.ProjectSecurityPolicyAttachment(\"foo\", new()\n {\n Project = \"1234\",\n PolicyProject = \"4567\",\n });\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other projects.\n var my_policy_project = new GitLab.Project(\"my-policy-project\", new()\n {\n Name = \"security-policy-project\",\n });\n\n var policy_yml = new GitLab.RepositoryFile(\"policy-yml\", new()\n {\n Project = my_policy_project.Id,\n FilePath = \".gitlab/security-policies/my-policy.yml\",\n Branch = \"master\",\n Encoding = \"text\",\n Content = @\"---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n\",\n });\n\n var my_policy = new GitLab.ProjectSecurityPolicyAttachment(\"my-policy\", new()\n {\n Project = \"1234\",\n PolicyProject = my_policy_project.Id,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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// This resource can be used to attach a security policy to a pre-existing project\n\t\t_, err := gitlab.NewProjectSecurityPolicyAttachment(ctx, \"foo\", \u0026gitlab.ProjectSecurityPolicyAttachmentArgs{\n\t\t\tProject: pulumi.String(\"1234\"),\n\t\t\tPolicyProject: pulumi.String(\"4567\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Or you can use Terraform to create a new project, add a policy to that project,\n\t\t// then attach that policy project to other projects.\n\t\t_, err = gitlab.NewProject(ctx, \"my-policy-project\", \u0026gitlab.ProjectArgs{\n\t\t\tName: pulumi.String(\"security-policy-project\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewRepositoryFile(ctx, \"policy-yml\", \u0026gitlab.RepositoryFileArgs{\n\t\t\tProject: my_policy_project.ID(),\n\t\t\tFilePath: pulumi.String(\".gitlab/security-policies/my-policy.yml\"),\n\t\t\tBranch: pulumi.String(\"master\"),\n\t\t\tEncoding: pulumi.String(\"text\"),\n\t\t\tContent: pulumi.String(`---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n`),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.NewProjectSecurityPolicyAttachment(ctx, \"my-policy\", \u0026gitlab.ProjectSecurityPolicyAttachmentArgs{\n\t\t\tProject: pulumi.String(\"1234\"),\n\t\t\tPolicyProject: my_policy_project.ID(),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.gitlab.ProjectSecurityPolicyAttachment;\nimport com.pulumi.gitlab.ProjectSecurityPolicyAttachmentArgs;\nimport com.pulumi.gitlab.Project;\nimport com.pulumi.gitlab.ProjectArgs;\nimport com.pulumi.gitlab.RepositoryFile;\nimport com.pulumi.gitlab.RepositoryFileArgs;\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 // This resource can be used to attach a security policy to a pre-existing project\n var foo = new ProjectSecurityPolicyAttachment(\"foo\", ProjectSecurityPolicyAttachmentArgs.builder()\n .project(1234)\n .policyProject(4567)\n .build());\n\n // Or you can use Terraform to create a new project, add a policy to that project,\n // then attach that policy project to other projects.\n var my_policy_project = new Project(\"my-policy-project\", ProjectArgs.builder()\n .name(\"security-policy-project\")\n .build());\n\n var policy_yml = new RepositoryFile(\"policy-yml\", RepositoryFileArgs.builder()\n .project(my_policy_project.id())\n .filePath(\".gitlab/security-policies/my-policy.yml\")\n .branch(\"master\")\n .encoding(\"text\")\n .content(\"\"\"\n---\napproval_policy:\n- name: test\ndescription: test\nenabled: true\nrules:\n- type: any_merge_request\n branch_type: protected\n commits: any\napproval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\nfallback_behavior:\n fail: closed\nactions:\n- type: send_bot_message\n enabled: true\n \"\"\")\n .build());\n\n var my_policy = new ProjectSecurityPolicyAttachment(\"my-policy\", ProjectSecurityPolicyAttachmentArgs.builder()\n .project(1234)\n .policyProject(my_policy_project.id())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # This resource can be used to attach a security policy to a pre-existing project\n foo:\n type: gitlab:ProjectSecurityPolicyAttachment\n properties:\n project: 1234\n policyProject: 4567\n # Or you can use Terraform to create a new project, add a policy to that project,\n # then attach that policy project to other projects.\n my-policy-project:\n type: gitlab:Project\n properties:\n name: security-policy-project\n policy-yml:\n type: gitlab:RepositoryFile\n properties:\n project: ${[\"my-policy-project\"].id}\n filePath: .gitlab/security-policies/my-policy.yml\n branch: master\n encoding: text\n content: |\n ---\n approval_policy:\n - name: test\n description: test\n enabled: true\n rules:\n - type: any_merge_request\n branch_type: protected\n commits: any\n approval_settings:\n block_branch_modification: true\n prevent_pushing_and_force_pushing: true\n prevent_approval_by_author: true\n prevent_approval_by_commit_author: true\n remove_approvals_with_new_commit: true\n require_password_to_approve: false\n fallback_behavior:\n fail: closed\n actions:\n - type: send_bot_message\n enabled: true\n my-policy:\n type: gitlab:ProjectSecurityPolicyAttachment\n properties:\n project: 1234\n policyProject: ${[\"my-policy-project\"].id}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\nGitLab project security policy attachments can be imported using an id made up of `project:policy_project_id` where the policy project ID is the project ID of the policy project, e.g.\n\n```sh\n$ pulumi import gitlab:index/projectSecurityPolicyAttachment:ProjectSecurityPolicyAttachment foo 1:2\n```\n\n", "properties": { "policyProject": { "type": "string", @@ -21817,6 +21936,54 @@ "type": "object" } }, + "gitlab:index/getGroupIds:getGroupIds": { + "description": "The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group.\n\n**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst newGroup = new gitlab.Group(\"new_group\", {});\n// use group IDs to get additional information, such as the GraphQL ID\n// for other resources\nconst foo = gitlab.getGroupIds({\n group: \"gitlab_group.new_group.id\",\n});\nexport const graphQLId = foo.then(foo =\u003e foo.groupGraphqlId);\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nnew_group = gitlab.Group(\"new_group\")\n# use group IDs to get additional information, such as the GraphQL ID\n# for other resources\nfoo = gitlab.get_group_ids(group=\"gitlab_group.new_group.id\")\npulumi.export(\"graphQLId\", foo.group_graphql_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var newGroup = new GitLab.Group(\"new_group\");\n\n // use group IDs to get additional information, such as the GraphQL ID\n // for other resources\n var foo = GitLab.GetGroupIds.Invoke(new()\n {\n Group = \"gitlab_group.new_group.id\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"graphQLId\"] = foo.Apply(getGroupIdsResult =\u003e getGroupIdsResult.GroupGraphqlId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewGroup(ctx, \"new_group\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// use group IDs to get additional information, such as the GraphQL ID\n\t\t// for other resources\n\t\tfoo, err := gitlab.GetGroupIds(ctx, \u0026gitlab.GetGroupIdsArgs{\n\t\t\tGroup: \"gitlab_group.new_group.id\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"graphQLId\", foo.GroupGraphqlId)\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.gitlab.Group;\nimport com.pulumi.gitlab.GitlabFunctions;\nimport com.pulumi.gitlab.inputs.GetGroupIdsArgs;\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 newGroup = new Group(\"newGroup\");\n\n // use group IDs to get additional information, such as the GraphQL ID\n // for other resources\n final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()\n .group(\"gitlab_group.new_group.id\")\n .build());\n\n ctx.export(\"graphQLId\", foo.applyValue(getGroupIdsResult -\u003e getGroupIdsResult.groupGraphqlId()));\n }\n}\n```\n```yaml\nresources:\n newGroup:\n type: gitlab:Group\n name: new_group\nvariables:\n # use group IDs to get additional information, such as the GraphQL ID\n # // for other resources\n foo:\n fn::invoke:\n Function: gitlab:getGroupIds\n Arguments:\n group: gitlab_group.new_group.id\noutputs:\n graphQLId: ${foo.groupGraphqlId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getGroupIds.\n", + "properties": { + "group": { + "type": "string", + "description": "The ID or URL-encoded path of the group.\n" + } + }, + "type": "object", + "required": [ + "group" + ] + }, + "outputs": { + "description": "A collection of values returned by getGroupIds.\n", + "properties": { + "group": { + "description": "The ID or URL-encoded path of the group.\n", + "type": "string" + }, + "groupFullPath": { + "description": "The full path of the group.\n", + "type": "string" + }, + "groupGraphqlId": { + "description": "The GraphQL ID of the group.\n", + "type": "string" + }, + "groupId": { + "description": "The ID of the group.\n", + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "group", + "groupFullPath", + "groupGraphqlId", + "groupId", + "id" + ], + "type": "object" + } + }, "gitlab:index/getGroupMembership:getGroupMembership": { "description": "The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path.\n\n**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project)\n\n", "inputs": { @@ -22962,6 +23129,54 @@ "type": "object" } }, + "gitlab:index/getProjectIds:getProjectIds": { + "description": "The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project.\n\n**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst newProject = new gitlab.Project(\"new_project\", {});\n// use project IDs to get additional information, such as the GraphQL ID\n// for other resources\nconst foo = gitlab.getProjectIds({\n project: \"gitlab_project.new_project.id\",\n});\nexport const graphQLId = foo.then(foo =\u003e foo.projectGraphqlId);\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nnew_project = gitlab.Project(\"new_project\")\n# use project IDs to get additional information, such as the GraphQL ID\n# for other resources\nfoo = gitlab.get_project_ids(project=\"gitlab_project.new_project.id\")\npulumi.export(\"graphQLId\", foo.project_graphql_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var newProject = new GitLab.Project(\"new_project\");\n\n // use project IDs to get additional information, such as the GraphQL ID\n // for other resources\n var foo = GitLab.GetProjectIds.Invoke(new()\n {\n Project = \"gitlab_project.new_project.id\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"graphQLId\"] = foo.Apply(getProjectIdsResult =\u003e getProjectIdsResult.ProjectGraphqlId),\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\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 := gitlab.NewProject(ctx, \"new_project\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// use project IDs to get additional information, such as the GraphQL ID\n\t\t// for other resources\n\t\tfoo, err := gitlab.GetProjectIds(ctx, \u0026gitlab.GetProjectIdsArgs{\n\t\t\tProject: \"gitlab_project.new_project.id\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"graphQLId\", foo.ProjectGraphqlId)\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.gitlab.Project;\nimport com.pulumi.gitlab.GitlabFunctions;\nimport com.pulumi.gitlab.inputs.GetProjectIdsArgs;\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 newProject = new Project(\"newProject\");\n\n // use project IDs to get additional information, such as the GraphQL ID\n // for other resources\n final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()\n .project(\"gitlab_project.new_project.id\")\n .build());\n\n ctx.export(\"graphQLId\", foo.applyValue(getProjectIdsResult -\u003e getProjectIdsResult.projectGraphqlId()));\n }\n}\n```\n```yaml\nresources:\n newProject:\n type: gitlab:Project\n name: new_project\nvariables:\n # use project IDs to get additional information, such as the GraphQL ID\n # // for other resources\n foo:\n fn::invoke:\n Function: gitlab:getProjectIds\n Arguments:\n project: gitlab_project.new_project.id\noutputs:\n graphQLId: ${foo.projectGraphqlId}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "inputs": { + "description": "A collection of arguments for invoking getProjectIds.\n", + "properties": { + "project": { + "type": "string", + "description": "The ID or URL-encoded path of the project.\n" + } + }, + "type": "object", + "required": [ + "project" + ] + }, + "outputs": { + "description": "A collection of values returned by getProjectIds.\n", + "properties": { + "id": { + "type": "string" + }, + "project": { + "description": "The ID or URL-encoded path of the project.\n", + "type": "string" + }, + "projectFullPath": { + "description": "The full path of the project.\n", + "type": "string" + }, + "projectGraphqlId": { + "description": "The GraphQL ID of the project.\n", + "type": "string" + }, + "projectId": { + "description": "The ID of the project.\n", + "type": "string" + } + }, + "required": [ + "id", + "project", + "projectFullPath", + "projectGraphqlId", + "projectId" + ], + "type": "object" + } + }, "gitlab:index/getProjectIssue:getProjectIssue": { "description": "The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project.\n\n**Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/issues.html)\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as gitlab from \"@pulumi/gitlab\";\n\nconst foo = gitlab.getProject({\n pathWithNamespace: \"foo/bar/baz\",\n});\nconst welcomeIssue = foo.then(foo =\u003e gitlab.getProjectIssue({\n project: foo.id,\n iid: 1,\n}));\nexport const welcomeIssueWebUrl = webUrl;\n```\n```python\nimport pulumi\nimport pulumi_gitlab as gitlab\n\nfoo = gitlab.get_project(path_with_namespace=\"foo/bar/baz\")\nwelcome_issue = gitlab.get_project_issue(project=foo.id,\n iid=1)\npulumi.export(\"welcomeIssueWebUrl\", web_url)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing GitLab = Pulumi.GitLab;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var foo = GitLab.GetProject.Invoke(new()\n {\n PathWithNamespace = \"foo/bar/baz\",\n });\n\n var welcomeIssue = GitLab.GetProjectIssue.Invoke(new()\n {\n Project = foo.Apply(getProjectResult =\u003e getProjectResult.Id),\n Iid = 1,\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"welcomeIssueWebUrl\"] = webUrl,\n };\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tfoo, err := gitlab.LookupProject(ctx, \u0026gitlab.LookupProjectArgs{\n\t\t\tPathWithNamespace: pulumi.StringRef(\"foo/bar/baz\"),\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = gitlab.LookupProjectIssue(ctx, \u0026gitlab.LookupProjectIssueArgs{\n\t\t\tProject: foo.Id,\n\t\t\tIid: 1,\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"welcomeIssueWebUrl\", webUrl)\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.gitlab.GitlabFunctions;\nimport com.pulumi.gitlab.inputs.GetProjectArgs;\nimport com.pulumi.gitlab.inputs.GetProjectIssueArgs;\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 foo = GitlabFunctions.getProject(GetProjectArgs.builder()\n .pathWithNamespace(\"foo/bar/baz\")\n .build());\n\n final var welcomeIssue = GitlabFunctions.getProjectIssue(GetProjectIssueArgs.builder()\n .project(foo.applyValue(getProjectResult -\u003e getProjectResult.id()))\n .iid(1)\n .build());\n\n ctx.export(\"welcomeIssueWebUrl\", webUrl);\n }\n}\n```\n```yaml\nvariables:\n foo:\n fn::invoke:\n Function: gitlab:getProject\n Arguments:\n pathWithNamespace: foo/bar/baz\n welcomeIssue:\n fn::invoke:\n Function: gitlab:getProjectIssue\n Arguments:\n project: ${foo.id}\n iid: 1\noutputs:\n welcomeIssueWebUrl: ${webUrl}\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { diff --git a/provider/go.mod b/provider/go.mod index 9a2784ce..61b1d66f 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -1,6 +1,6 @@ module github.com/pulumi/pulumi-gitlab/provider/v8 -go 1.22.5 +go 1.22.6 require ( github.com/pulumi/providertest v0.0.14 @@ -77,7 +77,7 @@ require ( github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.6.0 // indirect + github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.7.0 // indirect github.com/deckarep/golang-set/v2 v2.5.0 // indirect github.com/djherbis/times v1.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect @@ -122,9 +122,9 @@ require ( github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.6 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.20.1 // indirect + github.com/hashicorp/hcl/v2 v2.21.0 // indirect github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-plugin-framework v1.11.0 // indirect @@ -213,13 +213,13 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/xanzy/go-gitlab v0.106.0 // indirect + github.com/xanzy/go-gitlab v0.107.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yuin/goldmark v1.7.4 // indirect - github.com/zclconf/go-cty v1.14.4 // indirect + github.com/zclconf/go-cty v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect @@ -229,17 +229,17 @@ require ( go.uber.org/atomic v1.9.0 // indirect gocloud.dev v0.37.0 // indirect gocloud.dev/secrets/hashivault v0.37.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/tools v0.23.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.169.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -247,7 +247,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect google.golang.org/grpc v1.63.2 // indirect - google.golang.org/protobuf v1.34.0 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/provider/go.sum b/provider/go.sum index b62c914a..cc83a415 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1339,8 +1339,8 @@ github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.6.0 h1:ElfHbk3JZ2g6Ut6L+yUGw13lF9aMWzawYb0DvyBFYiA= -github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.6.0/go.mod h1:VrdwTHG3lgWDw0+gj60LWYPF+/utSLQ9+FN07mfQpu4= +github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.7.0 h1:8aJpqYDOC2wxb03M6v9tRE9ujG+XnTrQkXutIwDptP8= +github.com/dcarbone/terraform-plugin-framework-utils/v3 v3.7.0/go.mod h1:KHpIoNfcEDwupMto6ju9NuKYcw8tlcbtcFhNuonYYeU= github.com/deckarep/golang-set/v2 v2.5.0 h1:hn6cEZtQ0h3J8kFrHR/NrzyOoTnjgW1+FmNJzQ7y/sA= github.com/deckarep/golang-set/v2 v2.5.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= @@ -1651,21 +1651,22 @@ github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= github.com/hashicorp/hc-install v0.6.3/go.mod h1:KamGdbodYzlufbWh4r9NRo8y6GLHWZP2GBtdnms1Ln0= -github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0= -github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA= +github.com/hashicorp/hc-install v0.8.0 h1:LdpZeXkZYMQhoKPCecJHlKvUkQFixN/nvyR1CdfOLjI= +github.com/hashicorp/hc-install v0.8.0/go.mod h1:+MwJYjDfCruSD/udvBmRB22Nlkwwkwf5sAB6uTIhSaU= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= -github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc= -github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4= +github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= +github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 h1:T1Q6ag9tCwun16AW+XK3tAql24P4uTGUMIn1/92WsQQ= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -1692,6 +1693,8 @@ github.com/hashicorp/terraform-plugin-mux v0.16.0/go.mod h1:PF79mAsPc8CpusXPfEVa github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0= github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= github.com/hashicorp/terraform-plugin-test v1.3.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= +github.com/hashicorp/terraform-plugin-testing v1.10.0 h1:2+tmRNhvnfE4Bs8rB6v58S/VpqzGC6RCh9Y8ujdn+aw= +github.com/hashicorp/terraform-plugin-testing v1.10.0/go.mod h1:iWRW3+loP33WMch2P/TEyCxxct/ZEcCGMquSLSCVsrc= github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= @@ -1903,8 +1906,8 @@ github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+q github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -2080,8 +2083,8 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21 github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xanzy/go-gitlab v0.106.0 h1:EDfD03K74cIlQo2EducfiupVrip+Oj02bq9ofw5F8sA= -github.com/xanzy/go-gitlab v0.106.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= +github.com/xanzy/go-gitlab v0.107.0 h1:P2CT9Uy9yN9lJo3FLxpMZ4xj6uWcpnigXsjvqJ6nd2Y= +github.com/xanzy/go-gitlab v0.107.0/go.mod h1:wKNKh3GkYDMOsGmnfuX+ITCmDuSDWFO0G+C4AygL9RY= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= @@ -2109,10 +2112,11 @@ github.com/zclconf/go-cty v1.13.0/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4 github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty v1.14.2/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= -github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI= +github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= +github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= @@ -2183,8 +2187,8 @@ golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= @@ -2200,8 +2204,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2251,8 +2255,8 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2331,8 +2335,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= 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= @@ -2391,8 +2395,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2507,8 +2511,8 @@ golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2529,8 +2533,8 @@ golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= 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= @@ -2552,8 +2556,8 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2636,8 +2640,8 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -3000,8 +3004,8 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/sdk/dotnet/ApplicationSettings.cs b/sdk/dotnet/ApplicationSettings.cs index c56c6e96..cf9ff10d 100644 --- a/sdk/dotnet/ApplicationSettings.cs +++ b/sdk/dotnet/ApplicationSettings.cs @@ -833,6 +833,9 @@ public partial class ApplicationSettings : global::Pulumi.CustomResource [Output("maxSshKeyLifetime")] public Output MaxSshKeyLifetime { get; private set; } = null!; + [Output("maxTerraformStateSizeBytes")] + public Output MaxTerraformStateSizeBytes { get; private set; } = null!; + /// /// A method call is only tracked when it takes longer than the given amount of milliseconds. /// @@ -2505,6 +2508,9 @@ public Input? MailgunSigningKey [Input("maxSshKeyLifetime")] public Input? MaxSshKeyLifetime { get; set; } + [Input("maxTerraformStateSizeBytes")] + public Input? MaxTerraformStateSizeBytes { get; set; } + /// /// A method call is only tracked when it takes longer than the given amount of milliseconds. /// @@ -4195,6 +4201,9 @@ public Input? MailgunSigningKey [Input("maxSshKeyLifetime")] public Input? MaxSshKeyLifetime { get; set; } + [Input("maxTerraformStateSizeBytes")] + public Input? MaxTerraformStateSizeBytes { get; set; } + /// /// A method call is only tracked when it takes longer than the given amount of milliseconds. /// diff --git a/sdk/dotnet/GetGroupIds.cs b/sdk/dotnet/GetGroupIds.cs new file mode 100644 index 00000000..57f68432 --- /dev/null +++ b/sdk/dotnet/GetGroupIds.cs @@ -0,0 +1,153 @@ +// *** 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.GitLab +{ + public static class GetGroupIds + { + /// + /// The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + /// + /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var newGroup = new GitLab.Group("new_group"); + /// + /// // use group IDs to get additional information, such as the GraphQL ID + /// // for other resources + /// var foo = GitLab.GetGroupIds.Invoke(new() + /// { + /// Group = "gitlab_group.new_group.id", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["graphQLId"] = foo.Apply(getGroupIdsResult => getGroupIdsResult.GroupGraphqlId), + /// }; + /// }); + /// ``` + /// + public static Task InvokeAsync(GetGroupIdsArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getGroupIds:getGroupIds", args ?? new GetGroupIdsArgs(), options.WithDefaults()); + + /// + /// The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + /// + /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var newGroup = new GitLab.Group("new_group"); + /// + /// // use group IDs to get additional information, such as the GraphQL ID + /// // for other resources + /// var foo = GitLab.GetGroupIds.Invoke(new() + /// { + /// Group = "gitlab_group.new_group.id", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["graphQLId"] = foo.Apply(getGroupIdsResult => getGroupIdsResult.GroupGraphqlId), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(GetGroupIdsInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getGroupIds:getGroupIds", args ?? new GetGroupIdsInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetGroupIdsArgs : global::Pulumi.InvokeArgs + { + /// + /// The ID or URL-encoded path of the group. + /// + [Input("group", required: true)] + public string Group { get; set; } = null!; + + public GetGroupIdsArgs() + { + } + public static new GetGroupIdsArgs Empty => new GetGroupIdsArgs(); + } + + public sealed class GetGroupIdsInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The ID or URL-encoded path of the group. + /// + [Input("group", required: true)] + public Input Group { get; set; } = null!; + + public GetGroupIdsInvokeArgs() + { + } + public static new GetGroupIdsInvokeArgs Empty => new GetGroupIdsInvokeArgs(); + } + + + [OutputType] + public sealed class GetGroupIdsResult + { + /// + /// The ID or URL-encoded path of the group. + /// + public readonly string Group; + /// + /// The full path of the group. + /// + public readonly string GroupFullPath; + /// + /// The GraphQL ID of the group. + /// + public readonly string GroupGraphqlId; + /// + /// The ID of the group. + /// + public readonly string GroupId; + public readonly string Id; + + [OutputConstructor] + private GetGroupIdsResult( + string group, + + string groupFullPath, + + string groupGraphqlId, + + string groupId, + + string id) + { + Group = group; + GroupFullPath = groupFullPath; + GroupGraphqlId = groupGraphqlId; + GroupId = groupId; + Id = id; + } + } +} diff --git a/sdk/dotnet/GetProjectIds.cs b/sdk/dotnet/GetProjectIds.cs new file mode 100644 index 00000000..10b2836d --- /dev/null +++ b/sdk/dotnet/GetProjectIds.cs @@ -0,0 +1,153 @@ +// *** 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.GitLab +{ + public static class GetProjectIds + { + /// + /// The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + /// + /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var newProject = new GitLab.Project("new_project"); + /// + /// // use project IDs to get additional information, such as the GraphQL ID + /// // for other resources + /// var foo = GitLab.GetProjectIds.Invoke(new() + /// { + /// Project = "gitlab_project.new_project.id", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["graphQLId"] = foo.Apply(getProjectIdsResult => getProjectIdsResult.ProjectGraphqlId), + /// }; + /// }); + /// ``` + /// + public static Task InvokeAsync(GetProjectIdsArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.InvokeAsync("gitlab:index/getProjectIds:getProjectIds", args ?? new GetProjectIdsArgs(), options.WithDefaults()); + + /// + /// The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + /// + /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var newProject = new GitLab.Project("new_project"); + /// + /// // use project IDs to get additional information, such as the GraphQL ID + /// // for other resources + /// var foo = GitLab.GetProjectIds.Invoke(new() + /// { + /// Project = "gitlab_project.new_project.id", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["graphQLId"] = foo.Apply(getProjectIdsResult => getProjectIdsResult.ProjectGraphqlId), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(GetProjectIdsInvokeArgs args, InvokeOptions? options = null) + => global::Pulumi.Deployment.Instance.Invoke("gitlab:index/getProjectIds:getProjectIds", args ?? new GetProjectIdsInvokeArgs(), options.WithDefaults()); + } + + + public sealed class GetProjectIdsArgs : global::Pulumi.InvokeArgs + { + /// + /// The ID or URL-encoded path of the project. + /// + [Input("project", required: true)] + public string Project { get; set; } = null!; + + public GetProjectIdsArgs() + { + } + public static new GetProjectIdsArgs Empty => new GetProjectIdsArgs(); + } + + public sealed class GetProjectIdsInvokeArgs : global::Pulumi.InvokeArgs + { + /// + /// The ID or URL-encoded path of the project. + /// + [Input("project", required: true)] + public Input Project { get; set; } = null!; + + public GetProjectIdsInvokeArgs() + { + } + public static new GetProjectIdsInvokeArgs Empty => new GetProjectIdsInvokeArgs(); + } + + + [OutputType] + public sealed class GetProjectIdsResult + { + public readonly string Id; + /// + /// The ID or URL-encoded path of the project. + /// + public readonly string Project; + /// + /// The full path of the project. + /// + public readonly string ProjectFullPath; + /// + /// The GraphQL ID of the project. + /// + public readonly string ProjectGraphqlId; + /// + /// The ID of the project. + /// + public readonly string ProjectId; + + [OutputConstructor] + private GetProjectIdsResult( + string id, + + string project, + + string projectFullPath, + + string projectGraphqlId, + + string projectId) + { + Id = id; + Project = project; + ProjectFullPath = projectFullPath; + ProjectGraphqlId = projectGraphqlId; + ProjectId = projectId; + } + } +} diff --git a/sdk/dotnet/Group.cs b/sdk/dotnet/Group.cs index 3b0865c4..d43179a9 100644 --- a/sdk/dotnet/Group.cs +++ b/sdk/dotnet/Group.cs @@ -178,6 +178,12 @@ public partial class Group : global::Pulumi.CustomResource [Output("path")] public Output Path { get; private set; } = null!; + /// + /// Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + /// + [Output("permanentlyRemoveOnDelete")] + public Output PermanentlyRemoveOnDelete { get; private set; } = null!; + /// /// Defaults to false. When enabled, users can not fork projects from this group to external namespaces. /// @@ -402,6 +408,12 @@ public InputList IpRestrictionRanges [Input("path", required: true)] public Input Path { get; set; } = null!; + /// + /// Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + /// + [Input("permanentlyRemoveOnDelete")] + public Input? PermanentlyRemoveOnDelete { get; set; } + /// /// Defaults to false. When enabled, users can not fork projects from this group to external namespaces. /// @@ -590,6 +602,12 @@ public InputList IpRestrictionRanges [Input("path")] public Input? Path { get; set; } + /// + /// Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + /// + [Input("permanentlyRemoveOnDelete")] + public Input? PermanentlyRemoveOnDelete { get; set; } + /// /// Defaults to false. When enabled, users can not fork projects from this group to external namespaces. /// diff --git a/sdk/dotnet/GroupAccessToken.cs b/sdk/dotnet/GroupAccessToken.cs index cb92b597..e8f3cc14 100644 --- a/sdk/dotnet/GroupAccessToken.cs +++ b/sdk/dotnet/GroupAccessToken.cs @@ -33,7 +33,7 @@ namespace Pulumi.GitLab /// var example = new GitLab.GroupAccessToken("example", new() /// { /// Group = "25", - /// Name = "Example project access token", + /// Name = "Example group access token", /// ExpiresAt = "2020-03-14", /// AccessLevel = "developer", /// Scopes = new[] diff --git a/sdk/dotnet/GroupSecurityPolicyAttachment.cs b/sdk/dotnet/GroupSecurityPolicyAttachment.cs new file mode 100644 index 00000000..2cdbd723 --- /dev/null +++ b/sdk/dotnet/GroupSecurityPolicyAttachment.cs @@ -0,0 +1,210 @@ +// *** 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.GitLab +{ + /// + /// The `gitlab.GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. + /// + /// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using GitLab = Pulumi.GitLab; + /// + /// return await Deployment.RunAsync(() => + /// { + /// // This resource can be used to attach a security policy to a pre-existing group + /// var foo = new GitLab.GroupSecurityPolicyAttachment("foo", new() + /// { + /// Group = "1234", + /// PolicyProject = "4567", + /// }); + /// + /// // Or you can use Terraform to create a new project, add a policy to that project, + /// // then attach that policy project to other groups. + /// var my_policy_project = new GitLab.Project("my-policy-project", new() + /// { + /// Name = "security-policy-project", + /// }); + /// + /// var policy_yml = new GitLab.RepositoryFile("policy-yml", new() + /// { + /// Project = my_policy_project.Id, + /// FilePath = ".gitlab/security-policies/my-policy.yml", + /// Branch = "master", + /// Encoding = "text", + /// Content = @"--- + /// approval_policy: + /// - name: test + /// description: test + /// enabled: true + /// rules: + /// - type: any_merge_request + /// branch_type: protected + /// commits: any + /// approval_settings: + /// block_branch_modification: true + /// prevent_pushing_and_force_pushing: true + /// prevent_approval_by_author: true + /// prevent_approval_by_commit_author: true + /// remove_approvals_with_new_commit: true + /// require_password_to_approve: false + /// fallback_behavior: + /// fail: closed + /// actions: + /// - type: send_bot_message + /// enabled: true + /// ", + /// }); + /// + /// var my_policy = new GitLab.GroupSecurityPolicyAttachment("my-policy", new() + /// { + /// Group = "1234", + /// PolicyProject = my_policy_project.Id, + /// }); + /// + /// }); + /// ``` + /// + /// ## Import + /// + /// GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. + /// + /// ```sh + /// $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 + /// ``` + /// + [GitLabResourceType("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment")] + public partial class GroupSecurityPolicyAttachment : global::Pulumi.CustomResource + { + /// + /// The ID or Full Path of the group which will have the security policy project assigned to it. + /// + [Output("group")] + public Output Group { get; private set; } = null!; + + /// + /// The GraphQL ID of the group to which the security policty project will be attached. + /// + [Output("groupGraphqlId")] + public Output GroupGraphqlId { get; private set; } = null!; + + /// + /// The ID or Full Path of the security policy project. + /// + [Output("policyProject")] + public Output PolicyProject { get; private set; } = null!; + + /// + /// The GraphQL ID of the security policy project. + /// + [Output("policyProjectGraphqlId")] + public Output PolicyProjectGraphqlId { get; private set; } = null!; + + + /// + /// Create a GroupSecurityPolicyAttachment resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public GroupSecurityPolicyAttachment(string name, GroupSecurityPolicyAttachmentArgs args, CustomResourceOptions? options = null) + : base("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, args ?? new GroupSecurityPolicyAttachmentArgs(), MakeResourceOptions(options, "")) + { + } + + private GroupSecurityPolicyAttachment(string name, Input id, GroupSecurityPolicyAttachmentState? state = null, CustomResourceOptions? options = null) + : base("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing GroupSecurityPolicyAttachment resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static GroupSecurityPolicyAttachment Get(string name, Input id, GroupSecurityPolicyAttachmentState? state = null, CustomResourceOptions? options = null) + { + return new GroupSecurityPolicyAttachment(name, id, state, options); + } + } + + public sealed class GroupSecurityPolicyAttachmentArgs : global::Pulumi.ResourceArgs + { + /// + /// The ID or Full Path of the group which will have the security policy project assigned to it. + /// + [Input("group", required: true)] + public Input Group { get; set; } = null!; + + /// + /// The ID or Full Path of the security policy project. + /// + [Input("policyProject", required: true)] + public Input PolicyProject { get; set; } = null!; + + public GroupSecurityPolicyAttachmentArgs() + { + } + public static new GroupSecurityPolicyAttachmentArgs Empty => new GroupSecurityPolicyAttachmentArgs(); + } + + public sealed class GroupSecurityPolicyAttachmentState : global::Pulumi.ResourceArgs + { + /// + /// The ID or Full Path of the group which will have the security policy project assigned to it. + /// + [Input("group")] + public Input? Group { get; set; } + + /// + /// The GraphQL ID of the group to which the security policty project will be attached. + /// + [Input("groupGraphqlId")] + public Input? GroupGraphqlId { get; set; } + + /// + /// The ID or Full Path of the security policy project. + /// + [Input("policyProject")] + public Input? PolicyProject { get; set; } + + /// + /// The GraphQL ID of the security policy project. + /// + [Input("policyProjectGraphqlId")] + public Input? PolicyProjectGraphqlId { get; set; } + + public GroupSecurityPolicyAttachmentState() + { + } + public static new GroupSecurityPolicyAttachmentState Empty => new GroupSecurityPolicyAttachmentState(); + } +} diff --git a/sdk/dotnet/ProjectJobTokenScopes.cs b/sdk/dotnet/ProjectJobTokenScopes.cs index eb0d2663..f12324d4 100644 --- a/sdk/dotnet/ProjectJobTokenScopes.cs +++ b/sdk/dotnet/ProjectJobTokenScopes.cs @@ -29,7 +29,7 @@ namespace Pulumi.GitLab /// { /// var allowedSingleProject = new GitLab.ProjectJobTokenScopes("allowed_single_project", new() /// { - /// ProjectId = 111, + /// Project = "111", /// TargetProjectIds = new[] /// { /// 123, @@ -38,7 +38,7 @@ namespace Pulumi.GitLab /// /// var allowedMultipleProject = new GitLab.ProjectJobTokenScopes("allowed_multiple_project", new() /// { - /// ProjectId = 111, + /// Project = "111", /// TargetProjectIds = new[] /// { /// 123, @@ -47,10 +47,21 @@ namespace Pulumi.GitLab /// }, /// }); /// + /// var allowedMultipleGroups = new GitLab.ProjectJobTokenScopes("allowed_multiple_groups", new() + /// { + /// ProjectId = 111, + /// TargetProjectIds = new[] {}, + /// TargetGroupIds = new[] + /// { + /// 321, + /// 654, + /// }, + /// }); + /// /// // This will remove all job token scopes, even if added outside of TF. /// var explicitDeny = new GitLab.ProjectJobTokenScopes("explicit_deny", new() /// { - /// ProjectId = 111, + /// Project = "111", /// TargetProjectIds = new[] {}, /// }); /// @@ -59,7 +70,7 @@ namespace Pulumi.GitLab /// /// ## Import /// - /// GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer + /// GitLab project job token scopes can be imported using an id made up of just the `project_id` /// /// ```sh /// $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -68,12 +79,24 @@ namespace Pulumi.GitLab [GitLabResourceType("gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes")] public partial class ProjectJobTokenScopes : global::Pulumi.CustomResource { + /// + /// The ID or full path of the project. + /// + [Output("project")] + public Output Project { get; private set; } = null!; + /// /// The ID of the project. /// [Output("projectId")] public Output ProjectId { get; private set; } = null!; + /// + /// A set of group IDs that are in the CI/CD job token inbound allowlist. + /// + [Output("targetGroupIds")] + public Output> TargetGroupIds { get; private set; } = null!; + /// /// A set of project IDs that are in the CI/CD job token inbound allowlist. /// @@ -88,7 +111,7 @@ public partial class ProjectJobTokenScopes : global::Pulumi.CustomResource /// The unique name of the resource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior - public ProjectJobTokenScopes(string name, ProjectJobTokenScopesArgs args, CustomResourceOptions? options = null) + public ProjectJobTokenScopes(string name, ProjectJobTokenScopesArgs? args = null, CustomResourceOptions? options = null) : base("gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes", name, args ?? new ProjectJobTokenScopesArgs(), MakeResourceOptions(options, "")) { } @@ -126,13 +149,31 @@ public static ProjectJobTokenScopes Get(string name, Input id, ProjectJo public sealed class ProjectJobTokenScopesArgs : global::Pulumi.ResourceArgs { + /// + /// The ID or full path of the project. + /// + [Input("project")] + public Input? Project { get; set; } + /// /// The ID of the project. /// - [Input("projectId", required: true)] - public Input ProjectId { get; set; } = null!; + [Input("projectId")] + public Input? ProjectId { get; set; } + + [Input("targetGroupIds")] + private InputList? _targetGroupIds; - [Input("targetProjectIds", required: true)] + /// + /// A set of group IDs that are in the CI/CD job token inbound allowlist. + /// + public InputList TargetGroupIds + { + get => _targetGroupIds ?? (_targetGroupIds = new InputList()); + set => _targetGroupIds = value; + } + + [Input("targetProjectIds")] private InputList? _targetProjectIds; /// @@ -152,12 +193,30 @@ public ProjectJobTokenScopesArgs() public sealed class ProjectJobTokenScopesState : global::Pulumi.ResourceArgs { + /// + /// The ID or full path of the project. + /// + [Input("project")] + public Input? Project { get; set; } + /// /// The ID of the project. /// [Input("projectId")] public Input? ProjectId { get; set; } + [Input("targetGroupIds")] + private InputList? _targetGroupIds; + + /// + /// A set of group IDs that are in the CI/CD job token inbound allowlist. + /// + public InputList TargetGroupIds + { + get => _targetGroupIds ?? (_targetGroupIds = new InputList()); + set => _targetGroupIds = value; + } + [Input("targetProjectIds")] private InputList? _targetProjectIds; diff --git a/sdk/dotnet/ProjectSecurityPolicyAttachment.cs b/sdk/dotnet/ProjectSecurityPolicyAttachment.cs index dc95e913..03c354d3 100644 --- a/sdk/dotnet/ProjectSecurityPolicyAttachment.cs +++ b/sdk/dotnet/ProjectSecurityPolicyAttachment.cs @@ -68,9 +68,9 @@ namespace Pulumi.GitLab /// ", /// }); /// - /// var my_policy = new GitLab.Index.ProjectSecurityPolicy("my-policy", new() + /// var my_policy = new GitLab.ProjectSecurityPolicyAttachment("my-policy", new() /// { - /// Project = 1234, + /// Project = "1234", /// PolicyProject = my_policy_project.Id, /// }); /// diff --git a/sdk/go/gitlab/applicationSettings.go b/sdk/go/gitlab/applicationSettings.go index 52e37810..e3b61400 100644 --- a/sdk/go/gitlab/applicationSettings.go +++ b/sdk/go/gitlab/applicationSettings.go @@ -294,7 +294,8 @@ type ApplicationSettings struct { // Maximum allowable lifetime for access tokens in days. MaxPersonalAccessTokenLifetime pulumi.IntOutput `pulumi:"maxPersonalAccessTokenLifetime"` // Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. - MaxSshKeyLifetime pulumi.IntOutput `pulumi:"maxSshKeyLifetime"` + MaxSshKeyLifetime pulumi.IntOutput `pulumi:"maxSshKeyLifetime"` + MaxTerraformStateSizeBytes pulumi.IntOutput `pulumi:"maxTerraformStateSizeBytes"` // A method call is only tracked when it takes longer than the given amount of milliseconds. MetricsMethodCallThreshold pulumi.IntOutput `pulumi:"metricsMethodCallThreshold"` // Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only. @@ -881,7 +882,8 @@ type applicationSettingsState struct { // Maximum allowable lifetime for access tokens in days. MaxPersonalAccessTokenLifetime *int `pulumi:"maxPersonalAccessTokenLifetime"` // Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. - MaxSshKeyLifetime *int `pulumi:"maxSshKeyLifetime"` + MaxSshKeyLifetime *int `pulumi:"maxSshKeyLifetime"` + MaxTerraformStateSizeBytes *int `pulumi:"maxTerraformStateSizeBytes"` // A method call is only tracked when it takes longer than the given amount of milliseconds. MetricsMethodCallThreshold *int `pulumi:"metricsMethodCallThreshold"` // Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only. @@ -1376,7 +1378,8 @@ type ApplicationSettingsState struct { // Maximum allowable lifetime for access tokens in days. MaxPersonalAccessTokenLifetime pulumi.IntPtrInput // Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. - MaxSshKeyLifetime pulumi.IntPtrInput + MaxSshKeyLifetime pulumi.IntPtrInput + MaxTerraformStateSizeBytes pulumi.IntPtrInput // A method call is only tracked when it takes longer than the given amount of milliseconds. MetricsMethodCallThreshold pulumi.IntPtrInput // Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only. @@ -1875,7 +1878,8 @@ type applicationSettingsArgs struct { // Maximum allowable lifetime for access tokens in days. MaxPersonalAccessTokenLifetime *int `pulumi:"maxPersonalAccessTokenLifetime"` // Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. - MaxSshKeyLifetime *int `pulumi:"maxSshKeyLifetime"` + MaxSshKeyLifetime *int `pulumi:"maxSshKeyLifetime"` + MaxTerraformStateSizeBytes *int `pulumi:"maxTerraformStateSizeBytes"` // A method call is only tracked when it takes longer than the given amount of milliseconds. MetricsMethodCallThreshold *int `pulumi:"metricsMethodCallThreshold"` // Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only. @@ -2371,7 +2375,8 @@ type ApplicationSettingsArgs struct { // Maximum allowable lifetime for access tokens in days. MaxPersonalAccessTokenLifetime pulumi.IntPtrInput // Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. - MaxSshKeyLifetime pulumi.IntPtrInput + MaxSshKeyLifetime pulumi.IntPtrInput + MaxTerraformStateSizeBytes pulumi.IntPtrInput // A method call is only tracked when it takes longer than the given amount of milliseconds. MetricsMethodCallThreshold pulumi.IntPtrInput // Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only. @@ -3366,6 +3371,10 @@ func (o ApplicationSettingsOutput) MaxSshKeyLifetime() pulumi.IntOutput { return o.ApplyT(func(v *ApplicationSettings) pulumi.IntOutput { return v.MaxSshKeyLifetime }).(pulumi.IntOutput) } +func (o ApplicationSettingsOutput) MaxTerraformStateSizeBytes() pulumi.IntOutput { + return o.ApplyT(func(v *ApplicationSettings) pulumi.IntOutput { return v.MaxTerraformStateSizeBytes }).(pulumi.IntOutput) +} + // A method call is only tracked when it takes longer than the given amount of milliseconds. func (o ApplicationSettingsOutput) MetricsMethodCallThreshold() pulumi.IntOutput { return o.ApplyT(func(v *ApplicationSettings) pulumi.IntOutput { return v.MetricsMethodCallThreshold }).(pulumi.IntOutput) diff --git a/sdk/go/gitlab/getGroupIds.go b/sdk/go/gitlab/getGroupIds.go new file mode 100644 index 00000000..a3b9bff3 --- /dev/null +++ b/sdk/go/gitlab/getGroupIds.go @@ -0,0 +1,143 @@ +// 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 gitlab + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// The `getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. +// +// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewGroup(ctx, "new_group", nil) +// if err != nil { +// return err +// } +// // use group IDs to get additional information, such as the GraphQL ID +// // for other resources +// foo, err := gitlab.GetGroupIds(ctx, &gitlab.GetGroupIdsArgs{ +// Group: "gitlab_group.new_group.id", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("graphQLId", foo.GroupGraphqlId) +// return nil +// }) +// } +// +// ``` +func GetGroupIds(ctx *pulumi.Context, args *GetGroupIdsArgs, opts ...pulumi.InvokeOption) (*GetGroupIdsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetGroupIdsResult + err := ctx.Invoke("gitlab:index/getGroupIds:getGroupIds", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getGroupIds. +type GetGroupIdsArgs struct { + // The ID or URL-encoded path of the group. + Group string `pulumi:"group"` +} + +// A collection of values returned by getGroupIds. +type GetGroupIdsResult struct { + // The ID or URL-encoded path of the group. + Group string `pulumi:"group"` + // The full path of the group. + GroupFullPath string `pulumi:"groupFullPath"` + // The GraphQL ID of the group. + GroupGraphqlId string `pulumi:"groupGraphqlId"` + // The ID of the group. + GroupId string `pulumi:"groupId"` + Id string `pulumi:"id"` +} + +func GetGroupIdsOutput(ctx *pulumi.Context, args GetGroupIdsOutputArgs, opts ...pulumi.InvokeOption) GetGroupIdsResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetGroupIdsResult, error) { + args := v.(GetGroupIdsArgs) + r, err := GetGroupIds(ctx, &args, opts...) + var s GetGroupIdsResult + if r != nil { + s = *r + } + return s, err + }).(GetGroupIdsResultOutput) +} + +// A collection of arguments for invoking getGroupIds. +type GetGroupIdsOutputArgs struct { + // The ID or URL-encoded path of the group. + Group pulumi.StringInput `pulumi:"group"` +} + +func (GetGroupIdsOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetGroupIdsArgs)(nil)).Elem() +} + +// A collection of values returned by getGroupIds. +type GetGroupIdsResultOutput struct{ *pulumi.OutputState } + +func (GetGroupIdsResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetGroupIdsResult)(nil)).Elem() +} + +func (o GetGroupIdsResultOutput) ToGetGroupIdsResultOutput() GetGroupIdsResultOutput { + return o +} + +func (o GetGroupIdsResultOutput) ToGetGroupIdsResultOutputWithContext(ctx context.Context) GetGroupIdsResultOutput { + return o +} + +// The ID or URL-encoded path of the group. +func (o GetGroupIdsResultOutput) Group() pulumi.StringOutput { + return o.ApplyT(func(v GetGroupIdsResult) string { return v.Group }).(pulumi.StringOutput) +} + +// The full path of the group. +func (o GetGroupIdsResultOutput) GroupFullPath() pulumi.StringOutput { + return o.ApplyT(func(v GetGroupIdsResult) string { return v.GroupFullPath }).(pulumi.StringOutput) +} + +// The GraphQL ID of the group. +func (o GetGroupIdsResultOutput) GroupGraphqlId() pulumi.StringOutput { + return o.ApplyT(func(v GetGroupIdsResult) string { return v.GroupGraphqlId }).(pulumi.StringOutput) +} + +// The ID of the group. +func (o GetGroupIdsResultOutput) GroupId() pulumi.StringOutput { + return o.ApplyT(func(v GetGroupIdsResult) string { return v.GroupId }).(pulumi.StringOutput) +} + +func (o GetGroupIdsResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetGroupIdsResult) string { return v.Id }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetGroupIdsResultOutput{}) +} diff --git a/sdk/go/gitlab/getProjectIds.go b/sdk/go/gitlab/getProjectIds.go new file mode 100644 index 00000000..5cab91e2 --- /dev/null +++ b/sdk/go/gitlab/getProjectIds.go @@ -0,0 +1,143 @@ +// 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 gitlab + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// The `getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. +// +// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := gitlab.NewProject(ctx, "new_project", nil) +// if err != nil { +// return err +// } +// // use project IDs to get additional information, such as the GraphQL ID +// // for other resources +// foo, err := gitlab.GetProjectIds(ctx, &gitlab.GetProjectIdsArgs{ +// Project: "gitlab_project.new_project.id", +// }, nil) +// if err != nil { +// return err +// } +// ctx.Export("graphQLId", foo.ProjectGraphqlId) +// return nil +// }) +// } +// +// ``` +func GetProjectIds(ctx *pulumi.Context, args *GetProjectIdsArgs, opts ...pulumi.InvokeOption) (*GetProjectIdsResult, error) { + opts = internal.PkgInvokeDefaultOpts(opts) + var rv GetProjectIdsResult + err := ctx.Invoke("gitlab:index/getProjectIds:getProjectIds", args, &rv, opts...) + if err != nil { + return nil, err + } + return &rv, nil +} + +// A collection of arguments for invoking getProjectIds. +type GetProjectIdsArgs struct { + // The ID or URL-encoded path of the project. + Project string `pulumi:"project"` +} + +// A collection of values returned by getProjectIds. +type GetProjectIdsResult struct { + Id string `pulumi:"id"` + // The ID or URL-encoded path of the project. + Project string `pulumi:"project"` + // The full path of the project. + ProjectFullPath string `pulumi:"projectFullPath"` + // The GraphQL ID of the project. + ProjectGraphqlId string `pulumi:"projectGraphqlId"` + // The ID of the project. + ProjectId string `pulumi:"projectId"` +} + +func GetProjectIdsOutput(ctx *pulumi.Context, args GetProjectIdsOutputArgs, opts ...pulumi.InvokeOption) GetProjectIdsResultOutput { + return pulumi.ToOutputWithContext(context.Background(), args). + ApplyT(func(v interface{}) (GetProjectIdsResult, error) { + args := v.(GetProjectIdsArgs) + r, err := GetProjectIds(ctx, &args, opts...) + var s GetProjectIdsResult + if r != nil { + s = *r + } + return s, err + }).(GetProjectIdsResultOutput) +} + +// A collection of arguments for invoking getProjectIds. +type GetProjectIdsOutputArgs struct { + // The ID or URL-encoded path of the project. + Project pulumi.StringInput `pulumi:"project"` +} + +func (GetProjectIdsOutputArgs) ElementType() reflect.Type { + return reflect.TypeOf((*GetProjectIdsArgs)(nil)).Elem() +} + +// A collection of values returned by getProjectIds. +type GetProjectIdsResultOutput struct{ *pulumi.OutputState } + +func (GetProjectIdsResultOutput) ElementType() reflect.Type { + return reflect.TypeOf((*GetProjectIdsResult)(nil)).Elem() +} + +func (o GetProjectIdsResultOutput) ToGetProjectIdsResultOutput() GetProjectIdsResultOutput { + return o +} + +func (o GetProjectIdsResultOutput) ToGetProjectIdsResultOutputWithContext(ctx context.Context) GetProjectIdsResultOutput { + return o +} + +func (o GetProjectIdsResultOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v GetProjectIdsResult) string { return v.Id }).(pulumi.StringOutput) +} + +// The ID or URL-encoded path of the project. +func (o GetProjectIdsResultOutput) Project() pulumi.StringOutput { + return o.ApplyT(func(v GetProjectIdsResult) string { return v.Project }).(pulumi.StringOutput) +} + +// The full path of the project. +func (o GetProjectIdsResultOutput) ProjectFullPath() pulumi.StringOutput { + return o.ApplyT(func(v GetProjectIdsResult) string { return v.ProjectFullPath }).(pulumi.StringOutput) +} + +// The GraphQL ID of the project. +func (o GetProjectIdsResultOutput) ProjectGraphqlId() pulumi.StringOutput { + return o.ApplyT(func(v GetProjectIdsResult) string { return v.ProjectGraphqlId }).(pulumi.StringOutput) +} + +// The ID of the project. +func (o GetProjectIdsResultOutput) ProjectId() pulumi.StringOutput { + return o.ApplyT(func(v GetProjectIdsResult) string { return v.ProjectId }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterOutputType(GetProjectIdsResultOutput{}) +} diff --git a/sdk/go/gitlab/group.go b/sdk/go/gitlab/group.go index e78d420d..f7bd7de2 100644 --- a/sdk/go/gitlab/group.go +++ b/sdk/go/gitlab/group.go @@ -120,6 +120,8 @@ type Group struct { ParentId pulumi.IntOutput `pulumi:"parentId"` // The path of the group. Path pulumi.StringOutput `pulumi:"path"` + // Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + PermanentlyRemoveOnDelete pulumi.BoolPtrOutput `pulumi:"permanentlyRemoveOnDelete"` // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. PreventForkingOutsideGroup pulumi.BoolOutput `pulumi:"preventForkingOutsideGroup"` // Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` @@ -221,6 +223,8 @@ type groupState struct { ParentId *int `pulumi:"parentId"` // The path of the group. Path *string `pulumi:"path"` + // Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + PermanentlyRemoveOnDelete *bool `pulumi:"permanentlyRemoveOnDelete"` // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. PreventForkingOutsideGroup *bool `pulumi:"preventForkingOutsideGroup"` // Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` @@ -286,6 +290,8 @@ type GroupState struct { ParentId pulumi.IntPtrInput // The path of the group. Path pulumi.StringPtrInput + // Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + PermanentlyRemoveOnDelete pulumi.BoolPtrInput // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. PreventForkingOutsideGroup pulumi.BoolPtrInput // Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` @@ -349,6 +355,8 @@ type groupArgs struct { ParentId *int `pulumi:"parentId"` // The path of the group. Path string `pulumi:"path"` + // Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + PermanentlyRemoveOnDelete *bool `pulumi:"permanentlyRemoveOnDelete"` // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. PreventForkingOutsideGroup *bool `pulumi:"preventForkingOutsideGroup"` // Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` @@ -405,6 +413,8 @@ type GroupArgs struct { ParentId pulumi.IntPtrInput // The path of the group. Path pulumi.StringInput + // Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + PermanentlyRemoveOnDelete pulumi.BoolPtrInput // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. PreventForkingOutsideGroup pulumi.BoolPtrInput // Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` @@ -603,6 +613,11 @@ func (o GroupOutput) Path() pulumi.StringOutput { return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput) } +// Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. +func (o GroupOutput) PermanentlyRemoveOnDelete() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.PermanentlyRemoveOnDelete }).(pulumi.BoolPtrOutput) +} + // Defaults to false. When enabled, users can not fork projects from this group to external namespaces. func (o GroupOutput) PreventForkingOutsideGroup() pulumi.BoolOutput { return o.ApplyT(func(v *Group) pulumi.BoolOutput { return v.PreventForkingOutsideGroup }).(pulumi.BoolOutput) diff --git a/sdk/go/gitlab/groupAccessToken.go b/sdk/go/gitlab/groupAccessToken.go index 31c8ae03..67f476c3 100644 --- a/sdk/go/gitlab/groupAccessToken.go +++ b/sdk/go/gitlab/groupAccessToken.go @@ -38,7 +38,7 @@ import ( // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := gitlab.NewGroupAccessToken(ctx, "example", &gitlab.GroupAccessTokenArgs{ // Group: pulumi.String("25"), -// Name: pulumi.String("Example project access token"), +// Name: pulumi.String("Example group access token"), // ExpiresAt: pulumi.String("2020-03-14"), // AccessLevel: pulumi.String("developer"), // Scopes: pulumi.StringArray{ diff --git a/sdk/go/gitlab/groupSecurityPolicyAttachment.go b/sdk/go/gitlab/groupSecurityPolicyAttachment.go new file mode 100644 index 00000000..a25cbe64 --- /dev/null +++ b/sdk/go/gitlab/groupSecurityPolicyAttachment.go @@ -0,0 +1,351 @@ +// 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 gitlab + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// The `GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. +// +// **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// // This resource can be used to attach a security policy to a pre-existing group +// _, err := gitlab.NewGroupSecurityPolicyAttachment(ctx, "foo", &gitlab.GroupSecurityPolicyAttachmentArgs{ +// Group: pulumi.String("1234"), +// PolicyProject: pulumi.String("4567"), +// }) +// if err != nil { +// return err +// } +// // Or you can use Terraform to create a new project, add a policy to that project, +// // then attach that policy project to other groups. +// _, err = gitlab.NewProject(ctx, "my-policy-project", &gitlab.ProjectArgs{ +// Name: pulumi.String("security-policy-project"), +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewRepositoryFile(ctx, "policy-yml", &gitlab.RepositoryFileArgs{ +// Project: my_policy_project.ID(), +// FilePath: pulumi.String(".gitlab/security-policies/my-policy.yml"), +// Branch: pulumi.String("master"), +// Encoding: pulumi.String("text"), +// Content: pulumi.String(`--- +// +// approval_policy: +// - name: test +// description: test +// enabled: true +// rules: +// - type: any_merge_request +// branch_type: protected +// commits: any +// +// approval_settings: +// +// block_branch_modification: true +// prevent_pushing_and_force_pushing: true +// prevent_approval_by_author: true +// prevent_approval_by_commit_author: true +// remove_approvals_with_new_commit: true +// require_password_to_approve: false +// +// fallback_behavior: +// +// fail: closed +// +// actions: +// - type: send_bot_message +// enabled: true +// +// `), +// +// }) +// if err != nil { +// return err +// } +// _, err = gitlab.NewGroupSecurityPolicyAttachment(ctx, "my-policy", &gitlab.GroupSecurityPolicyAttachmentArgs{ +// Group: pulumi.String("1234"), +// PolicyProject: my_policy_project.ID(), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// +// ## Import +// +// GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. +// +// ```sh +// $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 +// ``` +type GroupSecurityPolicyAttachment struct { + pulumi.CustomResourceState + + // The ID or Full Path of the group which will have the security policy project assigned to it. + Group pulumi.StringOutput `pulumi:"group"` + // The GraphQL ID of the group to which the security policty project will be attached. + GroupGraphqlId pulumi.StringOutput `pulumi:"groupGraphqlId"` + // The ID or Full Path of the security policy project. + PolicyProject pulumi.StringOutput `pulumi:"policyProject"` + // The GraphQL ID of the security policy project. + PolicyProjectGraphqlId pulumi.StringOutput `pulumi:"policyProjectGraphqlId"` +} + +// NewGroupSecurityPolicyAttachment registers a new resource with the given unique name, arguments, and options. +func NewGroupSecurityPolicyAttachment(ctx *pulumi.Context, + name string, args *GroupSecurityPolicyAttachmentArgs, opts ...pulumi.ResourceOption) (*GroupSecurityPolicyAttachment, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Group == nil { + return nil, errors.New("invalid value for required argument 'Group'") + } + if args.PolicyProject == nil { + return nil, errors.New("invalid value for required argument 'PolicyProject'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource GroupSecurityPolicyAttachment + err := ctx.RegisterResource("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetGroupSecurityPolicyAttachment gets an existing GroupSecurityPolicyAttachment resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetGroupSecurityPolicyAttachment(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *GroupSecurityPolicyAttachmentState, opts ...pulumi.ResourceOption) (*GroupSecurityPolicyAttachment, error) { + var resource GroupSecurityPolicyAttachment + err := ctx.ReadResource("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering GroupSecurityPolicyAttachment resources. +type groupSecurityPolicyAttachmentState struct { + // The ID or Full Path of the group which will have the security policy project assigned to it. + Group *string `pulumi:"group"` + // The GraphQL ID of the group to which the security policty project will be attached. + GroupGraphqlId *string `pulumi:"groupGraphqlId"` + // The ID or Full Path of the security policy project. + PolicyProject *string `pulumi:"policyProject"` + // The GraphQL ID of the security policy project. + PolicyProjectGraphqlId *string `pulumi:"policyProjectGraphqlId"` +} + +type GroupSecurityPolicyAttachmentState struct { + // The ID or Full Path of the group which will have the security policy project assigned to it. + Group pulumi.StringPtrInput + // The GraphQL ID of the group to which the security policty project will be attached. + GroupGraphqlId pulumi.StringPtrInput + // The ID or Full Path of the security policy project. + PolicyProject pulumi.StringPtrInput + // The GraphQL ID of the security policy project. + PolicyProjectGraphqlId pulumi.StringPtrInput +} + +func (GroupSecurityPolicyAttachmentState) ElementType() reflect.Type { + return reflect.TypeOf((*groupSecurityPolicyAttachmentState)(nil)).Elem() +} + +type groupSecurityPolicyAttachmentArgs struct { + // The ID or Full Path of the group which will have the security policy project assigned to it. + Group string `pulumi:"group"` + // The ID or Full Path of the security policy project. + PolicyProject string `pulumi:"policyProject"` +} + +// The set of arguments for constructing a GroupSecurityPolicyAttachment resource. +type GroupSecurityPolicyAttachmentArgs struct { + // The ID or Full Path of the group which will have the security policy project assigned to it. + Group pulumi.StringInput + // The ID or Full Path of the security policy project. + PolicyProject pulumi.StringInput +} + +func (GroupSecurityPolicyAttachmentArgs) ElementType() reflect.Type { + return reflect.TypeOf((*groupSecurityPolicyAttachmentArgs)(nil)).Elem() +} + +type GroupSecurityPolicyAttachmentInput interface { + pulumi.Input + + ToGroupSecurityPolicyAttachmentOutput() GroupSecurityPolicyAttachmentOutput + ToGroupSecurityPolicyAttachmentOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentOutput +} + +func (*GroupSecurityPolicyAttachment) ElementType() reflect.Type { + return reflect.TypeOf((**GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (i *GroupSecurityPolicyAttachment) ToGroupSecurityPolicyAttachmentOutput() GroupSecurityPolicyAttachmentOutput { + return i.ToGroupSecurityPolicyAttachmentOutputWithContext(context.Background()) +} + +func (i *GroupSecurityPolicyAttachment) ToGroupSecurityPolicyAttachmentOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentOutput { + return pulumi.ToOutputWithContext(ctx, i).(GroupSecurityPolicyAttachmentOutput) +} + +// GroupSecurityPolicyAttachmentArrayInput is an input type that accepts GroupSecurityPolicyAttachmentArray and GroupSecurityPolicyAttachmentArrayOutput values. +// You can construct a concrete instance of `GroupSecurityPolicyAttachmentArrayInput` via: +// +// GroupSecurityPolicyAttachmentArray{ GroupSecurityPolicyAttachmentArgs{...} } +type GroupSecurityPolicyAttachmentArrayInput interface { + pulumi.Input + + ToGroupSecurityPolicyAttachmentArrayOutput() GroupSecurityPolicyAttachmentArrayOutput + ToGroupSecurityPolicyAttachmentArrayOutputWithContext(context.Context) GroupSecurityPolicyAttachmentArrayOutput +} + +type GroupSecurityPolicyAttachmentArray []GroupSecurityPolicyAttachmentInput + +func (GroupSecurityPolicyAttachmentArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (i GroupSecurityPolicyAttachmentArray) ToGroupSecurityPolicyAttachmentArrayOutput() GroupSecurityPolicyAttachmentArrayOutput { + return i.ToGroupSecurityPolicyAttachmentArrayOutputWithContext(context.Background()) +} + +func (i GroupSecurityPolicyAttachmentArray) ToGroupSecurityPolicyAttachmentArrayOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(GroupSecurityPolicyAttachmentArrayOutput) +} + +// GroupSecurityPolicyAttachmentMapInput is an input type that accepts GroupSecurityPolicyAttachmentMap and GroupSecurityPolicyAttachmentMapOutput values. +// You can construct a concrete instance of `GroupSecurityPolicyAttachmentMapInput` via: +// +// GroupSecurityPolicyAttachmentMap{ "key": GroupSecurityPolicyAttachmentArgs{...} } +type GroupSecurityPolicyAttachmentMapInput interface { + pulumi.Input + + ToGroupSecurityPolicyAttachmentMapOutput() GroupSecurityPolicyAttachmentMapOutput + ToGroupSecurityPolicyAttachmentMapOutputWithContext(context.Context) GroupSecurityPolicyAttachmentMapOutput +} + +type GroupSecurityPolicyAttachmentMap map[string]GroupSecurityPolicyAttachmentInput + +func (GroupSecurityPolicyAttachmentMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (i GroupSecurityPolicyAttachmentMap) ToGroupSecurityPolicyAttachmentMapOutput() GroupSecurityPolicyAttachmentMapOutput { + return i.ToGroupSecurityPolicyAttachmentMapOutputWithContext(context.Background()) +} + +func (i GroupSecurityPolicyAttachmentMap) ToGroupSecurityPolicyAttachmentMapOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(GroupSecurityPolicyAttachmentMapOutput) +} + +type GroupSecurityPolicyAttachmentOutput struct{ *pulumi.OutputState } + +func (GroupSecurityPolicyAttachmentOutput) ElementType() reflect.Type { + return reflect.TypeOf((**GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (o GroupSecurityPolicyAttachmentOutput) ToGroupSecurityPolicyAttachmentOutput() GroupSecurityPolicyAttachmentOutput { + return o +} + +func (o GroupSecurityPolicyAttachmentOutput) ToGroupSecurityPolicyAttachmentOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentOutput { + return o +} + +// The ID or Full Path of the group which will have the security policy project assigned to it. +func (o GroupSecurityPolicyAttachmentOutput) Group() pulumi.StringOutput { + return o.ApplyT(func(v *GroupSecurityPolicyAttachment) pulumi.StringOutput { return v.Group }).(pulumi.StringOutput) +} + +// The GraphQL ID of the group to which the security policty project will be attached. +func (o GroupSecurityPolicyAttachmentOutput) GroupGraphqlId() pulumi.StringOutput { + return o.ApplyT(func(v *GroupSecurityPolicyAttachment) pulumi.StringOutput { return v.GroupGraphqlId }).(pulumi.StringOutput) +} + +// The ID or Full Path of the security policy project. +func (o GroupSecurityPolicyAttachmentOutput) PolicyProject() pulumi.StringOutput { + return o.ApplyT(func(v *GroupSecurityPolicyAttachment) pulumi.StringOutput { return v.PolicyProject }).(pulumi.StringOutput) +} + +// The GraphQL ID of the security policy project. +func (o GroupSecurityPolicyAttachmentOutput) PolicyProjectGraphqlId() pulumi.StringOutput { + return o.ApplyT(func(v *GroupSecurityPolicyAttachment) pulumi.StringOutput { return v.PolicyProjectGraphqlId }).(pulumi.StringOutput) +} + +type GroupSecurityPolicyAttachmentArrayOutput struct{ *pulumi.OutputState } + +func (GroupSecurityPolicyAttachmentArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (o GroupSecurityPolicyAttachmentArrayOutput) ToGroupSecurityPolicyAttachmentArrayOutput() GroupSecurityPolicyAttachmentArrayOutput { + return o +} + +func (o GroupSecurityPolicyAttachmentArrayOutput) ToGroupSecurityPolicyAttachmentArrayOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentArrayOutput { + return o +} + +func (o GroupSecurityPolicyAttachmentArrayOutput) Index(i pulumi.IntInput) GroupSecurityPolicyAttachmentOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupSecurityPolicyAttachment { + return vs[0].([]*GroupSecurityPolicyAttachment)[vs[1].(int)] + }).(GroupSecurityPolicyAttachmentOutput) +} + +type GroupSecurityPolicyAttachmentMapOutput struct{ *pulumi.OutputState } + +func (GroupSecurityPolicyAttachmentMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*GroupSecurityPolicyAttachment)(nil)).Elem() +} + +func (o GroupSecurityPolicyAttachmentMapOutput) ToGroupSecurityPolicyAttachmentMapOutput() GroupSecurityPolicyAttachmentMapOutput { + return o +} + +func (o GroupSecurityPolicyAttachmentMapOutput) ToGroupSecurityPolicyAttachmentMapOutputWithContext(ctx context.Context) GroupSecurityPolicyAttachmentMapOutput { + return o +} + +func (o GroupSecurityPolicyAttachmentMapOutput) MapIndex(k pulumi.StringInput) GroupSecurityPolicyAttachmentOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupSecurityPolicyAttachment { + return vs[0].(map[string]*GroupSecurityPolicyAttachment)[vs[1].(string)] + }).(GroupSecurityPolicyAttachmentOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*GroupSecurityPolicyAttachmentInput)(nil)).Elem(), &GroupSecurityPolicyAttachment{}) + pulumi.RegisterInputType(reflect.TypeOf((*GroupSecurityPolicyAttachmentArrayInput)(nil)).Elem(), GroupSecurityPolicyAttachmentArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*GroupSecurityPolicyAttachmentMapInput)(nil)).Elem(), GroupSecurityPolicyAttachmentMap{}) + pulumi.RegisterOutputType(GroupSecurityPolicyAttachmentOutput{}) + pulumi.RegisterOutputType(GroupSecurityPolicyAttachmentArrayOutput{}) + pulumi.RegisterOutputType(GroupSecurityPolicyAttachmentMapOutput{}) +} diff --git a/sdk/go/gitlab/init.go b/sdk/go/gitlab/init.go index a9a5c4b5..34135056 100644 --- a/sdk/go/gitlab/init.go +++ b/sdk/go/gitlab/init.go @@ -71,6 +71,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &GroupProtectedEnvironment{} case "gitlab:index/groupSamlLink:GroupSamlLink": r = &GroupSamlLink{} + case "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment": + r = &GroupSecurityPolicyAttachment{} case "gitlab:index/groupShareGroup:GroupShareGroup": r = &GroupShareGroup{} case "gitlab:index/groupVariable:GroupVariable": @@ -361,6 +363,11 @@ func init() { "index/groupSamlLink", &module{version}, ) + pulumi.RegisterResourceModule( + "gitlab", + "index/groupSecurityPolicyAttachment", + &module{version}, + ) pulumi.RegisterResourceModule( "gitlab", "index/groupShareGroup", diff --git a/sdk/go/gitlab/projectJobTokenScopes.go b/sdk/go/gitlab/projectJobTokenScopes.go index 980a76a1..abe7133d 100644 --- a/sdk/go/gitlab/projectJobTokenScopes.go +++ b/sdk/go/gitlab/projectJobTokenScopes.go @@ -7,7 +7,6 @@ import ( "context" "reflect" - "errors" "github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -34,7 +33,7 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := gitlab.NewProjectJobTokenScopes(ctx, "allowed_single_project", &gitlab.ProjectJobTokenScopesArgs{ -// ProjectId: pulumi.Int(111), +// Project: pulumi.String("111"), // TargetProjectIds: pulumi.IntArray{ // pulumi.Int(123), // }, @@ -43,7 +42,7 @@ import ( // return err // } // _, err = gitlab.NewProjectJobTokenScopes(ctx, "allowed_multiple_project", &gitlab.ProjectJobTokenScopesArgs{ -// ProjectId: pulumi.Int(111), +// Project: pulumi.String("111"), // TargetProjectIds: pulumi.IntArray{ // pulumi.Int(123), // pulumi.Int(456), @@ -53,9 +52,20 @@ import ( // if err != nil { // return err // } +// _, err = gitlab.NewProjectJobTokenScopes(ctx, "allowed_multiple_groups", &gitlab.ProjectJobTokenScopesArgs{ +// ProjectId: pulumi.Int(111), +// TargetProjectIds: pulumi.IntArray{}, +// TargetGroupIds: pulumi.IntArray{ +// pulumi.Int(321), +// pulumi.Int(654), +// }, +// }) +// if err != nil { +// return err +// } // // This will remove all job token scopes, even if added outside of TF. // _, err = gitlab.NewProjectJobTokenScopes(ctx, "explicit_deny", &gitlab.ProjectJobTokenScopesArgs{ -// ProjectId: pulumi.Int(111), +// Project: pulumi.String("111"), // TargetProjectIds: pulumi.IntArray{}, // }) // if err != nil { @@ -69,7 +79,7 @@ import ( // // ## Import // -// GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer +// GitLab project job token scopes can be imported using an id made up of just the `project_id` // // ```sh // $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -77,8 +87,14 @@ import ( type ProjectJobTokenScopes struct { pulumi.CustomResourceState + // The ID or full path of the project. + Project pulumi.StringOutput `pulumi:"project"` // The ID of the project. + // + // Deprecated: `projectId` has been deprecated. Use `project` instead. ProjectId pulumi.IntOutput `pulumi:"projectId"` + // A set of group IDs that are in the CI/CD job token inbound allowlist. + TargetGroupIds pulumi.IntArrayOutput `pulumi:"targetGroupIds"` // A set of project IDs that are in the CI/CD job token inbound allowlist. TargetProjectIds pulumi.IntArrayOutput `pulumi:"targetProjectIds"` } @@ -87,15 +103,9 @@ type ProjectJobTokenScopes struct { func NewProjectJobTokenScopes(ctx *pulumi.Context, name string, args *ProjectJobTokenScopesArgs, opts ...pulumi.ResourceOption) (*ProjectJobTokenScopes, error) { if args == nil { - return nil, errors.New("missing one or more required arguments") + args = &ProjectJobTokenScopesArgs{} } - if args.ProjectId == nil { - return nil, errors.New("invalid value for required argument 'ProjectId'") - } - if args.TargetProjectIds == nil { - return nil, errors.New("invalid value for required argument 'TargetProjectIds'") - } opts = internal.PkgResourceDefaultOpts(opts) var resource ProjectJobTokenScopes err := ctx.RegisterResource("gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes", name, args, &resource, opts...) @@ -119,15 +129,27 @@ func GetProjectJobTokenScopes(ctx *pulumi.Context, // Input properties used for looking up and filtering ProjectJobTokenScopes resources. type projectJobTokenScopesState struct { + // The ID or full path of the project. + Project *string `pulumi:"project"` // The ID of the project. + // + // Deprecated: `projectId` has been deprecated. Use `project` instead. ProjectId *int `pulumi:"projectId"` + // A set of group IDs that are in the CI/CD job token inbound allowlist. + TargetGroupIds []int `pulumi:"targetGroupIds"` // A set of project IDs that are in the CI/CD job token inbound allowlist. TargetProjectIds []int `pulumi:"targetProjectIds"` } type ProjectJobTokenScopesState struct { + // The ID or full path of the project. + Project pulumi.StringPtrInput // The ID of the project. + // + // Deprecated: `projectId` has been deprecated. Use `project` instead. ProjectId pulumi.IntPtrInput + // A set of group IDs that are in the CI/CD job token inbound allowlist. + TargetGroupIds pulumi.IntArrayInput // A set of project IDs that are in the CI/CD job token inbound allowlist. TargetProjectIds pulumi.IntArrayInput } @@ -137,16 +159,28 @@ func (ProjectJobTokenScopesState) ElementType() reflect.Type { } type projectJobTokenScopesArgs struct { + // The ID or full path of the project. + Project *string `pulumi:"project"` // The ID of the project. - ProjectId int `pulumi:"projectId"` + // + // Deprecated: `projectId` has been deprecated. Use `project` instead. + ProjectId *int `pulumi:"projectId"` + // A set of group IDs that are in the CI/CD job token inbound allowlist. + TargetGroupIds []int `pulumi:"targetGroupIds"` // A set of project IDs that are in the CI/CD job token inbound allowlist. TargetProjectIds []int `pulumi:"targetProjectIds"` } // The set of arguments for constructing a ProjectJobTokenScopes resource. type ProjectJobTokenScopesArgs struct { + // The ID or full path of the project. + Project pulumi.StringPtrInput // The ID of the project. - ProjectId pulumi.IntInput + // + // Deprecated: `projectId` has been deprecated. Use `project` instead. + ProjectId pulumi.IntPtrInput + // A set of group IDs that are in the CI/CD job token inbound allowlist. + TargetGroupIds pulumi.IntArrayInput // A set of project IDs that are in the CI/CD job token inbound allowlist. TargetProjectIds pulumi.IntArrayInput } @@ -238,11 +272,23 @@ func (o ProjectJobTokenScopesOutput) ToProjectJobTokenScopesOutputWithContext(ct return o } +// The ID or full path of the project. +func (o ProjectJobTokenScopesOutput) Project() pulumi.StringOutput { + return o.ApplyT(func(v *ProjectJobTokenScopes) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput) +} + // The ID of the project. +// +// Deprecated: `projectId` has been deprecated. Use `project` instead. func (o ProjectJobTokenScopesOutput) ProjectId() pulumi.IntOutput { return o.ApplyT(func(v *ProjectJobTokenScopes) pulumi.IntOutput { return v.ProjectId }).(pulumi.IntOutput) } +// A set of group IDs that are in the CI/CD job token inbound allowlist. +func (o ProjectJobTokenScopesOutput) TargetGroupIds() pulumi.IntArrayOutput { + return o.ApplyT(func(v *ProjectJobTokenScopes) pulumi.IntArrayOutput { return v.TargetGroupIds }).(pulumi.IntArrayOutput) +} + // A set of project IDs that are in the CI/CD job token inbound allowlist. func (o ProjectJobTokenScopesOutput) TargetProjectIds() pulumi.IntArrayOutput { return o.ApplyT(func(v *ProjectJobTokenScopes) pulumi.IntArrayOutput { return v.TargetProjectIds }).(pulumi.IntArrayOutput) diff --git a/sdk/go/gitlab/projectSecurityPolicyAttachment.go b/sdk/go/gitlab/projectSecurityPolicyAttachment.go index 2206c978..c5285708 100644 --- a/sdk/go/gitlab/projectSecurityPolicyAttachment.go +++ b/sdk/go/gitlab/projectSecurityPolicyAttachment.go @@ -85,8 +85,8 @@ import ( // if err != nil { // return err // } -// _, err = gitlab.NewProjectSecurityPolicy(ctx, "my-policy", &gitlab.ProjectSecurityPolicyArgs{ -// Project: 1234, +// _, err = gitlab.NewProjectSecurityPolicyAttachment(ctx, "my-policy", &gitlab.ProjectSecurityPolicyAttachmentArgs{ +// Project: pulumi.String("1234"), // PolicyProject: my_policy_project.ID(), // }) // if err != nil { diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 3707d8e7..46b98d8b 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.14.0") + implementation("com.pulumi:pulumi:0.15.0") } task sourcesJar(type: Jar) { diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettings.java b/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettings.java index 61e538d9..f8f2f0ed 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettings.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettings.java @@ -1944,6 +1944,12 @@ public Output maxPersonalAccessTokenLifetime() { public Output maxSshKeyLifetime() { return this.maxSshKeyLifetime; } + @Export(name="maxTerraformStateSizeBytes", refs={Integer.class}, tree="[0]") + private Output maxTerraformStateSizeBytes; + + public Output maxTerraformStateSizeBytes() { + return this.maxTerraformStateSizeBytes; + } /** * A method call is only tracked when it takes longer than the given amount of milliseconds. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettingsArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettingsArgs.java index b27c9f68..fcf6d9cd 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettingsArgs.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/ApplicationSettingsArgs.java @@ -2088,6 +2088,13 @@ public Optional> maxSshKeyLifetime() { return Optional.ofNullable(this.maxSshKeyLifetime); } + @Import(name="maxTerraformStateSizeBytes") + private @Nullable Output maxTerraformStateSizeBytes; + + public Optional> maxTerraformStateSizeBytes() { + return Optional.ofNullable(this.maxTerraformStateSizeBytes); + } + /** * A method call is only tracked when it takes longer than the given amount of milliseconds. * @@ -3817,6 +3824,7 @@ private ApplicationSettingsArgs(ApplicationSettingsArgs $) { this.maxPagesSize = $.maxPagesSize; this.maxPersonalAccessTokenLifetime = $.maxPersonalAccessTokenLifetime; this.maxSshKeyLifetime = $.maxSshKeyLifetime; + this.maxTerraformStateSizeBytes = $.maxTerraformStateSizeBytes; this.metricsMethodCallThreshold = $.metricsMethodCallThreshold; this.minimumPasswordLength = $.minimumPasswordLength; this.mirrorAvailable = $.mirrorAvailable; @@ -6917,6 +6925,15 @@ public Builder maxSshKeyLifetime(Integer maxSshKeyLifetime) { return maxSshKeyLifetime(Output.of(maxSshKeyLifetime)); } + public Builder maxTerraformStateSizeBytes(@Nullable Output maxTerraformStateSizeBytes) { + $.maxTerraformStateSizeBytes = maxTerraformStateSizeBytes; + return this; + } + + public Builder maxTerraformStateSizeBytes(Integer maxTerraformStateSizeBytes) { + return maxTerraformStateSizeBytes(Output.of(maxTerraformStateSizeBytes)); + } + /** * @param metricsMethodCallThreshold A method call is only tracked when it takes longer than the given amount of milliseconds. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/GitlabFunctions.java b/sdk/java/src/main/java/com/pulumi/gitlab/GitlabFunctions.java index 67cb242b..1121e358 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/GitlabFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/GitlabFunctions.java @@ -23,6 +23,8 @@ import com.pulumi.gitlab.inputs.GetGroupHookPlainArgs; import com.pulumi.gitlab.inputs.GetGroupHooksArgs; import com.pulumi.gitlab.inputs.GetGroupHooksPlainArgs; +import com.pulumi.gitlab.inputs.GetGroupIdsArgs; +import com.pulumi.gitlab.inputs.GetGroupIdsPlainArgs; import com.pulumi.gitlab.inputs.GetGroupMembershipArgs; import com.pulumi.gitlab.inputs.GetGroupMembershipPlainArgs; import com.pulumi.gitlab.inputs.GetGroupPlainArgs; @@ -45,6 +47,8 @@ import com.pulumi.gitlab.inputs.GetProjectHookPlainArgs; import com.pulumi.gitlab.inputs.GetProjectHooksArgs; import com.pulumi.gitlab.inputs.GetProjectHooksPlainArgs; +import com.pulumi.gitlab.inputs.GetProjectIdsArgs; +import com.pulumi.gitlab.inputs.GetProjectIdsPlainArgs; import com.pulumi.gitlab.inputs.GetProjectIssueArgs; import com.pulumi.gitlab.inputs.GetProjectIssuePlainArgs; import com.pulumi.gitlab.inputs.GetProjectIssuesArgs; @@ -94,6 +98,7 @@ import com.pulumi.gitlab.outputs.GetCurrentUserResult; import com.pulumi.gitlab.outputs.GetGroupHookResult; import com.pulumi.gitlab.outputs.GetGroupHooksResult; +import com.pulumi.gitlab.outputs.GetGroupIdsResult; import com.pulumi.gitlab.outputs.GetGroupMembershipResult; import com.pulumi.gitlab.outputs.GetGroupResult; import com.pulumi.gitlab.outputs.GetGroupSubgroupsResult; @@ -107,6 +112,7 @@ import com.pulumi.gitlab.outputs.GetProjectBranchesResult; import com.pulumi.gitlab.outputs.GetProjectHookResult; import com.pulumi.gitlab.outputs.GetProjectHooksResult; +import com.pulumi.gitlab.outputs.GetProjectIdsResult; import com.pulumi.gitlab.outputs.GetProjectIssueResult; import com.pulumi.gitlab.outputs.GetProjectIssuesResult; import com.pulumi.gitlab.outputs.GetProjectMembershipResult; @@ -1592,6 +1598,206 @@ public static Output getGroupHooks(GetGroupHooksArgs args, public static CompletableFuture getGroupHooksPlain(GetGroupHooksPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("gitlab:index/getGroupHooks:getGroupHooks", TypeShape.of(GetGroupHooksResult.class), args, Utilities.withVersion(options)); } + /** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Group;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetGroupIdsArgs;
+     * 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) {
+     *         var newGroup = new Group("newGroup");
+     * 
+     *         // use group IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()
+     *             .group("gitlab_group.new_group.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getGroupIdsResult -> getGroupIdsResult.groupGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getGroupIds(GetGroupIdsArgs args) { + return getGroupIds(args, InvokeOptions.Empty); + } + /** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Group;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetGroupIdsArgs;
+     * 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) {
+     *         var newGroup = new Group("newGroup");
+     * 
+     *         // use group IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()
+     *             .group("gitlab_group.new_group.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getGroupIdsResult -> getGroupIdsResult.groupGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getGroupIdsPlain(GetGroupIdsPlainArgs args) { + return getGroupIdsPlain(args, InvokeOptions.Empty); + } + /** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Group;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetGroupIdsArgs;
+     * 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) {
+     *         var newGroup = new Group("newGroup");
+     * 
+     *         // use group IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()
+     *             .group("gitlab_group.new_group.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getGroupIdsResult -> getGroupIdsResult.groupGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getGroupIds(GetGroupIdsArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("gitlab:index/getGroupIds:getGroupIds", TypeShape.of(GetGroupIdsResult.class), args, Utilities.withVersion(options)); + } + /** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Group;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetGroupIdsArgs;
+     * 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) {
+     *         var newGroup = new Group("newGroup");
+     * 
+     *         // use group IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getGroupIds(GetGroupIdsArgs.builder()
+     *             .group("gitlab_group.new_group.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getGroupIdsResult -> getGroupIdsResult.groupGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getGroupIdsPlain(GetGroupIdsPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("gitlab:index/getGroupIds:getGroupIds", TypeShape.of(GetGroupIdsResult.class), args, Utilities.withVersion(options)); + } /** * The `gitlab.GroupMembership` data source allows to list and filter all members of a group specified by either its id or full path. * @@ -3772,6 +3978,206 @@ public static Output getProjectHooks(GetProjectHooksArgs public static CompletableFuture getProjectHooksPlain(GetProjectHooksPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("gitlab:index/getProjectHooks:getProjectHooks", TypeShape.of(GetProjectHooksResult.class), args, Utilities.withVersion(options)); } + /** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Project;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetProjectIdsArgs;
+     * 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) {
+     *         var newProject = new Project("newProject");
+     * 
+     *         // use project IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()
+     *             .project("gitlab_project.new_project.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getProjectIdsResult -> getProjectIdsResult.projectGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getProjectIds(GetProjectIdsArgs args) { + return getProjectIds(args, InvokeOptions.Empty); + } + /** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Project;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetProjectIdsArgs;
+     * 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) {
+     *         var newProject = new Project("newProject");
+     * 
+     *         // use project IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()
+     *             .project("gitlab_project.new_project.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getProjectIdsResult -> getProjectIdsResult.projectGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getProjectIdsPlain(GetProjectIdsPlainArgs args) { + return getProjectIdsPlain(args, InvokeOptions.Empty); + } + /** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Project;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetProjectIdsArgs;
+     * 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) {
+     *         var newProject = new Project("newProject");
+     * 
+     *         // use project IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()
+     *             .project("gitlab_project.new_project.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getProjectIdsResult -> getProjectIdsResult.projectGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static Output getProjectIds(GetProjectIdsArgs args, InvokeOptions options) { + return Deployment.getInstance().invoke("gitlab:index/getProjectIds:getProjectIds", TypeShape.of(GetProjectIdsResult.class), args, Utilities.withVersion(options)); + } + /** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+     * {@code
+     * package generated_program;
+     * 
+     * import com.pulumi.Context;
+     * import com.pulumi.Pulumi;
+     * import com.pulumi.core.Output;
+     * import com.pulumi.gitlab.Project;
+     * import com.pulumi.gitlab.GitlabFunctions;
+     * import com.pulumi.gitlab.inputs.GetProjectIdsArgs;
+     * 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) {
+     *         var newProject = new Project("newProject");
+     * 
+     *         // use project IDs to get additional information, such as the GraphQL ID
+     *         // for other resources
+     *         final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()
+     *             .project("gitlab_project.new_project.id")
+     *             .build());
+     * 
+     *         ctx.export("graphQLId", foo.applyValue(getProjectIdsResult -> getProjectIdsResult.projectGraphqlId()));
+     *     }
+     * }
+     * }
+     * 
+ * <!--End PulumiCodeChooser --> + * + */ + public static CompletableFuture getProjectIdsPlain(GetProjectIdsPlainArgs args, InvokeOptions options) { + return Deployment.getInstance().invokeAsync("gitlab:index/getProjectIds:getProjectIds", TypeShape.of(GetProjectIdsResult.class), args, Utilities.withVersion(options)); + } /** * The `gitlab.ProjectIssue` data source allows to retrieve details about an issue in a project. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/Group.java b/sdk/java/src/main/java/com/pulumi/gitlab/Group.java index c85541ff..87e624bf 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/Group.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/Group.java @@ -340,6 +340,20 @@ public Output parentId() { public Output path() { return this.path; } + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + @Export(name="permanentlyRemoveOnDelete", refs={Boolean.class}, tree="[0]") + private Output permanentlyRemoveOnDelete; + + /** + * @return Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + public Output> permanentlyRemoveOnDelete() { + return Codegen.optional(this.permanentlyRemoveOnDelete); + } /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/GroupAccessToken.java b/sdk/java/src/main/java/com/pulumi/gitlab/GroupAccessToken.java index ce3901b9..b2682efb 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/GroupAccessToken.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/GroupAccessToken.java @@ -58,7 +58,7 @@ * public static void stack(Context ctx) { * var example = new GroupAccessToken("example", GroupAccessTokenArgs.builder() * .group("25") - * .name("Example project access token") + * .name("Example group access token") * .expiresAt("2020-03-14") * .accessLevel("developer") * .scopes("api") diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/GroupArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/GroupArgs.java index ffc2b562..f82f14a4 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/GroupArgs.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/GroupArgs.java @@ -230,6 +230,21 @@ public Output path() { return this.path; } + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + @Import(name="permanentlyRemoveOnDelete") + private @Nullable Output permanentlyRemoveOnDelete; + + /** + * @return Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + public Optional> permanentlyRemoveOnDelete() { + return Optional.ofNullable(this.permanentlyRemoveOnDelete); + } + /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. * @@ -427,6 +442,7 @@ private GroupArgs(GroupArgs $) { this.name = $.name; this.parentId = $.parentId; this.path = $.path; + this.permanentlyRemoveOnDelete = $.permanentlyRemoveOnDelete; this.preventForkingOutsideGroup = $.preventForkingOutsideGroup; this.projectCreationLevel = $.projectCreationLevel; this.pushRules = $.pushRules; @@ -763,6 +779,27 @@ public Builder path(String path) { return path(Output.of(path)); } + /** + * @param permanentlyRemoveOnDelete Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + * @return builder + * + */ + public Builder permanentlyRemoveOnDelete(@Nullable Output permanentlyRemoveOnDelete) { + $.permanentlyRemoveOnDelete = permanentlyRemoveOnDelete; + return this; + } + + /** + * @param permanentlyRemoveOnDelete Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + * @return builder + * + */ + public Builder permanentlyRemoveOnDelete(Boolean permanentlyRemoveOnDelete) { + return permanentlyRemoveOnDelete(Output.of(permanentlyRemoveOnDelete)); + } + /** * @param preventForkingOutsideGroup Defaults to false. When enabled, users can not fork projects from this group to external namespaces. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachment.java b/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachment.java new file mode 100644 index 00000000..ea705fb8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachment.java @@ -0,0 +1,226 @@ +// *** 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.gitlab; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.gitlab.GroupSecurityPolicyAttachmentArgs; +import com.pulumi.gitlab.Utilities; +import com.pulumi.gitlab.inputs.GroupSecurityPolicyAttachmentState; +import java.lang.String; +import javax.annotation.Nullable; + +/** + * The `gitlab.GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.gitlab.GroupSecurityPolicyAttachment;
+ * import com.pulumi.gitlab.GroupSecurityPolicyAttachmentArgs;
+ * import com.pulumi.gitlab.Project;
+ * import com.pulumi.gitlab.ProjectArgs;
+ * import com.pulumi.gitlab.RepositoryFile;
+ * import com.pulumi.gitlab.RepositoryFileArgs;
+ * 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) {
+ *         // This resource can be used to attach a security policy to a pre-existing group
+ *         var foo = new GroupSecurityPolicyAttachment("foo", GroupSecurityPolicyAttachmentArgs.builder()
+ *             .group(1234)
+ *             .policyProject(4567)
+ *             .build());
+ * 
+ *         // Or you can use Terraform to create a new project, add a policy to that project,
+ *         // then attach that policy project to other groups.
+ *         var my_policy_project = new Project("my-policy-project", ProjectArgs.builder()
+ *             .name("security-policy-project")
+ *             .build());
+ * 
+ *         var policy_yml = new RepositoryFile("policy-yml", RepositoryFileArgs.builder()
+ *             .project(my_policy_project.id())
+ *             .filePath(".gitlab/security-policies/my-policy.yml")
+ *             .branch("master")
+ *             .encoding("text")
+ *             .content("""
+ * ---
+ * approval_policy:
+ * - name: test
+ * description: test
+ * enabled: true
+ * rules:
+ * - type: any_merge_request
+ *     branch_type: protected
+ *     commits: any
+ * approval_settings:
+ *     block_branch_modification: true
+ *     prevent_pushing_and_force_pushing: true
+ *     prevent_approval_by_author: true
+ *     prevent_approval_by_commit_author: true
+ *     remove_approvals_with_new_commit: true
+ *     require_password_to_approve: false
+ * fallback_behavior:
+ *     fail: closed
+ * actions:
+ * - type: send_bot_message
+ *     enabled: true
+ *             """)
+ *             .build());
+ * 
+ *         var my_policy = new GroupSecurityPolicyAttachment("my-policy", GroupSecurityPolicyAttachmentArgs.builder()
+ *             .group(1234)
+ *             .policyProject(my_policy_project.id())
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + * ## Import + * + * GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. + * + * ```sh + * $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 + * ``` + * + */ +@ResourceType(type="gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment") +public class GroupSecurityPolicyAttachment extends com.pulumi.resources.CustomResource { + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + @Export(name="group", refs={String.class}, tree="[0]") + private Output group; + + /** + * @return The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + public Output group() { + return this.group; + } + /** + * The GraphQL ID of the group to which the security policty project will be attached. + * + */ + @Export(name="groupGraphqlId", refs={String.class}, tree="[0]") + private Output groupGraphqlId; + + /** + * @return The GraphQL ID of the group to which the security policty project will be attached. + * + */ + public Output groupGraphqlId() { + return this.groupGraphqlId; + } + /** + * The ID or Full Path of the security policy project. + * + */ + @Export(name="policyProject", refs={String.class}, tree="[0]") + private Output policyProject; + + /** + * @return The ID or Full Path of the security policy project. + * + */ + public Output policyProject() { + return this.policyProject; + } + /** + * The GraphQL ID of the security policy project. + * + */ + @Export(name="policyProjectGraphqlId", refs={String.class}, tree="[0]") + private Output policyProjectGraphqlId; + + /** + * @return The GraphQL ID of the security policy project. + * + */ + public Output policyProjectGraphqlId() { + return this.policyProjectGraphqlId; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public GroupSecurityPolicyAttachment(java.lang.String name) { + this(name, GroupSecurityPolicyAttachmentArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public GroupSecurityPolicyAttachment(java.lang.String name, GroupSecurityPolicyAttachmentArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public GroupSecurityPolicyAttachment(java.lang.String name, GroupSecurityPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private GroupSecurityPolicyAttachment(java.lang.String name, Output id, @Nullable GroupSecurityPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment", name, state, makeResourceOptions(options, id), false); + } + + private static GroupSecurityPolicyAttachmentArgs makeArgs(GroupSecurityPolicyAttachmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? GroupSecurityPolicyAttachmentArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static GroupSecurityPolicyAttachment get(java.lang.String name, Output id, @Nullable GroupSecurityPolicyAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new GroupSecurityPolicyAttachment(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachmentArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachmentArgs.java new file mode 100644 index 00000000..6b0edbda --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/GroupSecurityPolicyAttachmentArgs.java @@ -0,0 +1,125 @@ +// *** 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.gitlab; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GroupSecurityPolicyAttachmentArgs extends com.pulumi.resources.ResourceArgs { + + public static final GroupSecurityPolicyAttachmentArgs Empty = new GroupSecurityPolicyAttachmentArgs(); + + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + @Import(name="group", required=true) + private Output group; + + /** + * @return The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + public Output group() { + return this.group; + } + + /** + * The ID or Full Path of the security policy project. + * + */ + @Import(name="policyProject", required=true) + private Output policyProject; + + /** + * @return The ID or Full Path of the security policy project. + * + */ + public Output policyProject() { + return this.policyProject; + } + + private GroupSecurityPolicyAttachmentArgs() {} + + private GroupSecurityPolicyAttachmentArgs(GroupSecurityPolicyAttachmentArgs $) { + this.group = $.group; + this.policyProject = $.policyProject; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GroupSecurityPolicyAttachmentArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GroupSecurityPolicyAttachmentArgs $; + + public Builder() { + $ = new GroupSecurityPolicyAttachmentArgs(); + } + + public Builder(GroupSecurityPolicyAttachmentArgs defaults) { + $ = new GroupSecurityPolicyAttachmentArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param group The ID or Full Path of the group which will have the security policy project assigned to it. + * + * @return builder + * + */ + public Builder group(Output group) { + $.group = group; + return this; + } + + /** + * @param group The ID or Full Path of the group which will have the security policy project assigned to it. + * + * @return builder + * + */ + public Builder group(String group) { + return group(Output.of(group)); + } + + /** + * @param policyProject The ID or Full Path of the security policy project. + * + * @return builder + * + */ + public Builder policyProject(Output policyProject) { + $.policyProject = policyProject; + return this; + } + + /** + * @param policyProject The ID or Full Path of the security policy project. + * + * @return builder + * + */ + public Builder policyProject(String policyProject) { + return policyProject(Output.of(policyProject)); + } + + public GroupSecurityPolicyAttachmentArgs build() { + if ($.group == null) { + throw new MissingRequiredPropertyException("GroupSecurityPolicyAttachmentArgs", "group"); + } + if ($.policyProject == null) { + throw new MissingRequiredPropertyException("GroupSecurityPolicyAttachmentArgs", "policyProject"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopes.java b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopes.java index 6b5e7d56..1b4dc882 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopes.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopes.java @@ -11,6 +11,7 @@ import com.pulumi.gitlab.Utilities; import com.pulumi.gitlab.inputs.ProjectJobTokenScopesState; import java.lang.Integer; +import java.lang.String; import java.util.List; import javax.annotation.Nullable; @@ -48,21 +49,29 @@ * * public static void stack(Context ctx) { * var allowedSingleProject = new ProjectJobTokenScopes("allowedSingleProject", ProjectJobTokenScopesArgs.builder() - * .projectId(111) + * .project("111") * .targetProjectIds(123) * .build()); * * var allowedMultipleProject = new ProjectJobTokenScopes("allowedMultipleProject", ProjectJobTokenScopesArgs.builder() - * .projectId(111) + * .project("111") * .targetProjectIds( * 123, * 456, * 789) * .build()); * + * var allowedMultipleGroups = new ProjectJobTokenScopes("allowedMultipleGroups", ProjectJobTokenScopesArgs.builder() + * .projectId(111) + * .targetProjectIds() + * .targetGroupIds( + * 321, + * 654) + * .build()); + * * // This will remove all job token scopes, even if added outside of TF. * var explicitDeny = new ProjectJobTokenScopes("explicitDeny", ProjectJobTokenScopesArgs.builder() - * .projectId(111) + * .project("111") * .targetProjectIds() * .build()); * @@ -74,7 +83,7 @@ * * ## Import * - * GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer + * GitLab project job token scopes can be imported using an id made up of just the `project_id` * * ```sh * $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -83,10 +92,28 @@ */ @ResourceType(type="gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes") public class ProjectJobTokenScopes extends com.pulumi.resources.CustomResource { + /** + * The ID or full path of the project. + * + */ + @Export(name="project", refs={String.class}, tree="[0]") + private Output project; + + /** + * @return The ID or full path of the project. + * + */ + public Output project() { + return this.project; + } /** * The ID of the project. * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ @Export(name="projectId", refs={Integer.class}, tree="[0]") private Output projectId; @@ -97,6 +124,20 @@ public class ProjectJobTokenScopes extends com.pulumi.resources.CustomResource { public Output projectId() { return this.projectId; } + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. + * + */ + @Export(name="targetGroupIds", refs={List.class,Integer.class}, tree="[0,1]") + private Output> targetGroupIds; + + /** + * @return A set of group IDs that are in the CI/CD job token inbound allowlist. + * + */ + public Output> targetGroupIds() { + return this.targetGroupIds; + } /** * A set of project IDs that are in the CI/CD job token inbound allowlist. * @@ -124,7 +165,7 @@ public ProjectJobTokenScopes(java.lang.String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public ProjectJobTokenScopes(java.lang.String name, ProjectJobTokenScopesArgs args) { + public ProjectJobTokenScopes(java.lang.String name, @Nullable ProjectJobTokenScopesArgs args) { this(name, args, null); } /** @@ -133,7 +174,7 @@ public ProjectJobTokenScopes(java.lang.String name, ProjectJobTokenScopesArgs ar * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public ProjectJobTokenScopes(java.lang.String name, ProjectJobTokenScopesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public ProjectJobTokenScopes(java.lang.String name, @Nullable ProjectJobTokenScopesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } @@ -141,7 +182,7 @@ private ProjectJobTokenScopes(java.lang.String name, Output id super("gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes", name, state, makeResourceOptions(options, id), false); } - private static ProjectJobTokenScopesArgs makeArgs(ProjectJobTokenScopesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + private static ProjectJobTokenScopesArgs makeArgs(@Nullable ProjectJobTokenScopesArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopesArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopesArgs.java index 72e06286..568c57f0 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopesArgs.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectJobTokenScopesArgs.java @@ -5,50 +5,92 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; -import com.pulumi.exceptions.MissingRequiredPropertyException; import java.lang.Integer; +import java.lang.String; import java.util.List; import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; public final class ProjectJobTokenScopesArgs extends com.pulumi.resources.ResourceArgs { public static final ProjectJobTokenScopesArgs Empty = new ProjectJobTokenScopesArgs(); + /** + * The ID or full path of the project. + * + */ + @Import(name="project") + private @Nullable Output project; + + /** + * @return The ID or full path of the project. + * + */ + public Optional> project() { + return Optional.ofNullable(this.project); + } + /** * The ID of the project. * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ - @Import(name="projectId", required=true) - private Output projectId; + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ + @Import(name="projectId") + private @Nullable Output projectId; /** * @return The ID of the project. * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * + */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ + public Optional> projectId() { + return Optional.ofNullable(this.projectId); + } + + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. + * + */ + @Import(name="targetGroupIds") + private @Nullable Output> targetGroupIds; + + /** + * @return A set of group IDs that are in the CI/CD job token inbound allowlist. + * */ - public Output projectId() { - return this.projectId; + public Optional>> targetGroupIds() { + return Optional.ofNullable(this.targetGroupIds); } /** * A set of project IDs that are in the CI/CD job token inbound allowlist. * */ - @Import(name="targetProjectIds", required=true) - private Output> targetProjectIds; + @Import(name="targetProjectIds") + private @Nullable Output> targetProjectIds; /** * @return A set of project IDs that are in the CI/CD job token inbound allowlist. * */ - public Output> targetProjectIds() { - return this.targetProjectIds; + public Optional>> targetProjectIds() { + return Optional.ofNullable(this.targetProjectIds); } private ProjectJobTokenScopesArgs() {} private ProjectJobTokenScopesArgs(ProjectJobTokenScopesArgs $) { + this.project = $.project; this.projectId = $.projectId; + this.targetGroupIds = $.targetGroupIds; this.targetProjectIds = $.targetProjectIds; } @@ -70,13 +112,38 @@ public Builder(ProjectJobTokenScopesArgs defaults) { $ = new ProjectJobTokenScopesArgs(Objects.requireNonNull(defaults)); } + /** + * @param project The ID or full path of the project. + * + * @return builder + * + */ + public Builder project(@Nullable Output project) { + $.project = project; + return this; + } + + /** + * @param project The ID or full path of the project. + * + * @return builder + * + */ + public Builder project(String project) { + return project(Output.of(project)); + } + /** * @param projectId The ID of the project. * * @return builder * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ - public Builder projectId(Output projectId) { + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ + public Builder projectId(@Nullable Output projectId) { $.projectId = projectId; return this; } @@ -86,18 +153,53 @@ public Builder projectId(Output projectId) { * * @return builder * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ public Builder projectId(Integer projectId) { return projectId(Output.of(projectId)); } + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(@Nullable Output> targetGroupIds) { + $.targetGroupIds = targetGroupIds; + return this; + } + + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(List targetGroupIds) { + return targetGroupIds(Output.of(targetGroupIds)); + } + + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(Integer... targetGroupIds) { + return targetGroupIds(List.of(targetGroupIds)); + } + /** * @param targetProjectIds A set of project IDs that are in the CI/CD job token inbound allowlist. * * @return builder * */ - public Builder targetProjectIds(Output> targetProjectIds) { + public Builder targetProjectIds(@Nullable Output> targetProjectIds) { $.targetProjectIds = targetProjectIds; return this; } @@ -123,12 +225,6 @@ public Builder targetProjectIds(Integer... targetProjectIds) { } public ProjectJobTokenScopesArgs build() { - if ($.projectId == null) { - throw new MissingRequiredPropertyException("ProjectJobTokenScopesArgs", "projectId"); - } - if ($.targetProjectIds == null) { - throw new MissingRequiredPropertyException("ProjectJobTokenScopesArgs", "targetProjectIds"); - } return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectSecurityPolicyAttachment.java b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectSecurityPolicyAttachment.java index 6346ff3d..b8abbfdf 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/ProjectSecurityPolicyAttachment.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/ProjectSecurityPolicyAttachment.java @@ -34,8 +34,6 @@ * import com.pulumi.gitlab.ProjectArgs; * import com.pulumi.gitlab.RepositoryFile; * import com.pulumi.gitlab.RepositoryFileArgs; - * import com.pulumi.gitlab.projectSecurityPolicy; - * import com.pulumi.gitlab.ProjectSecurityPolicyArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -91,7 +89,7 @@ * """) * .build()); * - * var my_policy = new ProjectSecurityPolicy("my-policy", ProjectSecurityPolicyArgs.builder() + * var my_policy = new ProjectSecurityPolicyAttachment("my-policy", ProjectSecurityPolicyAttachmentArgs.builder() * .project(1234) * .policyProject(my_policy_project.id()) * .build()); diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ApplicationSettingsState.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ApplicationSettingsState.java index 87d67bf8..403c7e07 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ApplicationSettingsState.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ApplicationSettingsState.java @@ -2088,6 +2088,13 @@ public Optional> maxSshKeyLifetime() { return Optional.ofNullable(this.maxSshKeyLifetime); } + @Import(name="maxTerraformStateSizeBytes") + private @Nullable Output maxTerraformStateSizeBytes; + + public Optional> maxTerraformStateSizeBytes() { + return Optional.ofNullable(this.maxTerraformStateSizeBytes); + } + /** * A method call is only tracked when it takes longer than the given amount of milliseconds. * @@ -3817,6 +3824,7 @@ private ApplicationSettingsState(ApplicationSettingsState $) { this.maxPagesSize = $.maxPagesSize; this.maxPersonalAccessTokenLifetime = $.maxPersonalAccessTokenLifetime; this.maxSshKeyLifetime = $.maxSshKeyLifetime; + this.maxTerraformStateSizeBytes = $.maxTerraformStateSizeBytes; this.metricsMethodCallThreshold = $.metricsMethodCallThreshold; this.minimumPasswordLength = $.minimumPasswordLength; this.mirrorAvailable = $.mirrorAvailable; @@ -6917,6 +6925,15 @@ public Builder maxSshKeyLifetime(Integer maxSshKeyLifetime) { return maxSshKeyLifetime(Output.of(maxSshKeyLifetime)); } + public Builder maxTerraformStateSizeBytes(@Nullable Output maxTerraformStateSizeBytes) { + $.maxTerraformStateSizeBytes = maxTerraformStateSizeBytes; + return this; + } + + public Builder maxTerraformStateSizeBytes(Integer maxTerraformStateSizeBytes) { + return maxTerraformStateSizeBytes(Output.of(maxTerraformStateSizeBytes)); + } + /** * @param metricsMethodCallThreshold A method call is only tracked when it takes longer than the given amount of milliseconds. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsArgs.java new file mode 100644 index 00000000..5f8bb986 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsArgs.java @@ -0,0 +1,85 @@ +// *** 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.gitlab.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetGroupIdsArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetGroupIdsArgs Empty = new GetGroupIdsArgs(); + + /** + * The ID or URL-encoded path of the group. + * + */ + @Import(name="group", required=true) + private Output group; + + /** + * @return The ID or URL-encoded path of the group. + * + */ + public Output group() { + return this.group; + } + + private GetGroupIdsArgs() {} + + private GetGroupIdsArgs(GetGroupIdsArgs $) { + this.group = $.group; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetGroupIdsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetGroupIdsArgs $; + + public Builder() { + $ = new GetGroupIdsArgs(); + } + + public Builder(GetGroupIdsArgs defaults) { + $ = new GetGroupIdsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param group The ID or URL-encoded path of the group. + * + * @return builder + * + */ + public Builder group(Output group) { + $.group = group; + return this; + } + + /** + * @param group The ID or URL-encoded path of the group. + * + * @return builder + * + */ + public Builder group(String group) { + return group(Output.of(group)); + } + + public GetGroupIdsArgs build() { + if ($.group == null) { + throw new MissingRequiredPropertyException("GetGroupIdsArgs", "group"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsPlainArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsPlainArgs.java new file mode 100644 index 00000000..73af33c4 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetGroupIdsPlainArgs.java @@ -0,0 +1,74 @@ +// *** 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.gitlab.inputs; + +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetGroupIdsPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetGroupIdsPlainArgs Empty = new GetGroupIdsPlainArgs(); + + /** + * The ID or URL-encoded path of the group. + * + */ + @Import(name="group", required=true) + private String group; + + /** + * @return The ID or URL-encoded path of the group. + * + */ + public String group() { + return this.group; + } + + private GetGroupIdsPlainArgs() {} + + private GetGroupIdsPlainArgs(GetGroupIdsPlainArgs $) { + this.group = $.group; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetGroupIdsPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetGroupIdsPlainArgs $; + + public Builder() { + $ = new GetGroupIdsPlainArgs(); + } + + public Builder(GetGroupIdsPlainArgs defaults) { + $ = new GetGroupIdsPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param group The ID or URL-encoded path of the group. + * + * @return builder + * + */ + public Builder group(String group) { + $.group = group; + return this; + } + + public GetGroupIdsPlainArgs build() { + if ($.group == null) { + throw new MissingRequiredPropertyException("GetGroupIdsPlainArgs", "group"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsArgs.java new file mode 100644 index 00000000..939c972a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsArgs.java @@ -0,0 +1,85 @@ +// *** 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.gitlab.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetProjectIdsArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetProjectIdsArgs Empty = new GetProjectIdsArgs(); + + /** + * The ID or URL-encoded path of the project. + * + */ + @Import(name="project", required=true) + private Output project; + + /** + * @return The ID or URL-encoded path of the project. + * + */ + public Output project() { + return this.project; + } + + private GetProjectIdsArgs() {} + + private GetProjectIdsArgs(GetProjectIdsArgs $) { + this.project = $.project; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetProjectIdsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetProjectIdsArgs $; + + public Builder() { + $ = new GetProjectIdsArgs(); + } + + public Builder(GetProjectIdsArgs defaults) { + $ = new GetProjectIdsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param project The ID or URL-encoded path of the project. + * + * @return builder + * + */ + public Builder project(Output project) { + $.project = project; + return this; + } + + /** + * @param project The ID or URL-encoded path of the project. + * + * @return builder + * + */ + public Builder project(String project) { + return project(Output.of(project)); + } + + public GetProjectIdsArgs build() { + if ($.project == null) { + throw new MissingRequiredPropertyException("GetProjectIdsArgs", "project"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsPlainArgs.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsPlainArgs.java new file mode 100644 index 00000000..74638d69 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GetProjectIdsPlainArgs.java @@ -0,0 +1,74 @@ +// *** 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.gitlab.inputs; + +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class GetProjectIdsPlainArgs extends com.pulumi.resources.InvokeArgs { + + public static final GetProjectIdsPlainArgs Empty = new GetProjectIdsPlainArgs(); + + /** + * The ID or URL-encoded path of the project. + * + */ + @Import(name="project", required=true) + private String project; + + /** + * @return The ID or URL-encoded path of the project. + * + */ + public String project() { + return this.project; + } + + private GetProjectIdsPlainArgs() {} + + private GetProjectIdsPlainArgs(GetProjectIdsPlainArgs $) { + this.project = $.project; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GetProjectIdsPlainArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GetProjectIdsPlainArgs $; + + public Builder() { + $ = new GetProjectIdsPlainArgs(); + } + + public Builder(GetProjectIdsPlainArgs defaults) { + $ = new GetProjectIdsPlainArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param project The ID or URL-encoded path of the project. + * + * @return builder + * + */ + public Builder project(String project) { + $.project = project; + return this; + } + + public GetProjectIdsPlainArgs build() { + if ($.project == null) { + throw new MissingRequiredPropertyException("GetProjectIdsPlainArgs", "project"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupSecurityPolicyAttachmentState.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupSecurityPolicyAttachmentState.java new file mode 100644 index 00000000..e6883cec --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupSecurityPolicyAttachmentState.java @@ -0,0 +1,194 @@ +// *** 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.gitlab.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class GroupSecurityPolicyAttachmentState extends com.pulumi.resources.ResourceArgs { + + public static final GroupSecurityPolicyAttachmentState Empty = new GroupSecurityPolicyAttachmentState(); + + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + @Import(name="group") + private @Nullable Output group; + + /** + * @return The ID or Full Path of the group which will have the security policy project assigned to it. + * + */ + public Optional> group() { + return Optional.ofNullable(this.group); + } + + /** + * The GraphQL ID of the group to which the security policty project will be attached. + * + */ + @Import(name="groupGraphqlId") + private @Nullable Output groupGraphqlId; + + /** + * @return The GraphQL ID of the group to which the security policty project will be attached. + * + */ + public Optional> groupGraphqlId() { + return Optional.ofNullable(this.groupGraphqlId); + } + + /** + * The ID or Full Path of the security policy project. + * + */ + @Import(name="policyProject") + private @Nullable Output policyProject; + + /** + * @return The ID or Full Path of the security policy project. + * + */ + public Optional> policyProject() { + return Optional.ofNullable(this.policyProject); + } + + /** + * The GraphQL ID of the security policy project. + * + */ + @Import(name="policyProjectGraphqlId") + private @Nullable Output policyProjectGraphqlId; + + /** + * @return The GraphQL ID of the security policy project. + * + */ + public Optional> policyProjectGraphqlId() { + return Optional.ofNullable(this.policyProjectGraphqlId); + } + + private GroupSecurityPolicyAttachmentState() {} + + private GroupSecurityPolicyAttachmentState(GroupSecurityPolicyAttachmentState $) { + this.group = $.group; + this.groupGraphqlId = $.groupGraphqlId; + this.policyProject = $.policyProject; + this.policyProjectGraphqlId = $.policyProjectGraphqlId; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(GroupSecurityPolicyAttachmentState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private GroupSecurityPolicyAttachmentState $; + + public Builder() { + $ = new GroupSecurityPolicyAttachmentState(); + } + + public Builder(GroupSecurityPolicyAttachmentState defaults) { + $ = new GroupSecurityPolicyAttachmentState(Objects.requireNonNull(defaults)); + } + + /** + * @param group The ID or Full Path of the group which will have the security policy project assigned to it. + * + * @return builder + * + */ + public Builder group(@Nullable Output group) { + $.group = group; + return this; + } + + /** + * @param group The ID or Full Path of the group which will have the security policy project assigned to it. + * + * @return builder + * + */ + public Builder group(String group) { + return group(Output.of(group)); + } + + /** + * @param groupGraphqlId The GraphQL ID of the group to which the security policty project will be attached. + * + * @return builder + * + */ + public Builder groupGraphqlId(@Nullable Output groupGraphqlId) { + $.groupGraphqlId = groupGraphqlId; + return this; + } + + /** + * @param groupGraphqlId The GraphQL ID of the group to which the security policty project will be attached. + * + * @return builder + * + */ + public Builder groupGraphqlId(String groupGraphqlId) { + return groupGraphqlId(Output.of(groupGraphqlId)); + } + + /** + * @param policyProject The ID or Full Path of the security policy project. + * + * @return builder + * + */ + public Builder policyProject(@Nullable Output policyProject) { + $.policyProject = policyProject; + return this; + } + + /** + * @param policyProject The ID or Full Path of the security policy project. + * + * @return builder + * + */ + public Builder policyProject(String policyProject) { + return policyProject(Output.of(policyProject)); + } + + /** + * @param policyProjectGraphqlId The GraphQL ID of the security policy project. + * + * @return builder + * + */ + public Builder policyProjectGraphqlId(@Nullable Output policyProjectGraphqlId) { + $.policyProjectGraphqlId = policyProjectGraphqlId; + return this; + } + + /** + * @param policyProjectGraphqlId The GraphQL ID of the security policy project. + * + * @return builder + * + */ + public Builder policyProjectGraphqlId(String policyProjectGraphqlId) { + return policyProjectGraphqlId(Output.of(policyProjectGraphqlId)); + } + + public GroupSecurityPolicyAttachmentState build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupState.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupState.java index c1c585b1..b98321af 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupState.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/GroupState.java @@ -274,6 +274,21 @@ public Optional> path() { return Optional.ofNullable(this.path); } + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + @Import(name="permanentlyRemoveOnDelete") + private @Nullable Output permanentlyRemoveOnDelete; + + /** + * @return Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + */ + public Optional> permanentlyRemoveOnDelete() { + return Optional.ofNullable(this.permanentlyRemoveOnDelete); + } + /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. * @@ -504,6 +519,7 @@ private GroupState(GroupState $) { this.name = $.name; this.parentId = $.parentId; this.path = $.path; + this.permanentlyRemoveOnDelete = $.permanentlyRemoveOnDelete; this.preventForkingOutsideGroup = $.preventForkingOutsideGroup; this.projectCreationLevel = $.projectCreationLevel; this.pushRules = $.pushRules; @@ -905,6 +921,27 @@ public Builder path(String path) { return path(Output.of(path)); } + /** + * @param permanentlyRemoveOnDelete Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + * @return builder + * + */ + public Builder permanentlyRemoveOnDelete(@Nullable Output permanentlyRemoveOnDelete) { + $.permanentlyRemoveOnDelete = permanentlyRemoveOnDelete; + return this; + } + + /** + * @param permanentlyRemoveOnDelete Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + * + * @return builder + * + */ + public Builder permanentlyRemoveOnDelete(Boolean permanentlyRemoveOnDelete) { + return permanentlyRemoveOnDelete(Output.of(permanentlyRemoveOnDelete)); + } + /** * @param preventForkingOutsideGroup Defaults to false. When enabled, users can not fork projects from this group to external namespaces. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ProjectJobTokenScopesState.java b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ProjectJobTokenScopesState.java index 87e83f2b..95fb9d4d 100644 --- a/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ProjectJobTokenScopesState.java +++ b/sdk/java/src/main/java/com/pulumi/gitlab/inputs/ProjectJobTokenScopesState.java @@ -6,6 +6,7 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; +import java.lang.String; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -16,21 +17,59 @@ public final class ProjectJobTokenScopesState extends com.pulumi.resources.Resou public static final ProjectJobTokenScopesState Empty = new ProjectJobTokenScopesState(); + /** + * The ID or full path of the project. + * + */ + @Import(name="project") + private @Nullable Output project; + + /** + * @return The ID or full path of the project. + * + */ + public Optional> project() { + return Optional.ofNullable(this.project); + } + /** * The ID of the project. * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ @Import(name="projectId") private @Nullable Output projectId; /** * @return The ID of the project. * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ public Optional> projectId() { return Optional.ofNullable(this.projectId); } + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. + * + */ + @Import(name="targetGroupIds") + private @Nullable Output> targetGroupIds; + + /** + * @return A set of group IDs that are in the CI/CD job token inbound allowlist. + * + */ + public Optional>> targetGroupIds() { + return Optional.ofNullable(this.targetGroupIds); + } + /** * A set of project IDs that are in the CI/CD job token inbound allowlist. * @@ -49,7 +88,9 @@ public Optional>> targetProjectIds() { private ProjectJobTokenScopesState() {} private ProjectJobTokenScopesState(ProjectJobTokenScopesState $) { + this.project = $.project; this.projectId = $.projectId; + this.targetGroupIds = $.targetGroupIds; this.targetProjectIds = $.targetProjectIds; } @@ -71,12 +112,37 @@ public Builder(ProjectJobTokenScopesState defaults) { $ = new ProjectJobTokenScopesState(Objects.requireNonNull(defaults)); } + /** + * @param project The ID or full path of the project. + * + * @return builder + * + */ + public Builder project(@Nullable Output project) { + $.project = project; + return this; + } + + /** + * @param project The ID or full path of the project. + * + * @return builder + * + */ + public Builder project(String project) { + return project(Output.of(project)); + } + /** * @param projectId The ID of the project. * * @return builder * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ public Builder projectId(@Nullable Output projectId) { $.projectId = projectId; return this; @@ -87,11 +153,46 @@ public Builder projectId(@Nullable Output projectId) { * * @return builder * + * @deprecated + * `project_id` has been deprecated. Use `project` instead. + * */ + @Deprecated /* `project_id` has been deprecated. Use `project` instead. */ public Builder projectId(Integer projectId) { return projectId(Output.of(projectId)); } + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(@Nullable Output> targetGroupIds) { + $.targetGroupIds = targetGroupIds; + return this; + } + + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(List targetGroupIds) { + return targetGroupIds(Output.of(targetGroupIds)); + } + + /** + * @param targetGroupIds A set of group IDs that are in the CI/CD job token inbound allowlist. + * + * @return builder + * + */ + public Builder targetGroupIds(Integer... targetGroupIds) { + return targetGroupIds(List.of(targetGroupIds)); + } + /** * @param targetProjectIds A set of project IDs that are in the CI/CD job token inbound allowlist. * diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetGroupIdsResult.java b/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetGroupIdsResult.java new file mode 100644 index 00000000..f014edac --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetGroupIdsResult.java @@ -0,0 +1,142 @@ +// *** 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.gitlab.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class GetGroupIdsResult { + /** + * @return The ID or URL-encoded path of the group. + * + */ + private String group; + /** + * @return The full path of the group. + * + */ + private String groupFullPath; + /** + * @return The GraphQL ID of the group. + * + */ + private String groupGraphqlId; + /** + * @return The ID of the group. + * + */ + private String groupId; + private String id; + + private GetGroupIdsResult() {} + /** + * @return The ID or URL-encoded path of the group. + * + */ + public String group() { + return this.group; + } + /** + * @return The full path of the group. + * + */ + public String groupFullPath() { + return this.groupFullPath; + } + /** + * @return The GraphQL ID of the group. + * + */ + public String groupGraphqlId() { + return this.groupGraphqlId; + } + /** + * @return The ID of the group. + * + */ + public String groupId() { + return this.groupId; + } + public String id() { + return this.id; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetGroupIdsResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String group; + private String groupFullPath; + private String groupGraphqlId; + private String groupId; + private String id; + public Builder() {} + public Builder(GetGroupIdsResult defaults) { + Objects.requireNonNull(defaults); + this.group = defaults.group; + this.groupFullPath = defaults.groupFullPath; + this.groupGraphqlId = defaults.groupGraphqlId; + this.groupId = defaults.groupId; + this.id = defaults.id; + } + + @CustomType.Setter + public Builder group(String group) { + if (group == null) { + throw new MissingRequiredPropertyException("GetGroupIdsResult", "group"); + } + this.group = group; + return this; + } + @CustomType.Setter + public Builder groupFullPath(String groupFullPath) { + if (groupFullPath == null) { + throw new MissingRequiredPropertyException("GetGroupIdsResult", "groupFullPath"); + } + this.groupFullPath = groupFullPath; + return this; + } + @CustomType.Setter + public Builder groupGraphqlId(String groupGraphqlId) { + if (groupGraphqlId == null) { + throw new MissingRequiredPropertyException("GetGroupIdsResult", "groupGraphqlId"); + } + this.groupGraphqlId = groupGraphqlId; + return this; + } + @CustomType.Setter + public Builder groupId(String groupId) { + if (groupId == null) { + throw new MissingRequiredPropertyException("GetGroupIdsResult", "groupId"); + } + this.groupId = groupId; + return this; + } + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetGroupIdsResult", "id"); + } + this.id = id; + return this; + } + public GetGroupIdsResult build() { + final var _resultValue = new GetGroupIdsResult(); + _resultValue.group = group; + _resultValue.groupFullPath = groupFullPath; + _resultValue.groupGraphqlId = groupGraphqlId; + _resultValue.groupId = groupId; + _resultValue.id = id; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetProjectIdsResult.java b/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetProjectIdsResult.java new file mode 100644 index 00000000..130589f8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/gitlab/outputs/GetProjectIdsResult.java @@ -0,0 +1,142 @@ +// *** 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.gitlab.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class GetProjectIdsResult { + private String id; + /** + * @return The ID or URL-encoded path of the project. + * + */ + private String project; + /** + * @return The full path of the project. + * + */ + private String projectFullPath; + /** + * @return The GraphQL ID of the project. + * + */ + private String projectGraphqlId; + /** + * @return The ID of the project. + * + */ + private String projectId; + + private GetProjectIdsResult() {} + public String id() { + return this.id; + } + /** + * @return The ID or URL-encoded path of the project. + * + */ + public String project() { + return this.project; + } + /** + * @return The full path of the project. + * + */ + public String projectFullPath() { + return this.projectFullPath; + } + /** + * @return The GraphQL ID of the project. + * + */ + public String projectGraphqlId() { + return this.projectGraphqlId; + } + /** + * @return The ID of the project. + * + */ + public String projectId() { + return this.projectId; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(GetProjectIdsResult defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private String project; + private String projectFullPath; + private String projectGraphqlId; + private String projectId; + public Builder() {} + public Builder(GetProjectIdsResult defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.project = defaults.project; + this.projectFullPath = defaults.projectFullPath; + this.projectGraphqlId = defaults.projectGraphqlId; + this.projectId = defaults.projectId; + } + + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("GetProjectIdsResult", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder project(String project) { + if (project == null) { + throw new MissingRequiredPropertyException("GetProjectIdsResult", "project"); + } + this.project = project; + return this; + } + @CustomType.Setter + public Builder projectFullPath(String projectFullPath) { + if (projectFullPath == null) { + throw new MissingRequiredPropertyException("GetProjectIdsResult", "projectFullPath"); + } + this.projectFullPath = projectFullPath; + return this; + } + @CustomType.Setter + public Builder projectGraphqlId(String projectGraphqlId) { + if (projectGraphqlId == null) { + throw new MissingRequiredPropertyException("GetProjectIdsResult", "projectGraphqlId"); + } + this.projectGraphqlId = projectGraphqlId; + return this; + } + @CustomType.Setter + public Builder projectId(String projectId) { + if (projectId == null) { + throw new MissingRequiredPropertyException("GetProjectIdsResult", "projectId"); + } + this.projectId = projectId; + return this; + } + public GetProjectIdsResult build() { + final var _resultValue = new GetProjectIdsResult(); + _resultValue.id = id; + _resultValue.project = project; + _resultValue.projectFullPath = projectFullPath; + _resultValue.projectGraphqlId = projectGraphqlId; + _resultValue.projectId = projectId; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/applicationSettings.ts b/sdk/nodejs/applicationSettings.ts index d4e6beef..6d7c1e33 100644 --- a/sdk/nodejs/applicationSettings.ts +++ b/sdk/nodejs/applicationSettings.ts @@ -587,6 +587,7 @@ export class ApplicationSettings extends pulumi.CustomResource { * Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. */ public readonly maxSshKeyLifetime!: pulumi.Output; + public readonly maxTerraformStateSizeBytes!: pulumi.Output; /** * A method call is only tracked when it takes longer than the given amount of milliseconds. */ @@ -1161,6 +1162,7 @@ export class ApplicationSettings extends pulumi.CustomResource { resourceInputs["maxPagesSize"] = state ? state.maxPagesSize : undefined; resourceInputs["maxPersonalAccessTokenLifetime"] = state ? state.maxPersonalAccessTokenLifetime : undefined; resourceInputs["maxSshKeyLifetime"] = state ? state.maxSshKeyLifetime : undefined; + resourceInputs["maxTerraformStateSizeBytes"] = state ? state.maxTerraformStateSizeBytes : undefined; resourceInputs["metricsMethodCallThreshold"] = state ? state.metricsMethodCallThreshold : undefined; resourceInputs["minimumPasswordLength"] = state ? state.minimumPasswordLength : undefined; resourceInputs["mirrorAvailable"] = state ? state.mirrorAvailable : undefined; @@ -1405,6 +1407,7 @@ export class ApplicationSettings extends pulumi.CustomResource { resourceInputs["maxPagesSize"] = args ? args.maxPagesSize : undefined; resourceInputs["maxPersonalAccessTokenLifetime"] = args ? args.maxPersonalAccessTokenLifetime : undefined; resourceInputs["maxSshKeyLifetime"] = args ? args.maxSshKeyLifetime : undefined; + resourceInputs["maxTerraformStateSizeBytes"] = args ? args.maxTerraformStateSizeBytes : undefined; resourceInputs["metricsMethodCallThreshold"] = args ? args.metricsMethodCallThreshold : undefined; resourceInputs["minimumPasswordLength"] = args ? args.minimumPasswordLength : undefined; resourceInputs["mirrorAvailable"] = args ? args.mirrorAvailable : undefined; @@ -2075,6 +2078,7 @@ export interface ApplicationSettingsState { * Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. */ maxSshKeyLifetime?: pulumi.Input; + maxTerraformStateSizeBytes?: pulumi.Input; /** * A method call is only tracked when it takes longer than the given amount of milliseconds. */ @@ -3057,6 +3061,7 @@ export interface ApplicationSettingsArgs { * Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6. */ maxSshKeyLifetime?: pulumi.Input; + maxTerraformStateSizeBytes?: pulumi.Input; /** * A method call is only tracked when it takes longer than the given amount of milliseconds. */ diff --git a/sdk/nodejs/getGroupIds.ts b/sdk/nodejs/getGroupIds.ts new file mode 100644 index 00000000..b5d5a9a4 --- /dev/null +++ b/sdk/nodejs/getGroupIds.ts @@ -0,0 +1,99 @@ +// *** 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"; + +/** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const newGroup = new gitlab.Group("new_group", {}); + * // use group IDs to get additional information, such as the GraphQL ID + * // for other resources + * const foo = gitlab.getGroupIds({ + * group: "gitlab_group.new_group.id", + * }); + * export const graphQLId = foo.then(foo => foo.groupGraphqlId); + * ``` + */ +export function getGroupIds(args: GetGroupIdsArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("gitlab:index/getGroupIds:getGroupIds", { + "group": args.group, + }, opts); +} + +/** + * A collection of arguments for invoking getGroupIds. + */ +export interface GetGroupIdsArgs { + /** + * The ID or URL-encoded path of the group. + */ + group: string; +} + +/** + * A collection of values returned by getGroupIds. + */ +export interface GetGroupIdsResult { + /** + * The ID or URL-encoded path of the group. + */ + readonly group: string; + /** + * The full path of the group. + */ + readonly groupFullPath: string; + /** + * The GraphQL ID of the group. + */ + readonly groupGraphqlId: string; + /** + * The ID of the group. + */ + readonly groupId: string; + readonly id: string; +} +/** + * The `gitlab.getGroupIds` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const newGroup = new gitlab.Group("new_group", {}); + * // use group IDs to get additional information, such as the GraphQL ID + * // for other resources + * const foo = gitlab.getGroupIds({ + * group: "gitlab_group.new_group.id", + * }); + * export const graphQLId = foo.then(foo => foo.groupGraphqlId); + * ``` + */ +export function getGroupIdsOutput(args: GetGroupIdsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getGroupIds(a, opts)) +} + +/** + * A collection of arguments for invoking getGroupIds. + */ +export interface GetGroupIdsOutputArgs { + /** + * The ID or URL-encoded path of the group. + */ + group: pulumi.Input; +} diff --git a/sdk/nodejs/getProjectIds.ts b/sdk/nodejs/getProjectIds.ts new file mode 100644 index 00000000..c9974cfb --- /dev/null +++ b/sdk/nodejs/getProjectIds.ts @@ -0,0 +1,99 @@ +// *** 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"; + +/** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const newProject = new gitlab.Project("new_project", {}); + * // use project IDs to get additional information, such as the GraphQL ID + * // for other resources + * const foo = gitlab.getProjectIds({ + * project: "gitlab_project.new_project.id", + * }); + * export const graphQLId = foo.then(foo => foo.projectGraphqlId); + * ``` + */ +export function getProjectIds(args: GetProjectIdsArgs, opts?: pulumi.InvokeOptions): Promise { + + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); + return pulumi.runtime.invoke("gitlab:index/getProjectIds:getProjectIds", { + "project": args.project, + }, opts); +} + +/** + * A collection of arguments for invoking getProjectIds. + */ +export interface GetProjectIdsArgs { + /** + * The ID or URL-encoded path of the project. + */ + project: string; +} + +/** + * A collection of values returned by getProjectIds. + */ +export interface GetProjectIdsResult { + readonly id: string; + /** + * The ID or URL-encoded path of the project. + */ + readonly project: string; + /** + * The full path of the project. + */ + readonly projectFullPath: string; + /** + * The GraphQL ID of the project. + */ + readonly projectGraphqlId: string; + /** + * The ID of the project. + */ + readonly projectId: string; +} +/** + * The `gitlab.getProjectIds` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * const newProject = new gitlab.Project("new_project", {}); + * // use project IDs to get additional information, such as the GraphQL ID + * // for other resources + * const foo = gitlab.getProjectIds({ + * project: "gitlab_project.new_project.id", + * }); + * export const graphQLId = foo.then(foo => foo.projectGraphqlId); + * ``` + */ +export function getProjectIdsOutput(args: GetProjectIdsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { + return pulumi.output(args).apply((a: any) => getProjectIds(a, opts)) +} + +/** + * A collection of arguments for invoking getProjectIds. + */ +export interface GetProjectIdsOutputArgs { + /** + * The ID or URL-encoded path of the project. + */ + project: pulumi.Input; +} diff --git a/sdk/nodejs/group.ts b/sdk/nodejs/group.ts index 9d6bf4fb..529f9848 100644 --- a/sdk/nodejs/group.ts +++ b/sdk/nodejs/group.ts @@ -154,6 +154,10 @@ export class Group extends pulumi.CustomResource { * The path of the group. */ public readonly path!: pulumi.Output; + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + */ + public readonly permanentlyRemoveOnDelete!: pulumi.Output; /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. */ @@ -241,6 +245,7 @@ export class Group extends pulumi.CustomResource { resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parentId"] = state ? state.parentId : undefined; resourceInputs["path"] = state ? state.path : undefined; + resourceInputs["permanentlyRemoveOnDelete"] = state ? state.permanentlyRemoveOnDelete : undefined; resourceInputs["preventForkingOutsideGroup"] = state ? state.preventForkingOutsideGroup : undefined; resourceInputs["projectCreationLevel"] = state ? state.projectCreationLevel : undefined; resourceInputs["pushRules"] = state ? state.pushRules : undefined; @@ -274,6 +279,7 @@ export class Group extends pulumi.CustomResource { resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parentId"] = args ? args.parentId : undefined; resourceInputs["path"] = args ? args.path : undefined; + resourceInputs["permanentlyRemoveOnDelete"] = args ? args.permanentlyRemoveOnDelete : undefined; resourceInputs["preventForkingOutsideGroup"] = args ? args.preventForkingOutsideGroup : undefined; resourceInputs["projectCreationLevel"] = args ? args.projectCreationLevel : undefined; resourceInputs["pushRules"] = args ? args.pushRules : undefined; @@ -371,6 +377,10 @@ export interface GroupState { * The path of the group. */ path?: pulumi.Input; + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + */ + permanentlyRemoveOnDelete?: pulumi.Input; /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. */ @@ -489,6 +499,10 @@ export interface GroupArgs { * The path of the group. */ path: pulumi.Input; + /** + * Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + */ + permanentlyRemoveOnDelete?: pulumi.Input; /** * Defaults to false. When enabled, users can not fork projects from this group to external namespaces. */ diff --git a/sdk/nodejs/groupAccessToken.ts b/sdk/nodejs/groupAccessToken.ts index 5b616dde..ffcc5f2b 100644 --- a/sdk/nodejs/groupAccessToken.ts +++ b/sdk/nodejs/groupAccessToken.ts @@ -25,7 +25,7 @@ import * as utilities from "./utilities"; * * const example = new gitlab.GroupAccessToken("example", { * group: "25", - * name: "Example project access token", + * name: "Example group access token", * expiresAt: "2020-03-14", * accessLevel: "developer", * scopes: ["api"], diff --git a/sdk/nodejs/groupSecurityPolicyAttachment.ts b/sdk/nodejs/groupSecurityPolicyAttachment.ts new file mode 100644 index 00000000..89388b78 --- /dev/null +++ b/sdk/nodejs/groupSecurityPolicyAttachment.ts @@ -0,0 +1,182 @@ +// *** 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"; + +/** + * The `gitlab.GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. + * + * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as gitlab from "@pulumi/gitlab"; + * + * // This resource can be used to attach a security policy to a pre-existing group + * const foo = new gitlab.GroupSecurityPolicyAttachment("foo", { + * group: "1234", + * policyProject: "4567", + * }); + * // Or you can use Terraform to create a new project, add a policy to that project, + * // then attach that policy project to other groups. + * const my_policy_project = new gitlab.Project("my-policy-project", {name: "security-policy-project"}); + * const policy_yml = new gitlab.RepositoryFile("policy-yml", { + * project: my_policy_project.id, + * filePath: ".gitlab/security-policies/my-policy.yml", + * branch: "master", + * encoding: "text", + * content: `--- + * approval_policy: + * - name: test + * description: test + * enabled: true + * rules: + * - type: any_merge_request + * branch_type: protected + * commits: any + * approval_settings: + * block_branch_modification: true + * prevent_pushing_and_force_pushing: true + * prevent_approval_by_author: true + * prevent_approval_by_commit_author: true + * remove_approvals_with_new_commit: true + * require_password_to_approve: false + * fallback_behavior: + * fail: closed + * actions: + * - type: send_bot_message + * enabled: true + * `, + * }); + * const my_policy = new gitlab.GroupSecurityPolicyAttachment("my-policy", { + * group: "1234", + * policyProject: my_policy_project.id, + * }); + * ``` + * + * ## Import + * + * GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. + * + * ```sh + * $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 + * ``` + */ +export class GroupSecurityPolicyAttachment extends pulumi.CustomResource { + /** + * Get an existing GroupSecurityPolicyAttachment resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param state Any extra arguments used during the lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, state?: GroupSecurityPolicyAttachmentState, opts?: pulumi.CustomResourceOptions): GroupSecurityPolicyAttachment { + return new GroupSecurityPolicyAttachment(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment'; + + /** + * Returns true if the given object is an instance of GroupSecurityPolicyAttachment. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is GroupSecurityPolicyAttachment { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === GroupSecurityPolicyAttachment.__pulumiType; + } + + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + */ + public readonly group!: pulumi.Output; + /** + * The GraphQL ID of the group to which the security policty project will be attached. + */ + public /*out*/ readonly groupGraphqlId!: pulumi.Output; + /** + * The ID or Full Path of the security policy project. + */ + public readonly policyProject!: pulumi.Output; + /** + * The GraphQL ID of the security policy project. + */ + public /*out*/ readonly policyProjectGraphqlId!: pulumi.Output; + + /** + * Create a GroupSecurityPolicyAttachment resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: GroupSecurityPolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: GroupSecurityPolicyAttachmentArgs | GroupSecurityPolicyAttachmentState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as GroupSecurityPolicyAttachmentState | undefined; + resourceInputs["group"] = state ? state.group : undefined; + resourceInputs["groupGraphqlId"] = state ? state.groupGraphqlId : undefined; + resourceInputs["policyProject"] = state ? state.policyProject : undefined; + resourceInputs["policyProjectGraphqlId"] = state ? state.policyProjectGraphqlId : undefined; + } else { + const args = argsOrState as GroupSecurityPolicyAttachmentArgs | undefined; + if ((!args || args.group === undefined) && !opts.urn) { + throw new Error("Missing required property 'group'"); + } + if ((!args || args.policyProject === undefined) && !opts.urn) { + throw new Error("Missing required property 'policyProject'"); + } + resourceInputs["group"] = args ? args.group : undefined; + resourceInputs["policyProject"] = args ? args.policyProject : undefined; + resourceInputs["groupGraphqlId"] = undefined /*out*/; + resourceInputs["policyProjectGraphqlId"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(GroupSecurityPolicyAttachment.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering GroupSecurityPolicyAttachment resources. + */ +export interface GroupSecurityPolicyAttachmentState { + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + */ + group?: pulumi.Input; + /** + * The GraphQL ID of the group to which the security policty project will be attached. + */ + groupGraphqlId?: pulumi.Input; + /** + * The ID or Full Path of the security policy project. + */ + policyProject?: pulumi.Input; + /** + * The GraphQL ID of the security policy project. + */ + policyProjectGraphqlId?: pulumi.Input; +} + +/** + * The set of arguments for constructing a GroupSecurityPolicyAttachment resource. + */ +export interface GroupSecurityPolicyAttachmentArgs { + /** + * The ID or Full Path of the group which will have the security policy project assigned to it. + */ + group: pulumi.Input; + /** + * The ID or Full Path of the security policy project. + */ + policyProject: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index a2a3c774..d002f7db 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -100,6 +100,11 @@ export const getGroupHooks: typeof import("./getGroupHooks").getGroupHooks = nul export const getGroupHooksOutput: typeof import("./getGroupHooks").getGroupHooksOutput = null as any; utilities.lazyLoad(exports, ["getGroupHooks","getGroupHooksOutput"], () => require("./getGroupHooks")); +export { GetGroupIdsArgs, GetGroupIdsResult, GetGroupIdsOutputArgs } from "./getGroupIds"; +export const getGroupIds: typeof import("./getGroupIds").getGroupIds = null as any; +export const getGroupIdsOutput: typeof import("./getGroupIds").getGroupIdsOutput = null as any; +utilities.lazyLoad(exports, ["getGroupIds","getGroupIdsOutput"], () => require("./getGroupIds")); + export { GetGroupMembershipArgs, GetGroupMembershipResult, GetGroupMembershipOutputArgs } from "./getGroupMembership"; export const getGroupMembership: typeof import("./getGroupMembership").getGroupMembership = null as any; export const getGroupMembershipOutput: typeof import("./getGroupMembership").getGroupMembershipOutput = null as any; @@ -165,6 +170,11 @@ export const getProjectHooks: typeof import("./getProjectHooks").getProjectHooks export const getProjectHooksOutput: typeof import("./getProjectHooks").getProjectHooksOutput = null as any; utilities.lazyLoad(exports, ["getProjectHooks","getProjectHooksOutput"], () => require("./getProjectHooks")); +export { GetProjectIdsArgs, GetProjectIdsResult, GetProjectIdsOutputArgs } from "./getProjectIds"; +export const getProjectIds: typeof import("./getProjectIds").getProjectIds = null as any; +export const getProjectIdsOutput: typeof import("./getProjectIds").getProjectIdsOutput = null as any; +utilities.lazyLoad(exports, ["getProjectIds","getProjectIdsOutput"], () => require("./getProjectIds")); + export { GetProjectIssueArgs, GetProjectIssueResult, GetProjectIssueOutputArgs } from "./getProjectIssue"; export const getProjectIssue: typeof import("./getProjectIssue").getProjectIssue = null as any; export const getProjectIssueOutput: typeof import("./getProjectIssue").getProjectIssueOutput = null as any; @@ -340,6 +350,11 @@ export type GroupSamlLink = import("./groupSamlLink").GroupSamlLink; export const GroupSamlLink: typeof import("./groupSamlLink").GroupSamlLink = null as any; utilities.lazyLoad(exports, ["GroupSamlLink"], () => require("./groupSamlLink")); +export { GroupSecurityPolicyAttachmentArgs, GroupSecurityPolicyAttachmentState } from "./groupSecurityPolicyAttachment"; +export type GroupSecurityPolicyAttachment = import("./groupSecurityPolicyAttachment").GroupSecurityPolicyAttachment; +export const GroupSecurityPolicyAttachment: typeof import("./groupSecurityPolicyAttachment").GroupSecurityPolicyAttachment = null as any; +utilities.lazyLoad(exports, ["GroupSecurityPolicyAttachment"], () => require("./groupSecurityPolicyAttachment")); + export { GroupShareGroupArgs, GroupShareGroupState } from "./groupShareGroup"; export type GroupShareGroup = import("./groupShareGroup").GroupShareGroup; export const GroupShareGroup: typeof import("./groupShareGroup").GroupShareGroup = null as any; @@ -744,6 +759,8 @@ const _module = { return new GroupProtectedEnvironment(name, undefined, { urn }) case "gitlab:index/groupSamlLink:GroupSamlLink": return new GroupSamlLink(name, undefined, { urn }) + case "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment": + return new GroupSecurityPolicyAttachment(name, undefined, { urn }) case "gitlab:index/groupShareGroup:GroupShareGroup": return new GroupShareGroup(name, undefined, { urn }) case "gitlab:index/groupVariable:GroupVariable": @@ -908,6 +925,7 @@ pulumi.runtime.registerResourceModule("gitlab", "index/groupMembership", _module pulumi.runtime.registerResourceModule("gitlab", "index/groupProjectFileTemplate", _module) pulumi.runtime.registerResourceModule("gitlab", "index/groupProtectedEnvironment", _module) pulumi.runtime.registerResourceModule("gitlab", "index/groupSamlLink", _module) +pulumi.runtime.registerResourceModule("gitlab", "index/groupSecurityPolicyAttachment", _module) pulumi.runtime.registerResourceModule("gitlab", "index/groupShareGroup", _module) pulumi.runtime.registerResourceModule("gitlab", "index/groupVariable", _module) pulumi.runtime.registerResourceModule("gitlab", "index/instanceCluster", _module) diff --git a/sdk/nodejs/projectJobTokenScopes.ts b/sdk/nodejs/projectJobTokenScopes.ts index d3bfee00..668a3505 100644 --- a/sdk/nodejs/projectJobTokenScopes.ts +++ b/sdk/nodejs/projectJobTokenScopes.ts @@ -19,27 +19,35 @@ import * as utilities from "./utilities"; * import * as gitlab from "@pulumi/gitlab"; * * const allowedSingleProject = new gitlab.ProjectJobTokenScopes("allowed_single_project", { - * projectId: 111, + * project: "111", * targetProjectIds: [123], * }); * const allowedMultipleProject = new gitlab.ProjectJobTokenScopes("allowed_multiple_project", { - * projectId: 111, + * project: "111", * targetProjectIds: [ * 123, * 456, * 789, * ], * }); + * const allowedMultipleGroups = new gitlab.ProjectJobTokenScopes("allowed_multiple_groups", { + * projectId: 111, + * targetProjectIds: [], + * targetGroupIds: [ + * 321, + * 654, + * ], + * }); * // This will remove all job token scopes, even if added outside of TF. * const explicitDeny = new gitlab.ProjectJobTokenScopes("explicit_deny", { - * projectId: 111, + * project: "111", * targetProjectIds: [], * }); * ``` * * ## Import * - * GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer + * GitLab project job token scopes can be imported using an id made up of just the `project_id` * * ```sh * $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -73,10 +81,20 @@ export class ProjectJobTokenScopes extends pulumi.CustomResource { return obj['__pulumiType'] === ProjectJobTokenScopes.__pulumiType; } + /** + * The ID or full path of the project. + */ + public readonly project!: pulumi.Output; /** * The ID of the project. + * + * @deprecated `projectId` has been deprecated. Use `project` instead. */ public readonly projectId!: pulumi.Output; + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. + */ + public readonly targetGroupIds!: pulumi.Output; /** * A set of project IDs that are in the CI/CD job token inbound allowlist. */ @@ -89,23 +107,21 @@ export class ProjectJobTokenScopes extends pulumi.CustomResource { * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ - constructor(name: string, args: ProjectJobTokenScopesArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, args?: ProjectJobTokenScopesArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ProjectJobTokenScopesArgs | ProjectJobTokenScopesState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ProjectJobTokenScopesState | undefined; + resourceInputs["project"] = state ? state.project : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; + resourceInputs["targetGroupIds"] = state ? state.targetGroupIds : undefined; resourceInputs["targetProjectIds"] = state ? state.targetProjectIds : undefined; } else { const args = argsOrState as ProjectJobTokenScopesArgs | undefined; - if ((!args || args.projectId === undefined) && !opts.urn) { - throw new Error("Missing required property 'projectId'"); - } - if ((!args || args.targetProjectIds === undefined) && !opts.urn) { - throw new Error("Missing required property 'targetProjectIds'"); - } + resourceInputs["project"] = args ? args.project : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; + resourceInputs["targetGroupIds"] = args ? args.targetGroupIds : undefined; resourceInputs["targetProjectIds"] = args ? args.targetProjectIds : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -117,10 +133,20 @@ export class ProjectJobTokenScopes extends pulumi.CustomResource { * Input properties used for looking up and filtering ProjectJobTokenScopes resources. */ export interface ProjectJobTokenScopesState { + /** + * The ID or full path of the project. + */ + project?: pulumi.Input; /** * The ID of the project. + * + * @deprecated `projectId` has been deprecated. Use `project` instead. */ projectId?: pulumi.Input; + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. + */ + targetGroupIds?: pulumi.Input[]>; /** * A set of project IDs that are in the CI/CD job token inbound allowlist. */ @@ -131,12 +157,22 @@ export interface ProjectJobTokenScopesState { * The set of arguments for constructing a ProjectJobTokenScopes resource. */ export interface ProjectJobTokenScopesArgs { + /** + * The ID or full path of the project. + */ + project?: pulumi.Input; /** * The ID of the project. + * + * @deprecated `projectId` has been deprecated. Use `project` instead. + */ + projectId?: pulumi.Input; + /** + * A set of group IDs that are in the CI/CD job token inbound allowlist. */ - projectId: pulumi.Input; + targetGroupIds?: pulumi.Input[]>; /** * A set of project IDs that are in the CI/CD job token inbound allowlist. */ - targetProjectIds: pulumi.Input[]>; + targetProjectIds?: pulumi.Input[]>; } diff --git a/sdk/nodejs/projectSecurityPolicyAttachment.ts b/sdk/nodejs/projectSecurityPolicyAttachment.ts index ec5be92e..662baa4b 100644 --- a/sdk/nodejs/projectSecurityPolicyAttachment.ts +++ b/sdk/nodejs/projectSecurityPolicyAttachment.ts @@ -51,8 +51,8 @@ import * as utilities from "./utilities"; * enabled: true * `, * }); - * const my_policy = new gitlab.index.ProjectSecurityPolicy("my-policy", { - * project: 1234, + * const my_policy = new gitlab.ProjectSecurityPolicyAttachment("my-policy", { + * project: "1234", * policyProject: my_policy_project.id, * }); * ``` diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index fbdaaeac..045ac135 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -34,6 +34,7 @@ "getGroup.ts", "getGroupHook.ts", "getGroupHooks.ts", + "getGroupIds.ts", "getGroupMembership.ts", "getGroupSubgroups.ts", "getGroupVariable.ts", @@ -47,6 +48,7 @@ "getProjectBranches.ts", "getProjectHook.ts", "getProjectHooks.ts", + "getProjectIds.ts", "getProjectIssue.ts", "getProjectIssues.ts", "getProjectMembership.ts", @@ -82,6 +84,7 @@ "groupProjectFileTemplate.ts", "groupProtectedEnvironment.ts", "groupSamlLink.ts", + "groupSecurityPolicyAttachment.ts", "groupShareGroup.ts", "groupVariable.ts", "index.ts", diff --git a/sdk/python/pulumi_gitlab/__init__.py b/sdk/python/pulumi_gitlab/__init__.py index 7114fc47..4297b2ef 100644 --- a/sdk/python/pulumi_gitlab/__init__.py +++ b/sdk/python/pulumi_gitlab/__init__.py @@ -24,6 +24,7 @@ from .get_group import * from .get_group_hook import * from .get_group_hooks import * +from .get_group_ids import * from .get_group_membership import * from .get_group_subgroups import * from .get_group_variable import * @@ -37,6 +38,7 @@ from .get_project_branches import * from .get_project_hook import * from .get_project_hooks import * +from .get_project_ids import * from .get_project_issue import * from .get_project_issues import * from .get_project_membership import * @@ -72,6 +74,7 @@ from .group_project_file_template import * from .group_protected_environment import * from .group_saml_link import * +from .group_security_policy_attachment import * from .group_share_group import * from .group_variable import * from .instance_cluster import * @@ -353,6 +356,14 @@ "gitlab:index/groupSamlLink:GroupSamlLink": "GroupSamlLink" } }, + { + "pkg": "gitlab", + "mod": "index/groupSecurityPolicyAttachment", + "fqn": "pulumi_gitlab", + "classes": { + "gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment": "GroupSecurityPolicyAttachment" + } + }, { "pkg": "gitlab", "mod": "index/groupShareGroup", diff --git a/sdk/python/pulumi_gitlab/application_settings.py b/sdk/python/pulumi_gitlab/application_settings.py index 323c9023..384c7653 100644 --- a/sdk/python/pulumi_gitlab/application_settings.py +++ b/sdk/python/pulumi_gitlab/application_settings.py @@ -150,6 +150,7 @@ def __init__(__self__, *, max_pages_size: Optional[pulumi.Input[int]] = None, max_personal_access_token_lifetime: Optional[pulumi.Input[int]] = None, max_ssh_key_lifetime: Optional[pulumi.Input[int]] = None, + max_terraform_state_size_bytes: Optional[pulumi.Input[int]] = None, metrics_method_call_threshold: Optional[pulumi.Input[int]] = None, minimum_password_length: Optional[pulumi.Input[int]] = None, mirror_available: Optional[pulumi.Input[bool]] = None, @@ -784,6 +785,8 @@ def __init__(__self__, *, pulumi.set(__self__, "max_personal_access_token_lifetime", max_personal_access_token_lifetime) if max_ssh_key_lifetime is not None: pulumi.set(__self__, "max_ssh_key_lifetime", max_ssh_key_lifetime) + if max_terraform_state_size_bytes is not None: + pulumi.set(__self__, "max_terraform_state_size_bytes", max_terraform_state_size_bytes) if metrics_method_call_threshold is not None: pulumi.set(__self__, "metrics_method_call_threshold", metrics_method_call_threshold) if minimum_password_length is not None: @@ -2634,6 +2637,15 @@ def max_ssh_key_lifetime(self) -> Optional[pulumi.Input[int]]: def max_ssh_key_lifetime(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "max_ssh_key_lifetime", value) + @property + @pulumi.getter(name="maxTerraformStateSizeBytes") + def max_terraform_state_size_bytes(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "max_terraform_state_size_bytes") + + @max_terraform_state_size_bytes.setter + def max_terraform_state_size_bytes(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "max_terraform_state_size_bytes", value) + @property @pulumi.getter(name="metricsMethodCallThreshold") def metrics_method_call_threshold(self) -> Optional[pulumi.Input[int]]: @@ -4046,6 +4058,7 @@ def __init__(__self__, *, max_pages_size: Optional[pulumi.Input[int]] = None, max_personal_access_token_lifetime: Optional[pulumi.Input[int]] = None, max_ssh_key_lifetime: Optional[pulumi.Input[int]] = None, + max_terraform_state_size_bytes: Optional[pulumi.Input[int]] = None, metrics_method_call_threshold: Optional[pulumi.Input[int]] = None, minimum_password_length: Optional[pulumi.Input[int]] = None, mirror_available: Optional[pulumi.Input[bool]] = None, @@ -4680,6 +4693,8 @@ def __init__(__self__, *, pulumi.set(__self__, "max_personal_access_token_lifetime", max_personal_access_token_lifetime) if max_ssh_key_lifetime is not None: pulumi.set(__self__, "max_ssh_key_lifetime", max_ssh_key_lifetime) + if max_terraform_state_size_bytes is not None: + pulumi.set(__self__, "max_terraform_state_size_bytes", max_terraform_state_size_bytes) if metrics_method_call_threshold is not None: pulumi.set(__self__, "metrics_method_call_threshold", metrics_method_call_threshold) if minimum_password_length is not None: @@ -6530,6 +6545,15 @@ def max_ssh_key_lifetime(self) -> Optional[pulumi.Input[int]]: def max_ssh_key_lifetime(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "max_ssh_key_lifetime", value) + @property + @pulumi.getter(name="maxTerraformStateSizeBytes") + def max_terraform_state_size_bytes(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "max_terraform_state_size_bytes") + + @max_terraform_state_size_bytes.setter + def max_terraform_state_size_bytes(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "max_terraform_state_size_bytes", value) + @property @pulumi.getter(name="metricsMethodCallThreshold") def metrics_method_call_threshold(self) -> Optional[pulumi.Input[int]]: @@ -7944,6 +7968,7 @@ def __init__(__self__, max_pages_size: Optional[pulumi.Input[int]] = None, max_personal_access_token_lifetime: Optional[pulumi.Input[int]] = None, max_ssh_key_lifetime: Optional[pulumi.Input[int]] = None, + max_terraform_state_size_bytes: Optional[pulumi.Input[int]] = None, metrics_method_call_threshold: Optional[pulumi.Input[int]] = None, minimum_password_length: Optional[pulumi.Input[int]] = None, mirror_available: Optional[pulumi.Input[bool]] = None, @@ -8461,6 +8486,7 @@ def _internal_init(__self__, max_pages_size: Optional[pulumi.Input[int]] = None, max_personal_access_token_lifetime: Optional[pulumi.Input[int]] = None, max_ssh_key_lifetime: Optional[pulumi.Input[int]] = None, + max_terraform_state_size_bytes: Optional[pulumi.Input[int]] = None, metrics_method_call_threshold: Optional[pulumi.Input[int]] = None, minimum_password_length: Optional[pulumi.Input[int]] = None, mirror_available: Optional[pulumi.Input[bool]] = None, @@ -8712,6 +8738,7 @@ def _internal_init(__self__, __props__.__dict__["max_pages_size"] = max_pages_size __props__.__dict__["max_personal_access_token_lifetime"] = max_personal_access_token_lifetime __props__.__dict__["max_ssh_key_lifetime"] = max_ssh_key_lifetime + __props__.__dict__["max_terraform_state_size_bytes"] = max_terraform_state_size_bytes __props__.__dict__["metrics_method_call_threshold"] = metrics_method_call_threshold __props__.__dict__["minimum_password_length"] = minimum_password_length __props__.__dict__["mirror_available"] = mirror_available @@ -8966,6 +8993,7 @@ def get(resource_name: str, max_pages_size: Optional[pulumi.Input[int]] = None, max_personal_access_token_lifetime: Optional[pulumi.Input[int]] = None, max_ssh_key_lifetime: Optional[pulumi.Input[int]] = None, + max_terraform_state_size_bytes: Optional[pulumi.Input[int]] = None, metrics_method_call_threshold: Optional[pulumi.Input[int]] = None, minimum_password_length: Optional[pulumi.Input[int]] = None, mirror_available: Optional[pulumi.Input[bool]] = None, @@ -9464,6 +9492,7 @@ def get(resource_name: str, __props__.__dict__["max_pages_size"] = max_pages_size __props__.__dict__["max_personal_access_token_lifetime"] = max_personal_access_token_lifetime __props__.__dict__["max_ssh_key_lifetime"] = max_ssh_key_lifetime + __props__.__dict__["max_terraform_state_size_bytes"] = max_terraform_state_size_bytes __props__.__dict__["metrics_method_call_threshold"] = metrics_method_call_threshold __props__.__dict__["minimum_password_length"] = minimum_password_length __props__.__dict__["mirror_available"] = mirror_available @@ -10665,6 +10694,11 @@ def max_ssh_key_lifetime(self) -> pulumi.Output[int]: """ return pulumi.get(self, "max_ssh_key_lifetime") + @property + @pulumi.getter(name="maxTerraformStateSizeBytes") + def max_terraform_state_size_bytes(self) -> pulumi.Output[int]: + return pulumi.get(self, "max_terraform_state_size_bytes") + @property @pulumi.getter(name="metricsMethodCallThreshold") def metrics_method_call_threshold(self) -> pulumi.Output[int]: diff --git a/sdk/python/pulumi_gitlab/get_group_ids.py b/sdk/python/pulumi_gitlab/get_group_ids.py new file mode 100644 index 00000000..d8e75493 --- /dev/null +++ b/sdk/python/pulumi_gitlab/get_group_ids.py @@ -0,0 +1,152 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = [ + 'GetGroupIdsResult', + 'AwaitableGetGroupIdsResult', + 'get_group_ids', + 'get_group_ids_output', +] + +@pulumi.output_type +class GetGroupIdsResult: + """ + A collection of values returned by getGroupIds. + """ + def __init__(__self__, group=None, group_full_path=None, group_graphql_id=None, group_id=None, id=None): + if group and not isinstance(group, str): + raise TypeError("Expected argument 'group' to be a str") + pulumi.set(__self__, "group", group) + if group_full_path and not isinstance(group_full_path, str): + raise TypeError("Expected argument 'group_full_path' to be a str") + pulumi.set(__self__, "group_full_path", group_full_path) + if group_graphql_id and not isinstance(group_graphql_id, str): + raise TypeError("Expected argument 'group_graphql_id' to be a str") + pulumi.set(__self__, "group_graphql_id", group_graphql_id) + if group_id and not isinstance(group_id, str): + raise TypeError("Expected argument 'group_id' to be a str") + pulumi.set(__self__, "group_id", group_id) + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + + @property + @pulumi.getter + def group(self) -> str: + """ + The ID or URL-encoded path of the group. + """ + return pulumi.get(self, "group") + + @property + @pulumi.getter(name="groupFullPath") + def group_full_path(self) -> str: + """ + The full path of the group. + """ + return pulumi.get(self, "group_full_path") + + @property + @pulumi.getter(name="groupGraphqlId") + def group_graphql_id(self) -> str: + """ + The GraphQL ID of the group. + """ + return pulumi.get(self, "group_graphql_id") + + @property + @pulumi.getter(name="groupId") + def group_id(self) -> str: + """ + The ID of the group. + """ + return pulumi.get(self, "group_id") + + @property + @pulumi.getter + def id(self) -> str: + return pulumi.get(self, "id") + + +class AwaitableGetGroupIdsResult(GetGroupIdsResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetGroupIdsResult( + group=self.group, + group_full_path=self.group_full_path, + group_graphql_id=self.group_graphql_id, + group_id=self.group_id, + id=self.id) + + +def get_group_ids(group: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupIdsResult: + """ + The `get_group_ids` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + new_group = gitlab.Group("new_group") + # use group IDs to get additional information, such as the GraphQL ID + # for other resources + foo = gitlab.get_group_ids(group="gitlab_group.new_group.id") + pulumi.export("graphQLId", foo.group_graphql_id) + ``` + + + :param str group: The ID or URL-encoded path of the group. + """ + __args__ = dict() + __args__['group'] = group + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('gitlab:index/getGroupIds:getGroupIds', __args__, opts=opts, typ=GetGroupIdsResult).value + + return AwaitableGetGroupIdsResult( + group=pulumi.get(__ret__, 'group'), + group_full_path=pulumi.get(__ret__, 'group_full_path'), + group_graphql_id=pulumi.get(__ret__, 'group_graphql_id'), + group_id=pulumi.get(__ret__, 'group_id'), + id=pulumi.get(__ret__, 'id')) + + +@_utilities.lift_output_func(get_group_ids) +def get_group_ids_output(group: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGroupIdsResult]: + """ + The `get_group_ids` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + new_group = gitlab.Group("new_group") + # use group IDs to get additional information, such as the GraphQL ID + # for other resources + foo = gitlab.get_group_ids(group="gitlab_group.new_group.id") + pulumi.export("graphQLId", foo.group_graphql_id) + ``` + + + :param str group: The ID or URL-encoded path of the group. + """ + ... diff --git a/sdk/python/pulumi_gitlab/get_project_ids.py b/sdk/python/pulumi_gitlab/get_project_ids.py new file mode 100644 index 00000000..20d1b355 --- /dev/null +++ b/sdk/python/pulumi_gitlab/get_project_ids.py @@ -0,0 +1,152 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities + +__all__ = [ + 'GetProjectIdsResult', + 'AwaitableGetProjectIdsResult', + 'get_project_ids', + 'get_project_ids_output', +] + +@pulumi.output_type +class GetProjectIdsResult: + """ + A collection of values returned by getProjectIds. + """ + def __init__(__self__, id=None, project=None, project_full_path=None, project_graphql_id=None, project_id=None): + if id and not isinstance(id, str): + raise TypeError("Expected argument 'id' to be a str") + pulumi.set(__self__, "id", id) + if project and not isinstance(project, str): + raise TypeError("Expected argument 'project' to be a str") + pulumi.set(__self__, "project", project) + if project_full_path and not isinstance(project_full_path, str): + raise TypeError("Expected argument 'project_full_path' to be a str") + pulumi.set(__self__, "project_full_path", project_full_path) + if project_graphql_id and not isinstance(project_graphql_id, str): + raise TypeError("Expected argument 'project_graphql_id' to be a str") + pulumi.set(__self__, "project_graphql_id", project_graphql_id) + if project_id and not isinstance(project_id, str): + raise TypeError("Expected argument 'project_id' to be a str") + pulumi.set(__self__, "project_id", project_id) + + @property + @pulumi.getter + def id(self) -> str: + return pulumi.get(self, "id") + + @property + @pulumi.getter + def project(self) -> str: + """ + The ID or URL-encoded path of the project. + """ + return pulumi.get(self, "project") + + @property + @pulumi.getter(name="projectFullPath") + def project_full_path(self) -> str: + """ + The full path of the project. + """ + return pulumi.get(self, "project_full_path") + + @property + @pulumi.getter(name="projectGraphqlId") + def project_graphql_id(self) -> str: + """ + The GraphQL ID of the project. + """ + return pulumi.get(self, "project_graphql_id") + + @property + @pulumi.getter(name="projectId") + def project_id(self) -> str: + """ + The ID of the project. + """ + return pulumi.get(self, "project_id") + + +class AwaitableGetProjectIdsResult(GetProjectIdsResult): + # pylint: disable=using-constant-test + def __await__(self): + if False: + yield self + return GetProjectIdsResult( + id=self.id, + project=self.project, + project_full_path=self.project_full_path, + project_graphql_id=self.project_graphql_id, + project_id=self.project_id) + + +def get_project_ids(project: Optional[str] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetProjectIdsResult: + """ + The `get_project_ids` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + new_project = gitlab.Project("new_project") + # use project IDs to get additional information, such as the GraphQL ID + # for other resources + foo = gitlab.get_project_ids(project="gitlab_project.new_project.id") + pulumi.export("graphQLId", foo.project_graphql_id) + ``` + + + :param str project: The ID or URL-encoded path of the project. + """ + __args__ = dict() + __args__['project'] = project + opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + __ret__ = pulumi.runtime.invoke('gitlab:index/getProjectIds:getProjectIds', __args__, opts=opts, typ=GetProjectIdsResult).value + + return AwaitableGetProjectIdsResult( + id=pulumi.get(__ret__, 'id'), + project=pulumi.get(__ret__, 'project'), + project_full_path=pulumi.get(__ret__, 'project_full_path'), + project_graphql_id=pulumi.get(__ret__, 'project_graphql_id'), + project_id=pulumi.get(__ret__, 'project_id')) + + +@_utilities.lift_output_func(get_project_ids) +def get_project_ids_output(project: Optional[pulumi.Input[str]] = None, + opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetProjectIdsResult]: + """ + The `get_project_ids` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + new_project = gitlab.Project("new_project") + # use project IDs to get additional information, such as the GraphQL ID + # for other resources + foo = gitlab.get_project_ids(project="gitlab_project.new_project.id") + pulumi.export("graphQLId", foo.project_graphql_id) + ``` + + + :param str project: The ID or URL-encoded path of the project. + """ + ... diff --git a/sdk/python/pulumi_gitlab/group.py b/sdk/python/pulumi_gitlab/group.py index 2c9b2285..54cef004 100644 --- a/sdk/python/pulumi_gitlab/group.py +++ b/sdk/python/pulumi_gitlab/group.py @@ -30,6 +30,7 @@ def __init__(__self__, *, mentions_disabled: Optional[pulumi.Input[bool]] = None, name: Optional[pulumi.Input[str]] = None, parent_id: Optional[pulumi.Input[int]] = None, + permanently_remove_on_delete: Optional[pulumi.Input[bool]] = None, prevent_forking_outside_group: Optional[pulumi.Input[bool]] = None, project_creation_level: Optional[pulumi.Input[str]] = None, push_rules: Optional[pulumi.Input['GroupPushRulesArgs']] = None, @@ -58,6 +59,7 @@ def __init__(__self__, *, :param pulumi.Input[bool] mentions_disabled: Disable the capability of a group from getting mentioned. :param pulumi.Input[str] name: The name of the group. :param pulumi.Input[int] parent_id: Id of the parent group (creates a nested group). + :param pulumi.Input[bool] permanently_remove_on_delete: Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. :param pulumi.Input[bool] prevent_forking_outside_group: Defaults to false. When enabled, users can not fork projects from this group to external namespaces. :param pulumi.Input[str] project_creation_level: Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` :param pulumi.Input['GroupPushRulesArgs'] push_rules: Push rules for the group. @@ -98,6 +100,8 @@ def __init__(__self__, *, pulumi.set(__self__, "name", name) if parent_id is not None: pulumi.set(__self__, "parent_id", parent_id) + if permanently_remove_on_delete is not None: + pulumi.set(__self__, "permanently_remove_on_delete", permanently_remove_on_delete) if prevent_forking_outside_group is not None: pulumi.set(__self__, "prevent_forking_outside_group", prevent_forking_outside_group) if project_creation_level is not None: @@ -291,6 +295,18 @@ def parent_id(self) -> Optional[pulumi.Input[int]]: def parent_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "parent_id", value) + @property + @pulumi.getter(name="permanentlyRemoveOnDelete") + def permanently_remove_on_delete(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + """ + return pulumi.get(self, "permanently_remove_on_delete") + + @permanently_remove_on_delete.setter + def permanently_remove_on_delete(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "permanently_remove_on_delete", value) + @property @pulumi.getter(name="preventForkingOutsideGroup") def prevent_forking_outside_group(self) -> Optional[pulumi.Input[bool]]: @@ -456,6 +472,7 @@ def __init__(__self__, *, name: Optional[pulumi.Input[str]] = None, parent_id: Optional[pulumi.Input[int]] = None, path: Optional[pulumi.Input[str]] = None, + permanently_remove_on_delete: Optional[pulumi.Input[bool]] = None, prevent_forking_outside_group: Optional[pulumi.Input[bool]] = None, project_creation_level: Optional[pulumi.Input[str]] = None, push_rules: Optional[pulumi.Input['GroupPushRulesArgs']] = None, @@ -489,6 +506,7 @@ def __init__(__self__, *, :param pulumi.Input[str] name: The name of the group. :param pulumi.Input[int] parent_id: Id of the parent group (creates a nested group). :param pulumi.Input[str] path: The path of the group. + :param pulumi.Input[bool] permanently_remove_on_delete: Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. :param pulumi.Input[bool] prevent_forking_outside_group: Defaults to false. When enabled, users can not fork projects from this group to external namespaces. :param pulumi.Input[str] project_creation_level: Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` :param pulumi.Input['GroupPushRulesArgs'] push_rules: Push rules for the group. @@ -538,6 +556,8 @@ def __init__(__self__, *, pulumi.set(__self__, "parent_id", parent_id) if path is not None: pulumi.set(__self__, "path", path) + if permanently_remove_on_delete is not None: + pulumi.set(__self__, "permanently_remove_on_delete", permanently_remove_on_delete) if prevent_forking_outside_group is not None: pulumi.set(__self__, "prevent_forking_outside_group", prevent_forking_outside_group) if project_creation_level is not None: @@ -771,6 +791,18 @@ def path(self) -> Optional[pulumi.Input[str]]: def path(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "path", value) + @property + @pulumi.getter(name="permanentlyRemoveOnDelete") + def permanently_remove_on_delete(self) -> Optional[pulumi.Input[bool]]: + """ + Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + """ + return pulumi.get(self, "permanently_remove_on_delete") + + @permanently_remove_on_delete.setter + def permanently_remove_on_delete(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "permanently_remove_on_delete", value) + @property @pulumi.getter(name="preventForkingOutsideGroup") def prevent_forking_outside_group(self) -> Optional[pulumi.Input[bool]]: @@ -959,6 +991,7 @@ def __init__(__self__, name: Optional[pulumi.Input[str]] = None, parent_id: Optional[pulumi.Input[int]] = None, path: Optional[pulumi.Input[str]] = None, + permanently_remove_on_delete: Optional[pulumi.Input[bool]] = None, prevent_forking_outside_group: Optional[pulumi.Input[bool]] = None, project_creation_level: Optional[pulumi.Input[str]] = None, push_rules: Optional[pulumi.Input[Union['GroupPushRulesArgs', 'GroupPushRulesArgsDict']]] = None, @@ -1037,6 +1070,7 @@ def __init__(__self__, :param pulumi.Input[str] name: The name of the group. :param pulumi.Input[int] parent_id: Id of the parent group (creates a nested group). :param pulumi.Input[str] path: The path of the group. + :param pulumi.Input[bool] permanently_remove_on_delete: Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. :param pulumi.Input[bool] prevent_forking_outside_group: Defaults to false. When enabled, users can not fork projects from this group to external namespaces. :param pulumi.Input[str] project_creation_level: Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` :param pulumi.Input[Union['GroupPushRulesArgs', 'GroupPushRulesArgsDict']] push_rules: Push rules for the group. @@ -1134,6 +1168,7 @@ def _internal_init(__self__, name: Optional[pulumi.Input[str]] = None, parent_id: Optional[pulumi.Input[int]] = None, path: Optional[pulumi.Input[str]] = None, + permanently_remove_on_delete: Optional[pulumi.Input[bool]] = None, prevent_forking_outside_group: Optional[pulumi.Input[bool]] = None, project_creation_level: Optional[pulumi.Input[str]] = None, push_rules: Optional[pulumi.Input[Union['GroupPushRulesArgs', 'GroupPushRulesArgsDict']]] = None, @@ -1171,6 +1206,7 @@ def _internal_init(__self__, if path is None and not opts.urn: raise TypeError("Missing required property 'path'") __props__.__dict__["path"] = path + __props__.__dict__["permanently_remove_on_delete"] = permanently_remove_on_delete __props__.__dict__["prevent_forking_outside_group"] = prevent_forking_outside_group __props__.__dict__["project_creation_level"] = project_creation_level __props__.__dict__["push_rules"] = push_rules @@ -1217,6 +1253,7 @@ def get(resource_name: str, name: Optional[pulumi.Input[str]] = None, parent_id: Optional[pulumi.Input[int]] = None, path: Optional[pulumi.Input[str]] = None, + permanently_remove_on_delete: Optional[pulumi.Input[bool]] = None, prevent_forking_outside_group: Optional[pulumi.Input[bool]] = None, project_creation_level: Optional[pulumi.Input[str]] = None, push_rules: Optional[pulumi.Input[Union['GroupPushRulesArgs', 'GroupPushRulesArgsDict']]] = None, @@ -1255,6 +1292,7 @@ def get(resource_name: str, :param pulumi.Input[str] name: The name of the group. :param pulumi.Input[int] parent_id: Id of the parent group (creates a nested group). :param pulumi.Input[str] path: The path of the group. + :param pulumi.Input[bool] permanently_remove_on_delete: Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. :param pulumi.Input[bool] prevent_forking_outside_group: Defaults to false. When enabled, users can not fork projects from this group to external namespaces. :param pulumi.Input[str] project_creation_level: Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer` :param pulumi.Input[Union['GroupPushRulesArgs', 'GroupPushRulesArgsDict']] push_rules: Push rules for the group. @@ -1291,6 +1329,7 @@ def get(resource_name: str, __props__.__dict__["name"] = name __props__.__dict__["parent_id"] = parent_id __props__.__dict__["path"] = path + __props__.__dict__["permanently_remove_on_delete"] = permanently_remove_on_delete __props__.__dict__["prevent_forking_outside_group"] = prevent_forking_outside_group __props__.__dict__["project_creation_level"] = project_creation_level __props__.__dict__["push_rules"] = push_rules @@ -1443,6 +1482,14 @@ def path(self) -> pulumi.Output[str]: """ return pulumi.get(self, "path") + @property + @pulumi.getter(name="permanentlyRemoveOnDelete") + def permanently_remove_on_delete(self) -> pulumi.Output[Optional[bool]]: + """ + Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run. + """ + return pulumi.get(self, "permanently_remove_on_delete") + @property @pulumi.getter(name="preventForkingOutsideGroup") def prevent_forking_outside_group(self) -> pulumi.Output[bool]: diff --git a/sdk/python/pulumi_gitlab/group_access_token.py b/sdk/python/pulumi_gitlab/group_access_token.py index de384114..3db0cbb5 100644 --- a/sdk/python/pulumi_gitlab/group_access_token.py +++ b/sdk/python/pulumi_gitlab/group_access_token.py @@ -330,7 +330,7 @@ def __init__(__self__, example = gitlab.GroupAccessToken("example", group="25", - name="Example project access token", + name="Example group access token", expires_at="2020-03-14", access_level="developer", scopes=["api"]) @@ -384,7 +384,7 @@ def __init__(__self__, example = gitlab.GroupAccessToken("example", group="25", - name="Example project access token", + name="Example group access token", expires_at="2020-03-14", access_level="developer", scopes=["api"]) diff --git a/sdk/python/pulumi_gitlab/group_security_policy_attachment.py b/sdk/python/pulumi_gitlab/group_security_policy_attachment.py new file mode 100644 index 00000000..37f439e4 --- /dev/null +++ b/sdk/python/pulumi_gitlab/group_security_policy_attachment.py @@ -0,0 +1,360 @@ +# 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__ = ['GroupSecurityPolicyAttachmentArgs', 'GroupSecurityPolicyAttachment'] + +@pulumi.input_type +class GroupSecurityPolicyAttachmentArgs: + def __init__(__self__, *, + group: pulumi.Input[str], + policy_project: pulumi.Input[str]): + """ + The set of arguments for constructing a GroupSecurityPolicyAttachment resource. + :param pulumi.Input[str] group: The ID or Full Path of the group which will have the security policy project assigned to it. + :param pulumi.Input[str] policy_project: The ID or Full Path of the security policy project. + """ + pulumi.set(__self__, "group", group) + pulumi.set(__self__, "policy_project", policy_project) + + @property + @pulumi.getter + def group(self) -> pulumi.Input[str]: + """ + The ID or Full Path of the group which will have the security policy project assigned to it. + """ + return pulumi.get(self, "group") + + @group.setter + def group(self, value: pulumi.Input[str]): + pulumi.set(self, "group", value) + + @property + @pulumi.getter(name="policyProject") + def policy_project(self) -> pulumi.Input[str]: + """ + The ID or Full Path of the security policy project. + """ + return pulumi.get(self, "policy_project") + + @policy_project.setter + def policy_project(self, value: pulumi.Input[str]): + pulumi.set(self, "policy_project", value) + + +@pulumi.input_type +class _GroupSecurityPolicyAttachmentState: + def __init__(__self__, *, + group: Optional[pulumi.Input[str]] = None, + group_graphql_id: Optional[pulumi.Input[str]] = None, + policy_project: Optional[pulumi.Input[str]] = None, + policy_project_graphql_id: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering GroupSecurityPolicyAttachment resources. + :param pulumi.Input[str] group: The ID or Full Path of the group which will have the security policy project assigned to it. + :param pulumi.Input[str] group_graphql_id: The GraphQL ID of the group to which the security policty project will be attached. + :param pulumi.Input[str] policy_project: The ID or Full Path of the security policy project. + :param pulumi.Input[str] policy_project_graphql_id: The GraphQL ID of the security policy project. + """ + if group is not None: + pulumi.set(__self__, "group", group) + if group_graphql_id is not None: + pulumi.set(__self__, "group_graphql_id", group_graphql_id) + if policy_project is not None: + pulumi.set(__self__, "policy_project", policy_project) + if policy_project_graphql_id is not None: + pulumi.set(__self__, "policy_project_graphql_id", policy_project_graphql_id) + + @property + @pulumi.getter + def group(self) -> Optional[pulumi.Input[str]]: + """ + The ID or Full Path of the group which will have the security policy project assigned to it. + """ + return pulumi.get(self, "group") + + @group.setter + def group(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "group", value) + + @property + @pulumi.getter(name="groupGraphqlId") + def group_graphql_id(self) -> Optional[pulumi.Input[str]]: + """ + The GraphQL ID of the group to which the security policty project will be attached. + """ + return pulumi.get(self, "group_graphql_id") + + @group_graphql_id.setter + def group_graphql_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "group_graphql_id", value) + + @property + @pulumi.getter(name="policyProject") + def policy_project(self) -> Optional[pulumi.Input[str]]: + """ + The ID or Full Path of the security policy project. + """ + return pulumi.get(self, "policy_project") + + @policy_project.setter + def policy_project(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "policy_project", value) + + @property + @pulumi.getter(name="policyProjectGraphqlId") + def policy_project_graphql_id(self) -> Optional[pulumi.Input[str]]: + """ + The GraphQL ID of the security policy project. + """ + return pulumi.get(self, "policy_project_graphql_id") + + @policy_project_graphql_id.setter + def policy_project_graphql_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "policy_project_graphql_id", value) + + +class GroupSecurityPolicyAttachment(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + group: Optional[pulumi.Input[str]] = None, + policy_project: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + The `GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # This resource can be used to attach a security policy to a pre-existing group + foo = gitlab.GroupSecurityPolicyAttachment("foo", + group="1234", + policy_project="4567") + # Or you can use Terraform to create a new project, add a policy to that project, + # then attach that policy project to other groups. + my_policy_project = gitlab.Project("my-policy-project", name="security-policy-project") + policy_yml = gitlab.RepositoryFile("policy-yml", + project=my_policy_project.id, + file_path=".gitlab/security-policies/my-policy.yml", + branch="master", + encoding="text", + content=\"\"\"--- + approval_policy: + - name: test + description: test + enabled: true + rules: + - type: any_merge_request + branch_type: protected + commits: any + approval_settings: + block_branch_modification: true + prevent_pushing_and_force_pushing: true + prevent_approval_by_author: true + prevent_approval_by_commit_author: true + remove_approvals_with_new_commit: true + require_password_to_approve: false + fallback_behavior: + fail: closed + actions: + - type: send_bot_message + enabled: true + \"\"\") + my_policy = gitlab.GroupSecurityPolicyAttachment("my-policy", + group="1234", + policy_project=my_policy_project.id) + ``` + + ## Import + + GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. + + ```sh + $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] group: The ID or Full Path of the group which will have the security policy project assigned to it. + :param pulumi.Input[str] policy_project: The ID or Full Path of the security policy project. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: GroupSecurityPolicyAttachmentArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + The `GroupSecurityPolicyAttachment` resource allows to attach a security policy project to a group. + + **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign) + + ## Example Usage + + ```python + import pulumi + import pulumi_gitlab as gitlab + + # This resource can be used to attach a security policy to a pre-existing group + foo = gitlab.GroupSecurityPolicyAttachment("foo", + group="1234", + policy_project="4567") + # Or you can use Terraform to create a new project, add a policy to that project, + # then attach that policy project to other groups. + my_policy_project = gitlab.Project("my-policy-project", name="security-policy-project") + policy_yml = gitlab.RepositoryFile("policy-yml", + project=my_policy_project.id, + file_path=".gitlab/security-policies/my-policy.yml", + branch="master", + encoding="text", + content=\"\"\"--- + approval_policy: + - name: test + description: test + enabled: true + rules: + - type: any_merge_request + branch_type: protected + commits: any + approval_settings: + block_branch_modification: true + prevent_pushing_and_force_pushing: true + prevent_approval_by_author: true + prevent_approval_by_commit_author: true + remove_approvals_with_new_commit: true + require_password_to_approve: false + fallback_behavior: + fail: closed + actions: + - type: send_bot_message + enabled: true + \"\"\") + my_policy = gitlab.GroupSecurityPolicyAttachment("my-policy", + group="1234", + policy_project=my_policy_project.id) + ``` + + ## Import + + GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g. + + ```sh + $ pulumi import gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment foo 1:2 + ``` + + :param str resource_name: The name of the resource. + :param GroupSecurityPolicyAttachmentArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(GroupSecurityPolicyAttachmentArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + group: Optional[pulumi.Input[str]] = None, + policy_project: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = GroupSecurityPolicyAttachmentArgs.__new__(GroupSecurityPolicyAttachmentArgs) + + if group is None and not opts.urn: + raise TypeError("Missing required property 'group'") + __props__.__dict__["group"] = group + if policy_project is None and not opts.urn: + raise TypeError("Missing required property 'policy_project'") + __props__.__dict__["policy_project"] = policy_project + __props__.__dict__["group_graphql_id"] = None + __props__.__dict__["policy_project_graphql_id"] = None + super(GroupSecurityPolicyAttachment, __self__).__init__( + 'gitlab:index/groupSecurityPolicyAttachment:GroupSecurityPolicyAttachment', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + group: Optional[pulumi.Input[str]] = None, + group_graphql_id: Optional[pulumi.Input[str]] = None, + policy_project: Optional[pulumi.Input[str]] = None, + policy_project_graphql_id: Optional[pulumi.Input[str]] = None) -> 'GroupSecurityPolicyAttachment': + """ + Get an existing GroupSecurityPolicyAttachment resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] group: The ID or Full Path of the group which will have the security policy project assigned to it. + :param pulumi.Input[str] group_graphql_id: The GraphQL ID of the group to which the security policty project will be attached. + :param pulumi.Input[str] policy_project: The ID or Full Path of the security policy project. + :param pulumi.Input[str] policy_project_graphql_id: The GraphQL ID of the security policy project. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _GroupSecurityPolicyAttachmentState.__new__(_GroupSecurityPolicyAttachmentState) + + __props__.__dict__["group"] = group + __props__.__dict__["group_graphql_id"] = group_graphql_id + __props__.__dict__["policy_project"] = policy_project + __props__.__dict__["policy_project_graphql_id"] = policy_project_graphql_id + return GroupSecurityPolicyAttachment(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def group(self) -> pulumi.Output[str]: + """ + The ID or Full Path of the group which will have the security policy project assigned to it. + """ + return pulumi.get(self, "group") + + @property + @pulumi.getter(name="groupGraphqlId") + def group_graphql_id(self) -> pulumi.Output[str]: + """ + The GraphQL ID of the group to which the security policty project will be attached. + """ + return pulumi.get(self, "group_graphql_id") + + @property + @pulumi.getter(name="policyProject") + def policy_project(self) -> pulumi.Output[str]: + """ + The ID or Full Path of the security policy project. + """ + return pulumi.get(self, "policy_project") + + @property + @pulumi.getter(name="policyProjectGraphqlId") + def policy_project_graphql_id(self) -> pulumi.Output[str]: + """ + The GraphQL ID of the security policy project. + """ + return pulumi.get(self, "policy_project_graphql_id") + diff --git a/sdk/python/pulumi_gitlab/project_job_token_scopes.py b/sdk/python/pulumi_gitlab/project_job_token_scopes.py index 7e5d6624..8052da01 100644 --- a/sdk/python/pulumi_gitlab/project_job_token_scopes.py +++ b/sdk/python/pulumi_gitlab/project_job_token_scopes.py @@ -14,58 +14,120 @@ @pulumi.input_type class ProjectJobTokenScopesArgs: def __init__(__self__, *, - project_id: pulumi.Input[int], - target_project_ids: pulumi.Input[Sequence[pulumi.Input[int]]]): + project: Optional[pulumi.Input[str]] = None, + project_id: Optional[pulumi.Input[int]] = None, + target_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, + target_project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None): """ The set of arguments for constructing a ProjectJobTokenScopes resource. + :param pulumi.Input[str] project: The ID or full path of the project. :param pulumi.Input[int] project_id: The ID of the project. + :param pulumi.Input[Sequence[pulumi.Input[int]]] target_group_ids: A set of group IDs that are in the CI/CD job token inbound allowlist. :param pulumi.Input[Sequence[pulumi.Input[int]]] target_project_ids: A set of project IDs that are in the CI/CD job token inbound allowlist. """ - pulumi.set(__self__, "project_id", project_id) - pulumi.set(__self__, "target_project_ids", target_project_ids) + if project is not None: + pulumi.set(__self__, "project", project) + if project_id is not None: + warnings.warn("""`project_id` has been deprecated. Use `project` instead.""", DeprecationWarning) + pulumi.log.warn("""project_id is deprecated: `project_id` has been deprecated. Use `project` instead.""") + if project_id is not None: + pulumi.set(__self__, "project_id", project_id) + if target_group_ids is not None: + pulumi.set(__self__, "target_group_ids", target_group_ids) + if target_project_ids is not None: + pulumi.set(__self__, "target_project_ids", target_project_ids) + + @property + @pulumi.getter + def project(self) -> Optional[pulumi.Input[str]]: + """ + The ID or full path of the project. + """ + return pulumi.get(self, "project") + + @project.setter + def project(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "project", value) @property @pulumi.getter(name="projectId") - def project_id(self) -> pulumi.Input[int]: + @_utilities.deprecated("""`project_id` has been deprecated. Use `project` instead.""") + def project_id(self) -> Optional[pulumi.Input[int]]: """ The ID of the project. """ return pulumi.get(self, "project_id") @project_id.setter - def project_id(self, value: pulumi.Input[int]): + def project_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "project_id", value) + @property + @pulumi.getter(name="targetGroupIds") + def target_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + """ + A set of group IDs that are in the CI/CD job token inbound allowlist. + """ + return pulumi.get(self, "target_group_ids") + + @target_group_ids.setter + def target_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): + pulumi.set(self, "target_group_ids", value) + @property @pulumi.getter(name="targetProjectIds") - def target_project_ids(self) -> pulumi.Input[Sequence[pulumi.Input[int]]]: + def target_project_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: """ A set of project IDs that are in the CI/CD job token inbound allowlist. """ return pulumi.get(self, "target_project_ids") @target_project_ids.setter - def target_project_ids(self, value: pulumi.Input[Sequence[pulumi.Input[int]]]): + def target_project_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): pulumi.set(self, "target_project_ids", value) @pulumi.input_type class _ProjectJobTokenScopesState: def __init__(__self__, *, + project: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[int]] = None, + target_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, target_project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None): """ Input properties used for looking up and filtering ProjectJobTokenScopes resources. + :param pulumi.Input[str] project: The ID or full path of the project. :param pulumi.Input[int] project_id: The ID of the project. + :param pulumi.Input[Sequence[pulumi.Input[int]]] target_group_ids: A set of group IDs that are in the CI/CD job token inbound allowlist. :param pulumi.Input[Sequence[pulumi.Input[int]]] target_project_ids: A set of project IDs that are in the CI/CD job token inbound allowlist. """ + if project is not None: + pulumi.set(__self__, "project", project) + if project_id is not None: + warnings.warn("""`project_id` has been deprecated. Use `project` instead.""", DeprecationWarning) + pulumi.log.warn("""project_id is deprecated: `project_id` has been deprecated. Use `project` instead.""") if project_id is not None: pulumi.set(__self__, "project_id", project_id) + if target_group_ids is not None: + pulumi.set(__self__, "target_group_ids", target_group_ids) if target_project_ids is not None: pulumi.set(__self__, "target_project_ids", target_project_ids) + @property + @pulumi.getter + def project(self) -> Optional[pulumi.Input[str]]: + """ + The ID or full path of the project. + """ + return pulumi.get(self, "project") + + @project.setter + def project(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "project", value) + @property @pulumi.getter(name="projectId") + @_utilities.deprecated("""`project_id` has been deprecated. Use `project` instead.""") def project_id(self) -> Optional[pulumi.Input[int]]: """ The ID of the project. @@ -76,6 +138,18 @@ def project_id(self) -> Optional[pulumi.Input[int]]: def project_id(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "project_id", value) + @property + @pulumi.getter(name="targetGroupIds") + def target_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: + """ + A set of group IDs that are in the CI/CD job token inbound allowlist. + """ + return pulumi.get(self, "target_group_ids") + + @target_group_ids.setter + def target_group_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]): + pulumi.set(self, "target_group_ids", value) + @property @pulumi.getter(name="targetProjectIds") def target_project_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]: @@ -94,7 +168,9 @@ class ProjectJobTokenScopes(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + project: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[int]] = None, + target_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, target_project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, __props__=None): """ @@ -112,24 +188,31 @@ def __init__(__self__, import pulumi_gitlab as gitlab allowed_single_project = gitlab.ProjectJobTokenScopes("allowed_single_project", - project_id=111, + project="111", target_project_ids=[123]) allowed_multiple_project = gitlab.ProjectJobTokenScopes("allowed_multiple_project", - project_id=111, + project="111", target_project_ids=[ 123, 456, 789, ]) + allowed_multiple_groups = gitlab.ProjectJobTokenScopes("allowed_multiple_groups", + project_id=111, + target_project_ids=[], + target_group_ids=[ + 321, + 654, + ]) # This will remove all job token scopes, even if added outside of TF. explicit_deny = gitlab.ProjectJobTokenScopes("explicit_deny", - project_id=111, + project="111", target_project_ids=[]) ``` ## Import - GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer + GitLab project job token scopes can be imported using an id made up of just the `project_id` ```sh $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -137,14 +220,16 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] project: The ID or full path of the project. :param pulumi.Input[int] project_id: The ID of the project. + :param pulumi.Input[Sequence[pulumi.Input[int]]] target_group_ids: A set of group IDs that are in the CI/CD job token inbound allowlist. :param pulumi.Input[Sequence[pulumi.Input[int]]] target_project_ids: A set of project IDs that are in the CI/CD job token inbound allowlist. """ ... @overload def __init__(__self__, resource_name: str, - args: ProjectJobTokenScopesArgs, + args: Optional[ProjectJobTokenScopesArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ The `ProjectJobTokenScopes` resource allows to manage the CI/CD Job Token scopes in a project. @@ -161,24 +246,31 @@ def __init__(__self__, import pulumi_gitlab as gitlab allowed_single_project = gitlab.ProjectJobTokenScopes("allowed_single_project", - project_id=111, + project="111", target_project_ids=[123]) allowed_multiple_project = gitlab.ProjectJobTokenScopes("allowed_multiple_project", - project_id=111, + project="111", target_project_ids=[ 123, 456, 789, ]) + allowed_multiple_groups = gitlab.ProjectJobTokenScopes("allowed_multiple_groups", + project_id=111, + target_project_ids=[], + target_group_ids=[ + 321, + 654, + ]) # This will remove all job token scopes, even if added outside of TF. explicit_deny = gitlab.ProjectJobTokenScopes("explicit_deny", - project_id=111, + project="111", target_project_ids=[]) ``` ## Import - GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer + GitLab project job token scopes can be imported using an id made up of just the `project_id` ```sh $ pulumi import gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes bar 123 @@ -199,7 +291,9 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + project: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[int]] = None, + target_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, target_project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) @@ -210,11 +304,9 @@ def _internal_init(__self__, raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProjectJobTokenScopesArgs.__new__(ProjectJobTokenScopesArgs) - if project_id is None and not opts.urn: - raise TypeError("Missing required property 'project_id'") + __props__.__dict__["project"] = project __props__.__dict__["project_id"] = project_id - if target_project_ids is None and not opts.urn: - raise TypeError("Missing required property 'target_project_ids'") + __props__.__dict__["target_group_ids"] = target_group_ids __props__.__dict__["target_project_ids"] = target_project_ids super(ProjectJobTokenScopes, __self__).__init__( 'gitlab:index/projectJobTokenScopes:ProjectJobTokenScopes', @@ -226,7 +318,9 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, + project: Optional[pulumi.Input[str]] = None, project_id: Optional[pulumi.Input[int]] = None, + target_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None, target_project_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None) -> 'ProjectJobTokenScopes': """ Get an existing ProjectJobTokenScopes resource's state with the given name, id, and optional extra @@ -235,25 +329,46 @@ 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] project: The ID or full path of the project. :param pulumi.Input[int] project_id: The ID of the project. + :param pulumi.Input[Sequence[pulumi.Input[int]]] target_group_ids: A set of group IDs that are in the CI/CD job token inbound allowlist. :param pulumi.Input[Sequence[pulumi.Input[int]]] target_project_ids: A set of project IDs that are in the CI/CD job token inbound allowlist. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _ProjectJobTokenScopesState.__new__(_ProjectJobTokenScopesState) + __props__.__dict__["project"] = project __props__.__dict__["project_id"] = project_id + __props__.__dict__["target_group_ids"] = target_group_ids __props__.__dict__["target_project_ids"] = target_project_ids return ProjectJobTokenScopes(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter + def project(self) -> pulumi.Output[str]: + """ + The ID or full path of the project. + """ + return pulumi.get(self, "project") + @property @pulumi.getter(name="projectId") + @_utilities.deprecated("""`project_id` has been deprecated. Use `project` instead.""") def project_id(self) -> pulumi.Output[int]: """ The ID of the project. """ return pulumi.get(self, "project_id") + @property + @pulumi.getter(name="targetGroupIds") + def target_group_ids(self) -> pulumi.Output[Sequence[int]]: + """ + A set of group IDs that are in the CI/CD job token inbound allowlist. + """ + return pulumi.get(self, "target_group_ids") + @property @pulumi.getter(name="targetProjectIds") def target_project_ids(self) -> pulumi.Output[Sequence[int]]: diff --git a/sdk/python/pulumi_gitlab/project_security_policy_attachment.py b/sdk/python/pulumi_gitlab/project_security_policy_attachment.py index 0cbfecfa..bbf232ee 100644 --- a/sdk/python/pulumi_gitlab/project_security_policy_attachment.py +++ b/sdk/python/pulumi_gitlab/project_security_policy_attachment.py @@ -174,8 +174,8 @@ def __init__(__self__, - type: send_bot_message enabled: true \"\"\") - my_policy = gitlab.index.ProjectSecurityPolicy("my-policy", - project=1234, + my_policy = gitlab.ProjectSecurityPolicyAttachment("my-policy", + project="1234", policy_project=my_policy_project.id) ``` @@ -243,8 +243,8 @@ def __init__(__self__, - type: send_bot_message enabled: true \"\"\") - my_policy = gitlab.index.ProjectSecurityPolicy("my-policy", - project=1234, + my_policy = gitlab.ProjectSecurityPolicyAttachment("my-policy", + project="1234", policy_project=my_policy_project.id) ``` diff --git a/upstream b/upstream index f3026b0a..0a4d4d3e 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit f3026b0a5a0f7f6fb88a27e82da26840247fe22e +Subproject commit 0a4d4d3e9e3bb06f9182aa4b7bd083d5bad47df5