pulumi-gitlab 9.3.0a1759182301__py3-none-any.whl → 9.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. pulumi_gitlab/__init__.py +107 -0
  2. pulumi_gitlab/_inputs.py +795 -0
  3. pulumi_gitlab/application_settings.py +16 -7
  4. pulumi_gitlab/branch.py +1 -1
  5. pulumi_gitlab/cluster_agent_token.py +1 -1
  6. pulumi_gitlab/config/__init__.pyi +15 -0
  7. pulumi_gitlab/config/vars.py +21 -0
  8. pulumi_gitlab/deploy_key_enable.py +4 -42
  9. pulumi_gitlab/deploy_token.py +11 -7
  10. pulumi_gitlab/get_artifact_file.py +266 -0
  11. pulumi_gitlab/get_branch.py +1 -1
  12. pulumi_gitlab/get_cluster_agent.py +3 -3
  13. pulumi_gitlab/get_cluster_agents.py +6 -6
  14. pulumi_gitlab/get_current_user.py +1 -1
  15. pulumi_gitlab/get_group.py +2 -2
  16. pulumi_gitlab/get_group_billable_member_memberships.py +2 -2
  17. pulumi_gitlab/get_group_hook.py +22 -3
  18. pulumi_gitlab/get_group_hooks.py +7 -3
  19. pulumi_gitlab/get_group_membership.py +2 -2
  20. pulumi_gitlab/get_group_saml_links.py +114 -0
  21. pulumi_gitlab/get_group_service_account.py +6 -2
  22. pulumi_gitlab/get_group_service_account_access_tokens.py +138 -0
  23. pulumi_gitlab/get_group_subgroups.py +1 -1
  24. pulumi_gitlab/get_group_variable.py +1 -1
  25. pulumi_gitlab/get_groups.py +1 -1
  26. pulumi_gitlab/get_instance_deploy_keys.py +1 -1
  27. pulumi_gitlab/get_instance_service_account.py +2 -2
  28. pulumi_gitlab/get_instance_variable.py +7 -7
  29. pulumi_gitlab/get_instance_variables.py +4 -4
  30. pulumi_gitlab/get_member_role.py +200 -0
  31. pulumi_gitlab/get_project.py +27 -7
  32. pulumi_gitlab/get_project_approval_rules.py +137 -0
  33. pulumi_gitlab/get_project_branches.py +1 -1
  34. pulumi_gitlab/get_project_hook.py +20 -5
  35. pulumi_gitlab/get_project_hooks.py +1 -1
  36. pulumi_gitlab/get_project_issue_label_events.py +170 -0
  37. pulumi_gitlab/get_project_membership.py +34 -16
  38. pulumi_gitlab/get_project_milestone.py +1 -1
  39. pulumi_gitlab/get_project_milestones.py +1 -1
  40. pulumi_gitlab/get_project_protected_tag.py +2 -2
  41. pulumi_gitlab/get_project_secure_file.py +247 -0
  42. pulumi_gitlab/get_project_tag.py +2 -2
  43. pulumi_gitlab/get_project_tags.py +1 -1
  44. pulumi_gitlab/get_project_variable.py +12 -12
  45. pulumi_gitlab/get_project_variables.py +4 -4
  46. pulumi_gitlab/get_projects.py +3 -3
  47. pulumi_gitlab/get_release_link.py +9 -9
  48. pulumi_gitlab/get_release_links.py +4 -4
  49. pulumi_gitlab/get_repository_file.py +1 -1
  50. pulumi_gitlab/get_repository_tree.py +1 -1
  51. pulumi_gitlab/get_security_policy_document.py +170 -0
  52. pulumi_gitlab/get_user.py +33 -1
  53. pulumi_gitlab/get_users.py +22 -2
  54. pulumi_gitlab/global_level_notifications.py +2 -2
  55. pulumi_gitlab/group.py +148 -7
  56. pulumi_gitlab/group_access_token.py +54 -7
  57. pulumi_gitlab/group_deploy_token.py +582 -0
  58. pulumi_gitlab/group_hook.py +163 -112
  59. pulumi_gitlab/group_label.py +7 -7
  60. pulumi_gitlab/group_level_mr_approvals.py +509 -0
  61. pulumi_gitlab/group_membership.py +10 -10
  62. pulumi_gitlab/group_service_account.py +38 -2
  63. pulumi_gitlab/group_service_account_access_token.py +146 -5
  64. pulumi_gitlab/group_share_group.py +13 -9
  65. pulumi_gitlab/instance_service_account.py +3 -3
  66. pulumi_gitlab/instance_variable.py +12 -12
  67. pulumi_gitlab/integration_custom_issue_tracker.py +4 -0
  68. pulumi_gitlab/integration_emails_on_push.py +9 -7
  69. pulumi_gitlab/integration_harbor.py +4 -0
  70. pulumi_gitlab/integration_jenkins.py +4 -0
  71. pulumi_gitlab/integration_redmine.py +4 -2
  72. pulumi_gitlab/integration_telegram.py +4 -0
  73. pulumi_gitlab/label.py +11 -7
  74. pulumi_gitlab/member_role.py +9 -9
  75. pulumi_gitlab/outputs.py +1279 -112
  76. pulumi_gitlab/pages_domain.py +7 -7
  77. pulumi_gitlab/personal_access_token.py +52 -5
  78. pulumi_gitlab/pipeline_schedule_variable.py +2 -2
  79. pulumi_gitlab/project.py +241 -105
  80. pulumi_gitlab/project_access_token.py +52 -5
  81. pulumi_gitlab/project_approval_rule.py +120 -0
  82. pulumi_gitlab/project_cicd_catalog.py +314 -0
  83. pulumi_gitlab/project_deploy_token.py +582 -0
  84. pulumi_gitlab/project_environment.py +4 -4
  85. pulumi_gitlab/project_external_status_check.py +469 -0
  86. pulumi_gitlab/project_freeze_period.py +22 -22
  87. pulumi_gitlab/project_hook.py +162 -109
  88. pulumi_gitlab/project_integration_emails_on_push.py +17 -7
  89. pulumi_gitlab/project_issue_link.py +502 -0
  90. pulumi_gitlab/project_job_token_scope.py +24 -4
  91. pulumi_gitlab/project_job_token_scopes.py +14 -14
  92. pulumi_gitlab/project_label.py +11 -11
  93. pulumi_gitlab/project_level_mr_approvals.py +2 -2
  94. pulumi_gitlab/project_level_notifications.py +2 -2
  95. pulumi_gitlab/project_membership.py +9 -9
  96. pulumi_gitlab/project_mirror.py +8 -6
  97. pulumi_gitlab/project_package_dependency_proxy.py +446 -0
  98. pulumi_gitlab/project_protected_environment.py +14 -14
  99. pulumi_gitlab/project_pull_mirror.py +837 -0
  100. pulumi_gitlab/project_push_mirror.py +547 -0
  101. pulumi_gitlab/project_secure_file.py +489 -0
  102. pulumi_gitlab/project_tag.py +3 -3
  103. pulumi_gitlab/project_target_branch_rule.py +2 -2
  104. pulumi_gitlab/project_variable.py +7 -7
  105. pulumi_gitlab/project_wiki_page.py +30 -0
  106. pulumi_gitlab/provider.py +76 -0
  107. pulumi_gitlab/pulumi-plugin.json +1 -1
  108. pulumi_gitlab/release_link.py +19 -19
  109. pulumi_gitlab/runner.py +8 -4
  110. pulumi_gitlab/system_hook.py +7 -7
  111. pulumi_gitlab/user_avatar.py +386 -0
  112. pulumi_gitlab/user_gpg_key.py +2 -2
  113. pulumi_gitlab/user_impersonation_token.py +52 -5
  114. pulumi_gitlab/user_runner.py +14 -14
  115. pulumi_gitlab/user_ssh_key.py +2 -2
  116. pulumi_gitlab/value_stream_analytics.py +92 -0
  117. {pulumi_gitlab-9.3.0a1759182301.dist-info → pulumi_gitlab-9.8.1.dist-info}/METADATA +1 -1
  118. pulumi_gitlab-9.8.1.dist-info/RECORD +207 -0
  119. pulumi_gitlab-9.3.0a1759182301.dist-info/RECORD +0 -188
  120. {pulumi_gitlab-9.3.0a1759182301.dist-info → pulumi_gitlab-9.8.1.dist-info}/WHEEL +0 -0
  121. {pulumi_gitlab-9.3.0a1759182301.dist-info → pulumi_gitlab-9.8.1.dist-info}/top_level.txt +0 -0
@@ -27,7 +27,8 @@ class ProjectAccessTokenArgs:
27
27
  description: Optional[pulumi.Input[_builtins.str]] = None,
28
28
  expires_at: Optional[pulumi.Input[_builtins.str]] = None,
29
29
  name: Optional[pulumi.Input[_builtins.str]] = None,
30
- rotation_configuration: Optional[pulumi.Input['ProjectAccessTokenRotationConfigurationArgs']] = None):
30
+ rotation_configuration: Optional[pulumi.Input['ProjectAccessTokenRotationConfigurationArgs']] = None,
31
+ validate_past_expiration_date: Optional[pulumi.Input[_builtins.bool]] = None):
31
32
  """
32
33
  The set of arguments for constructing a ProjectAccessToken resource.
33
34
  :param pulumi.Input[_builtins.str] project: The ID or full path of the project.
@@ -37,6 +38,7 @@ class ProjectAccessTokenArgs:
37
38
  :param pulumi.Input[_builtins.str] expires_at: When the token will expire, YYYY-MM-DD format. Is automatically set when `rotation_configuration` is used.
38
39
  :param pulumi.Input[_builtins.str] name: The name of the project access token.
39
40
  :param pulumi.Input['ProjectAccessTokenRotationConfigurationArgs'] rotation_configuration: The configuration for when to rotate a token automatically. Will not rotate a token until `pulumi up` is run.
41
+ :param pulumi.Input[_builtins.bool] validate_past_expiration_date: Wether to validate if the expiration date is in the future.
40
42
  """
41
43
  pulumi.set(__self__, "project", project)
42
44
  pulumi.set(__self__, "scopes", scopes)
@@ -50,6 +52,8 @@ class ProjectAccessTokenArgs:
50
52
  pulumi.set(__self__, "name", name)
51
53
  if rotation_configuration is not None:
52
54
  pulumi.set(__self__, "rotation_configuration", rotation_configuration)
55
+ if validate_past_expiration_date is not None:
56
+ pulumi.set(__self__, "validate_past_expiration_date", validate_past_expiration_date)
53
57
 
54
58
  @_builtins.property
55
59
  @pulumi.getter
@@ -135,6 +139,18 @@ class ProjectAccessTokenArgs:
135
139
  def rotation_configuration(self, value: Optional[pulumi.Input['ProjectAccessTokenRotationConfigurationArgs']]):
136
140
  pulumi.set(self, "rotation_configuration", value)
137
141
 
142
+ @_builtins.property
143
+ @pulumi.getter(name="validatePastExpirationDate")
144
+ def validate_past_expiration_date(self) -> Optional[pulumi.Input[_builtins.bool]]:
145
+ """
146
+ Wether to validate if the expiration date is in the future.
147
+ """
148
+ return pulumi.get(self, "validate_past_expiration_date")
149
+
150
+ @validate_past_expiration_date.setter
151
+ def validate_past_expiration_date(self, value: Optional[pulumi.Input[_builtins.bool]]):
152
+ pulumi.set(self, "validate_past_expiration_date", value)
153
+
138
154
 
139
155
  @pulumi.input_type
140
156
  class _ProjectAccessTokenState:
@@ -150,7 +166,8 @@ class _ProjectAccessTokenState:
150
166
  rotation_configuration: Optional[pulumi.Input['ProjectAccessTokenRotationConfigurationArgs']] = None,
151
167
  scopes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
152
168
  token: Optional[pulumi.Input[_builtins.str]] = None,
153
- user_id: Optional[pulumi.Input[_builtins.int]] = None):
169
+ user_id: Optional[pulumi.Input[_builtins.int]] = None,
170
+ validate_past_expiration_date: Optional[pulumi.Input[_builtins.bool]] = None):
154
171
  """
155
172
  Input properties used for looking up and filtering ProjectAccessToken resources.
156
173
  :param pulumi.Input[_builtins.str] access_level: The access level for the project access token. Valid values are: `no one`, `minimal`, `guest`, `planner`, `reporter`, `developer`, `maintainer`, `owner`. Default is `maintainer`.
@@ -165,6 +182,7 @@ class _ProjectAccessTokenState:
165
182
  :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] scopes: The scopes of the project access token. valid values are: `api`, `read_api`, `read_registry`, `write_registry`, `read_repository`, `write_repository`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_observability`, `write_observability`, `self_rotate`
166
183
  :param pulumi.Input[_builtins.str] token: The token of the project access token. **Note**: the token is not available for imported resources.
167
184
  :param pulumi.Input[_builtins.int] user_id: The user_id associated to the token.
185
+ :param pulumi.Input[_builtins.bool] validate_past_expiration_date: Wether to validate if the expiration date is in the future.
168
186
  """
169
187
  if access_level is not None:
170
188
  pulumi.set(__self__, "access_level", access_level)
@@ -190,6 +208,8 @@ class _ProjectAccessTokenState:
190
208
  pulumi.set(__self__, "token", token)
191
209
  if user_id is not None:
192
210
  pulumi.set(__self__, "user_id", user_id)
211
+ if validate_past_expiration_date is not None:
212
+ pulumi.set(__self__, "validate_past_expiration_date", validate_past_expiration_date)
193
213
 
194
214
  @_builtins.property
195
215
  @pulumi.getter(name="accessLevel")
@@ -335,6 +355,18 @@ class _ProjectAccessTokenState:
335
355
  def user_id(self, value: Optional[pulumi.Input[_builtins.int]]):
336
356
  pulumi.set(self, "user_id", value)
337
357
 
358
+ @_builtins.property
359
+ @pulumi.getter(name="validatePastExpirationDate")
360
+ def validate_past_expiration_date(self) -> Optional[pulumi.Input[_builtins.bool]]:
361
+ """
362
+ Wether to validate if the expiration date is in the future.
363
+ """
364
+ return pulumi.get(self, "validate_past_expiration_date")
365
+
366
+ @validate_past_expiration_date.setter
367
+ def validate_past_expiration_date(self, value: Optional[pulumi.Input[_builtins.bool]]):
368
+ pulumi.set(self, "validate_past_expiration_date", value)
369
+
338
370
 
339
371
  @pulumi.type_token("gitlab:index/projectAccessToken:ProjectAccessToken")
340
372
  class ProjectAccessToken(pulumi.CustomResource):
@@ -349,11 +381,12 @@ class ProjectAccessToken(pulumi.CustomResource):
349
381
  project: Optional[pulumi.Input[_builtins.str]] = None,
350
382
  rotation_configuration: Optional[pulumi.Input[Union['ProjectAccessTokenRotationConfigurationArgs', 'ProjectAccessTokenRotationConfigurationArgsDict']]] = None,
351
383
  scopes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
384
+ validate_past_expiration_date: Optional[pulumi.Input[_builtins.bool]] = None,
352
385
  __props__=None):
353
386
  """
354
387
  The `ProjectAccessToken` resource allows to manage the lifecycle of a project access token.
355
388
 
356
- > Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/operations/tracing/)
389
+ > Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/development/tracing/)
357
390
 
358
391
  > 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.
359
392
 
@@ -412,6 +445,7 @@ class ProjectAccessToken(pulumi.CustomResource):
412
445
  :param pulumi.Input[_builtins.str] project: The ID or full path of the project.
413
446
  :param pulumi.Input[Union['ProjectAccessTokenRotationConfigurationArgs', 'ProjectAccessTokenRotationConfigurationArgsDict']] rotation_configuration: The configuration for when to rotate a token automatically. Will not rotate a token until `pulumi up` is run.
414
447
  :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] scopes: The scopes of the project access token. valid values are: `api`, `read_api`, `read_registry`, `write_registry`, `read_repository`, `write_repository`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_observability`, `write_observability`, `self_rotate`
448
+ :param pulumi.Input[_builtins.bool] validate_past_expiration_date: Wether to validate if the expiration date is in the future.
415
449
  """
416
450
  ...
417
451
  @overload
@@ -422,7 +456,7 @@ class ProjectAccessToken(pulumi.CustomResource):
422
456
  """
423
457
  The `ProjectAccessToken` resource allows to manage the lifecycle of a project access token.
424
458
 
425
- > Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/operations/tracing/)
459
+ > Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/development/tracing/)
426
460
 
427
461
  > 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.
428
462
 
@@ -494,6 +528,7 @@ class ProjectAccessToken(pulumi.CustomResource):
494
528
  project: Optional[pulumi.Input[_builtins.str]] = None,
495
529
  rotation_configuration: Optional[pulumi.Input[Union['ProjectAccessTokenRotationConfigurationArgs', 'ProjectAccessTokenRotationConfigurationArgsDict']]] = None,
496
530
  scopes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
531
+ validate_past_expiration_date: Optional[pulumi.Input[_builtins.bool]] = None,
497
532
  __props__=None):
498
533
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
499
534
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -514,6 +549,7 @@ class ProjectAccessToken(pulumi.CustomResource):
514
549
  if scopes is None and not opts.urn:
515
550
  raise TypeError("Missing required property 'scopes'")
516
551
  __props__.__dict__["scopes"] = scopes
552
+ __props__.__dict__["validate_past_expiration_date"] = validate_past_expiration_date
517
553
  __props__.__dict__["active"] = None
518
554
  __props__.__dict__["created_at"] = None
519
555
  __props__.__dict__["revoked"] = None
@@ -542,7 +578,8 @@ class ProjectAccessToken(pulumi.CustomResource):
542
578
  rotation_configuration: Optional[pulumi.Input[Union['ProjectAccessTokenRotationConfigurationArgs', 'ProjectAccessTokenRotationConfigurationArgsDict']]] = None,
543
579
  scopes: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
544
580
  token: Optional[pulumi.Input[_builtins.str]] = None,
545
- user_id: Optional[pulumi.Input[_builtins.int]] = None) -> 'ProjectAccessToken':
581
+ user_id: Optional[pulumi.Input[_builtins.int]] = None,
582
+ validate_past_expiration_date: Optional[pulumi.Input[_builtins.bool]] = None) -> 'ProjectAccessToken':
546
583
  """
547
584
  Get an existing ProjectAccessToken resource's state with the given name, id, and optional extra
548
585
  properties used to qualify the lookup.
@@ -562,6 +599,7 @@ class ProjectAccessToken(pulumi.CustomResource):
562
599
  :param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] scopes: The scopes of the project access token. valid values are: `api`, `read_api`, `read_registry`, `write_registry`, `read_repository`, `write_repository`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_observability`, `write_observability`, `self_rotate`
563
600
  :param pulumi.Input[_builtins.str] token: The token of the project access token. **Note**: the token is not available for imported resources.
564
601
  :param pulumi.Input[_builtins.int] user_id: The user_id associated to the token.
602
+ :param pulumi.Input[_builtins.bool] validate_past_expiration_date: Wether to validate if the expiration date is in the future.
565
603
  """
566
604
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
567
605
 
@@ -579,6 +617,7 @@ class ProjectAccessToken(pulumi.CustomResource):
579
617
  __props__.__dict__["scopes"] = scopes
580
618
  __props__.__dict__["token"] = token
581
619
  __props__.__dict__["user_id"] = user_id
620
+ __props__.__dict__["validate_past_expiration_date"] = validate_past_expiration_date
582
621
  return ProjectAccessToken(resource_name, opts=opts, __props__=__props__)
583
622
 
584
623
  @_builtins.property
@@ -677,3 +716,11 @@ class ProjectAccessToken(pulumi.CustomResource):
677
716
  """
678
717
  return pulumi.get(self, "user_id")
679
718
 
719
+ @_builtins.property
720
+ @pulumi.getter(name="validatePastExpirationDate")
721
+ def validate_past_expiration_date(self) -> pulumi.Output[_builtins.bool]:
722
+ """
723
+ Wether to validate if the expiration date is in the future.
724
+ """
725
+ return pulumi.get(self, "validate_past_expiration_date")
726
+
@@ -370,6 +370,66 @@ class ProjectApprovalRule(pulumi.CustomResource):
370
370
  """
371
371
  ## Example Usage
372
372
 
373
+ ```python
374
+ import pulumi
375
+ import pulumi_gitlab as gitlab
376
+ import pulumi_std as std
377
+
378
+ example_one = gitlab.ProjectApprovalRule("example-one",
379
+ project="5",
380
+ name="Example Rule",
381
+ approvals_required=3,
382
+ user_ids=[
383
+ 50,
384
+ 500,
385
+ ],
386
+ group_ids=[51])
387
+ # With Protected Branch IDs
388
+ example = gitlab.BranchProtection("example",
389
+ project="5",
390
+ branch="release/*",
391
+ push_access_level="maintainer",
392
+ merge_access_level="developer")
393
+ example_two = gitlab.ProjectApprovalRule("example-two",
394
+ project="5",
395
+ name="Example Rule 2",
396
+ approvals_required=3,
397
+ user_ids=[
398
+ 50,
399
+ 500,
400
+ ],
401
+ group_ids=[51],
402
+ protected_branch_ids=[example.branch_protection_id])
403
+ # Example using `data.gitlab_user` and `for` loop
404
+ users = {__key: gitlab.get_user(username=__value) for __key, __value in std.toset(input=[
405
+ "user1",
406
+ "user2",
407
+ "user3",
408
+ ]).result}
409
+ example_three = gitlab.ProjectApprovalRule("example-three",
410
+ project="5",
411
+ name="Example Rule 3",
412
+ approvals_required=3,
413
+ user_ids=[user.id for user in users])
414
+ # Example using `approval_rule` using `any_approver` as rule type
415
+ any_approver = gitlab.ProjectApprovalRule("any_approver",
416
+ project="5",
417
+ name="Any name",
418
+ rule_type="any_approver",
419
+ approvals_required=1)
420
+ # Example using `applies_to_all_protected_branches`
421
+ example_four = gitlab.ProjectApprovalRule("example-four",
422
+ project="5",
423
+ name="Example Rule 4",
424
+ approvals_required=3,
425
+ user_ids=[
426
+ 50,
427
+ 500,
428
+ ],
429
+ group_ids=[51],
430
+ applies_to_all_protected_branches=True)
431
+ ```
432
+
373
433
  ## Import
374
434
 
375
435
  Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_approval_rule`. For example:
@@ -414,6 +474,66 @@ class ProjectApprovalRule(pulumi.CustomResource):
414
474
  """
415
475
  ## Example Usage
416
476
 
477
+ ```python
478
+ import pulumi
479
+ import pulumi_gitlab as gitlab
480
+ import pulumi_std as std
481
+
482
+ example_one = gitlab.ProjectApprovalRule("example-one",
483
+ project="5",
484
+ name="Example Rule",
485
+ approvals_required=3,
486
+ user_ids=[
487
+ 50,
488
+ 500,
489
+ ],
490
+ group_ids=[51])
491
+ # With Protected Branch IDs
492
+ example = gitlab.BranchProtection("example",
493
+ project="5",
494
+ branch="release/*",
495
+ push_access_level="maintainer",
496
+ merge_access_level="developer")
497
+ example_two = gitlab.ProjectApprovalRule("example-two",
498
+ project="5",
499
+ name="Example Rule 2",
500
+ approvals_required=3,
501
+ user_ids=[
502
+ 50,
503
+ 500,
504
+ ],
505
+ group_ids=[51],
506
+ protected_branch_ids=[example.branch_protection_id])
507
+ # Example using `data.gitlab_user` and `for` loop
508
+ users = {__key: gitlab.get_user(username=__value) for __key, __value in std.toset(input=[
509
+ "user1",
510
+ "user2",
511
+ "user3",
512
+ ]).result}
513
+ example_three = gitlab.ProjectApprovalRule("example-three",
514
+ project="5",
515
+ name="Example Rule 3",
516
+ approvals_required=3,
517
+ user_ids=[user.id for user in users])
518
+ # Example using `approval_rule` using `any_approver` as rule type
519
+ any_approver = gitlab.ProjectApprovalRule("any_approver",
520
+ project="5",
521
+ name="Any name",
522
+ rule_type="any_approver",
523
+ approvals_required=1)
524
+ # Example using `applies_to_all_protected_branches`
525
+ example_four = gitlab.ProjectApprovalRule("example-four",
526
+ project="5",
527
+ name="Example Rule 4",
528
+ approvals_required=3,
529
+ user_ids=[
530
+ 50,
531
+ 500,
532
+ ],
533
+ group_ids=[51],
534
+ applies_to_all_protected_branches=True)
535
+ ```
536
+
417
537
  ## Import
418
538
 
419
539
  Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_approval_rule`. For example:
@@ -0,0 +1,314 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = ['ProjectCicdCatalogArgs', 'ProjectCicdCatalog']
18
+
19
+ @pulumi.input_type
20
+ class ProjectCicdCatalogArgs:
21
+ def __init__(__self__, *,
22
+ enabled: pulumi.Input[_builtins.bool],
23
+ project: pulumi.Input[_builtins.str],
24
+ keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None):
25
+ """
26
+ The set of arguments for constructing a ProjectCicdCatalog resource.
27
+ :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
28
+ :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
29
+ """
30
+ pulumi.set(__self__, "enabled", enabled)
31
+ pulumi.set(__self__, "project", project)
32
+ if keep_settings_on_destroy is not None:
33
+ pulumi.set(__self__, "keep_settings_on_destroy", keep_settings_on_destroy)
34
+
35
+ @_builtins.property
36
+ @pulumi.getter
37
+ def enabled(self) -> pulumi.Input[_builtins.bool]:
38
+ """
39
+ Whether the project should be enabled as a CI/CD Catalog resource.
40
+ """
41
+ return pulumi.get(self, "enabled")
42
+
43
+ @enabled.setter
44
+ def enabled(self, value: pulumi.Input[_builtins.bool]):
45
+ pulumi.set(self, "enabled", value)
46
+
47
+ @_builtins.property
48
+ @pulumi.getter
49
+ def project(self) -> pulumi.Input[_builtins.str]:
50
+ """
51
+ The ID or URL-encoded path of the project.
52
+ """
53
+ return pulumi.get(self, "project")
54
+
55
+ @project.setter
56
+ def project(self, value: pulumi.Input[_builtins.str]):
57
+ pulumi.set(self, "project", value)
58
+
59
+ @_builtins.property
60
+ @pulumi.getter(name="keepSettingsOnDestroy")
61
+ def keep_settings_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
62
+ return pulumi.get(self, "keep_settings_on_destroy")
63
+
64
+ @keep_settings_on_destroy.setter
65
+ def keep_settings_on_destroy(self, value: Optional[pulumi.Input[_builtins.bool]]):
66
+ pulumi.set(self, "keep_settings_on_destroy", value)
67
+
68
+
69
+ @pulumi.input_type
70
+ class _ProjectCicdCatalogState:
71
+ def __init__(__self__, *,
72
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
73
+ keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
74
+ project: Optional[pulumi.Input[_builtins.str]] = None):
75
+ """
76
+ Input properties used for looking up and filtering ProjectCicdCatalog resources.
77
+ :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
78
+ :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
79
+ """
80
+ if enabled is not None:
81
+ pulumi.set(__self__, "enabled", enabled)
82
+ if keep_settings_on_destroy is not None:
83
+ pulumi.set(__self__, "keep_settings_on_destroy", keep_settings_on_destroy)
84
+ if project is not None:
85
+ pulumi.set(__self__, "project", project)
86
+
87
+ @_builtins.property
88
+ @pulumi.getter
89
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
90
+ """
91
+ Whether the project should be enabled as a CI/CD Catalog resource.
92
+ """
93
+ return pulumi.get(self, "enabled")
94
+
95
+ @enabled.setter
96
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
97
+ pulumi.set(self, "enabled", value)
98
+
99
+ @_builtins.property
100
+ @pulumi.getter(name="keepSettingsOnDestroy")
101
+ def keep_settings_on_destroy(self) -> Optional[pulumi.Input[_builtins.bool]]:
102
+ return pulumi.get(self, "keep_settings_on_destroy")
103
+
104
+ @keep_settings_on_destroy.setter
105
+ def keep_settings_on_destroy(self, value: Optional[pulumi.Input[_builtins.bool]]):
106
+ pulumi.set(self, "keep_settings_on_destroy", value)
107
+
108
+ @_builtins.property
109
+ @pulumi.getter
110
+ def project(self) -> Optional[pulumi.Input[_builtins.str]]:
111
+ """
112
+ The ID or URL-encoded path of the project.
113
+ """
114
+ return pulumi.get(self, "project")
115
+
116
+ @project.setter
117
+ def project(self, value: Optional[pulumi.Input[_builtins.str]]):
118
+ pulumi.set(self, "project", value)
119
+
120
+
121
+ @pulumi.type_token("gitlab:index/projectCicdCatalog:ProjectCicdCatalog")
122
+ class ProjectCicdCatalog(pulumi.CustomResource):
123
+ @overload
124
+ def __init__(__self__,
125
+ resource_name: str,
126
+ opts: Optional[pulumi.ResourceOptions] = None,
127
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
128
+ keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
129
+ project: Optional[pulumi.Input[_builtins.str]] = None,
130
+ __props__=None):
131
+ """
132
+ The `ProjectCicdCatalog` resource allows users to manage the lifecycle of a CI/CD Catalog project.
133
+
134
+ This resource controls whether a project is available as a CI/CD Catalog resource.
135
+
136
+ > If `keep_settings_on_destroy` is set to false, destroying the resource will revert the catalog status to the value that was present when the resource was first created.
137
+ You will need to apply the resource with the new setting before destroying the resource.
138
+
139
+ **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcatalogresourcescreate)
140
+
141
+ ## Example Usage
142
+
143
+ ```python
144
+ import pulumi
145
+ import pulumi_gitlab as gitlab
146
+
147
+ example = gitlab.ProjectCicdCatalog("example",
148
+ project="namespace/project",
149
+ enabled=True)
150
+ ```
151
+
152
+ ## Import
153
+
154
+ Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_cicd_catalog`. For example:
155
+
156
+ terraform
157
+
158
+ import {
159
+
160
+ to = gitlab_project_cicd_catalog.example
161
+
162
+ id = "see CLI command below for ID"
163
+
164
+ }
165
+
166
+ Importing using the CLI is supported with the following syntax:
167
+
168
+ Gitlab Project CICD Catalogs can be imported with their id, e.g.
169
+
170
+ ```sh
171
+ $ pulumi import gitlab:index/projectCicdCatalog:ProjectCicdCatalog example "1"
172
+ ```
173
+
174
+ :param str resource_name: The name of the resource.
175
+ :param pulumi.ResourceOptions opts: Options for the resource.
176
+ :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
177
+ :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
178
+ """
179
+ ...
180
+ @overload
181
+ def __init__(__self__,
182
+ resource_name: str,
183
+ args: ProjectCicdCatalogArgs,
184
+ opts: Optional[pulumi.ResourceOptions] = None):
185
+ """
186
+ The `ProjectCicdCatalog` resource allows users to manage the lifecycle of a CI/CD Catalog project.
187
+
188
+ This resource controls whether a project is available as a CI/CD Catalog resource.
189
+
190
+ > If `keep_settings_on_destroy` is set to false, destroying the resource will revert the catalog status to the value that was present when the resource was first created.
191
+ You will need to apply the resource with the new setting before destroying the resource.
192
+
193
+ **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcatalogresourcescreate)
194
+
195
+ ## Example Usage
196
+
197
+ ```python
198
+ import pulumi
199
+ import pulumi_gitlab as gitlab
200
+
201
+ example = gitlab.ProjectCicdCatalog("example",
202
+ project="namespace/project",
203
+ enabled=True)
204
+ ```
205
+
206
+ ## Import
207
+
208
+ Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_cicd_catalog`. For example:
209
+
210
+ terraform
211
+
212
+ import {
213
+
214
+ to = gitlab_project_cicd_catalog.example
215
+
216
+ id = "see CLI command below for ID"
217
+
218
+ }
219
+
220
+ Importing using the CLI is supported with the following syntax:
221
+
222
+ Gitlab Project CICD Catalogs can be imported with their id, e.g.
223
+
224
+ ```sh
225
+ $ pulumi import gitlab:index/projectCicdCatalog:ProjectCicdCatalog example "1"
226
+ ```
227
+
228
+ :param str resource_name: The name of the resource.
229
+ :param ProjectCicdCatalogArgs args: The arguments to use to populate this resource's properties.
230
+ :param pulumi.ResourceOptions opts: Options for the resource.
231
+ """
232
+ ...
233
+ def __init__(__self__, resource_name: str, *args, **kwargs):
234
+ resource_args, opts = _utilities.get_resource_args_opts(ProjectCicdCatalogArgs, pulumi.ResourceOptions, *args, **kwargs)
235
+ if resource_args is not None:
236
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
237
+ else:
238
+ __self__._internal_init(resource_name, *args, **kwargs)
239
+
240
+ def _internal_init(__self__,
241
+ resource_name: str,
242
+ opts: Optional[pulumi.ResourceOptions] = None,
243
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
244
+ keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
245
+ project: Optional[pulumi.Input[_builtins.str]] = None,
246
+ __props__=None):
247
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
248
+ if not isinstance(opts, pulumi.ResourceOptions):
249
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
250
+ if opts.id is None:
251
+ if __props__ is not None:
252
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
253
+ __props__ = ProjectCicdCatalogArgs.__new__(ProjectCicdCatalogArgs)
254
+
255
+ if enabled is None and not opts.urn:
256
+ raise TypeError("Missing required property 'enabled'")
257
+ __props__.__dict__["enabled"] = enabled
258
+ __props__.__dict__["keep_settings_on_destroy"] = keep_settings_on_destroy
259
+ if project is None and not opts.urn:
260
+ raise TypeError("Missing required property 'project'")
261
+ __props__.__dict__["project"] = project
262
+ super(ProjectCicdCatalog, __self__).__init__(
263
+ 'gitlab:index/projectCicdCatalog:ProjectCicdCatalog',
264
+ resource_name,
265
+ __props__,
266
+ opts)
267
+
268
+ @staticmethod
269
+ def get(resource_name: str,
270
+ id: pulumi.Input[str],
271
+ opts: Optional[pulumi.ResourceOptions] = None,
272
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
273
+ keep_settings_on_destroy: Optional[pulumi.Input[_builtins.bool]] = None,
274
+ project: Optional[pulumi.Input[_builtins.str]] = None) -> 'ProjectCicdCatalog':
275
+ """
276
+ Get an existing ProjectCicdCatalog resource's state with the given name, id, and optional extra
277
+ properties used to qualify the lookup.
278
+
279
+ :param str resource_name: The unique name of the resulting resource.
280
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
281
+ :param pulumi.ResourceOptions opts: Options for the resource.
282
+ :param pulumi.Input[_builtins.bool] enabled: Whether the project should be enabled as a CI/CD Catalog resource.
283
+ :param pulumi.Input[_builtins.str] project: The ID or URL-encoded path of the project.
284
+ """
285
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
286
+
287
+ __props__ = _ProjectCicdCatalogState.__new__(_ProjectCicdCatalogState)
288
+
289
+ __props__.__dict__["enabled"] = enabled
290
+ __props__.__dict__["keep_settings_on_destroy"] = keep_settings_on_destroy
291
+ __props__.__dict__["project"] = project
292
+ return ProjectCicdCatalog(resource_name, opts=opts, __props__=__props__)
293
+
294
+ @_builtins.property
295
+ @pulumi.getter
296
+ def enabled(self) -> pulumi.Output[_builtins.bool]:
297
+ """
298
+ Whether the project should be enabled as a CI/CD Catalog resource.
299
+ """
300
+ return pulumi.get(self, "enabled")
301
+
302
+ @_builtins.property
303
+ @pulumi.getter(name="keepSettingsOnDestroy")
304
+ def keep_settings_on_destroy(self) -> pulumi.Output[_builtins.bool]:
305
+ return pulumi.get(self, "keep_settings_on_destroy")
306
+
307
+ @_builtins.property
308
+ @pulumi.getter
309
+ def project(self) -> pulumi.Output[_builtins.str]:
310
+ """
311
+ The ID or URL-encoded path of the project.
312
+ """
313
+ return pulumi.get(self, "project")
314
+