ProjectArgs

data class ProjectArgs(val allowMergeOnSkippedPipeline: Output<Boolean>? = null, val allowPipelineTriggerApproveDeployment: Output<Boolean>? = null, val analyticsAccessLevel: Output<String>? = null, val approvalsBeforeMerge: Output<Int>? = null, val archiveOnDestroy: Output<Boolean>? = null, val archived: Output<Boolean>? = null, val autoCancelPendingPipelines: Output<String>? = null, val autoDevopsDeployStrategy: Output<String>? = null, val autoDevopsEnabled: Output<Boolean>? = null, val autocloseReferencedIssues: Output<Boolean>? = null, val avatar: Output<String>? = null, val avatarHash: Output<String>? = null, val buildCoverageRegex: Output<String>? = null, val buildGitStrategy: Output<String>? = null, val buildTimeout: Output<Int>? = null, val buildsAccessLevel: Output<String>? = null, val ciConfigPath: Output<String>? = null, val ciDefaultGitDepth: Output<Int>? = null, val ciForwardDeploymentEnabled: Output<Boolean>? = null, val ciPipelineVariablesMinimumOverrideRole: Output<String>? = null, val ciRestrictPipelineCancellationRole: Output<String>? = null, val ciSeparatedCaches: Output<Boolean>? = null, val containerExpirationPolicy: Output<ProjectContainerExpirationPolicyArgs>? = null, val containerRegistryAccessLevel: Output<String>? = null, val containerRegistryEnabled: Output<Boolean>? = null, val defaultBranch: Output<String>? = null, val description: Output<String>? = null, val emailsEnabled: Output<Boolean>? = null, val environmentsAccessLevel: Output<String>? = null, val externalAuthorizationClassificationLabel: Output<String>? = null, val featureFlagsAccessLevel: Output<String>? = null, val forkedFromProjectId: Output<Int>? = null, val forkingAccessLevel: Output<String>? = null, val groupRunnersEnabled: Output<Boolean>? = null, val groupWithProjectTemplatesId: Output<Int>? = null, val importUrl: Output<String>? = null, val importUrlPassword: Output<String>? = null, val importUrlUsername: Output<String>? = null, val infrastructureAccessLevel: Output<String>? = null, val initializeWithReadme: Output<Boolean>? = null, val issuesAccessLevel: Output<String>? = null, val issuesEnabled: Output<Boolean>? = null, val issuesTemplate: Output<String>? = null, val keepLatestArtifact: Output<Boolean>? = null, val lfsEnabled: Output<Boolean>? = null, val mergeCommitTemplate: Output<String>? = null, val mergeMethod: Output<String>? = null, val mergePipelinesEnabled: Output<Boolean>? = null, val mergeRequestsAccessLevel: Output<String>? = null, val mergeRequestsEnabled: Output<Boolean>? = null, val mergeRequestsTemplate: Output<String>? = null, val mergeTrainsEnabled: Output<Boolean>? = null, val mirror: Output<Boolean>? = null, val mirrorOverwritesDivergedBranches: Output<Boolean>? = null, val mirrorTriggerBuilds: Output<Boolean>? = null, val modelExperimentsAccessLevel: Output<String>? = null, val modelRegistryAccessLevel: Output<String>? = null, val monitorAccessLevel: Output<String>? = null, val mrDefaultTargetSelf: Output<Boolean>? = null, val name: Output<String>? = null, val namespaceId: Output<Int>? = null, val onlyAllowMergeIfAllDiscussionsAreResolved: Output<Boolean>? = null, val onlyAllowMergeIfPipelineSucceeds: Output<Boolean>? = null, val onlyMirrorProtectedBranches: Output<Boolean>? = null, val packagesEnabled: Output<Boolean>? = null, val pagesAccessLevel: Output<String>? = null, val path: Output<String>? = null, val permanentlyDeleteOnDestroy: Output<Boolean>? = null, val pipelinesEnabled: Output<Boolean>? = null, val preReceiveSecretDetectionEnabled: Output<Boolean>? = null, val preventMergeWithoutJiraIssue: Output<Boolean>? = null, val printingMergeRequestLinkEnabled: Output<Boolean>? = null, val publicBuilds: Output<Boolean>? = null, val publicJobs: Output<Boolean>? = null, val pushRules: Output<ProjectPushRulesArgs>? = null, val releasesAccessLevel: Output<String>? = null, val removeSourceBranchAfterMerge: Output<Boolean>? = null, val repositoryAccessLevel: Output<String>? = null, val repositoryStorage: Output<String>? = null, val requestAccessEnabled: Output<Boolean>? = null, val requirementsAccessLevel: Output<String>? = null, val resolveOutdatedDiffDiscussions: Output<Boolean>? = null, val restrictUserDefinedVariables: Output<Boolean>? = null, val securityAndComplianceAccessLevel: Output<String>? = null, val sharedRunnersEnabled: Output<Boolean>? = null, val skipWaitForDefaultBranchProtection: Output<Boolean>? = null, val snippetsAccessLevel: Output<String>? = null, val snippetsEnabled: Output<Boolean>? = null, val squashCommitTemplate: Output<String>? = null, val squashOption: Output<String>? = null, val suggestionCommitMessage: Output<String>? = null, val tags: Output<List<String>>? = null, val templateName: Output<String>? = null, val templateProjectId: Output<Int>? = null, val topics: Output<List<String>>? = null, val useCustomTemplate: Output<Boolean>? = null, val visibilityLevel: Output<String>? = null, val wikiAccessLevel: Output<String>? = null, val wikiEnabled: Output<Boolean>? = null) : ConvertibleToJava<ProjectArgs>

Example Usage

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_project. For example: terraform import { to = gitlab_project.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax:

$ pulumi import gitlab:index/project:Project You can import a project state using `<resource> <id>`. The

id can be whatever the get_single_project takes for its :id value, so for example:

$ pulumi import gitlab:index/project:Project example richardc/example

NOTE: the import_url_username and import_url_password cannot be imported.

Constructors

Link copied to clipboard
constructor(allowMergeOnSkippedPipeline: Output<Boolean>? = null, allowPipelineTriggerApproveDeployment: Output<Boolean>? = null, analyticsAccessLevel: Output<String>? = null, approvalsBeforeMerge: Output<Int>? = null, archiveOnDestroy: Output<Boolean>? = null, archived: Output<Boolean>? = null, autoCancelPendingPipelines: Output<String>? = null, autoDevopsDeployStrategy: Output<String>? = null, autoDevopsEnabled: Output<Boolean>? = null, autocloseReferencedIssues: Output<Boolean>? = null, avatar: Output<String>? = null, avatarHash: Output<String>? = null, buildCoverageRegex: Output<String>? = null, buildGitStrategy: Output<String>? = null, buildTimeout: Output<Int>? = null, buildsAccessLevel: Output<String>? = null, ciConfigPath: Output<String>? = null, ciDefaultGitDepth: Output<Int>? = null, ciForwardDeploymentEnabled: Output<Boolean>? = null, ciPipelineVariablesMinimumOverrideRole: Output<String>? = null, ciRestrictPipelineCancellationRole: Output<String>? = null, ciSeparatedCaches: Output<Boolean>? = null, containerExpirationPolicy: Output<ProjectContainerExpirationPolicyArgs>? = null, containerRegistryAccessLevel: Output<String>? = null, containerRegistryEnabled: Output<Boolean>? = null, defaultBranch: Output<String>? = null, description: Output<String>? = null, emailsEnabled: Output<Boolean>? = null, environmentsAccessLevel: Output<String>? = null, externalAuthorizationClassificationLabel: Output<String>? = null, featureFlagsAccessLevel: Output<String>? = null, forkedFromProjectId: Output<Int>? = null, forkingAccessLevel: Output<String>? = null, groupRunnersEnabled: Output<Boolean>? = null, groupWithProjectTemplatesId: Output<Int>? = null, importUrl: Output<String>? = null, importUrlPassword: Output<String>? = null, importUrlUsername: Output<String>? = null, infrastructureAccessLevel: Output<String>? = null, initializeWithReadme: Output<Boolean>? = null, issuesAccessLevel: Output<String>? = null, issuesEnabled: Output<Boolean>? = null, issuesTemplate: Output<String>? = null, keepLatestArtifact: Output<Boolean>? = null, lfsEnabled: Output<Boolean>? = null, mergeCommitTemplate: Output<String>? = null, mergeMethod: Output<String>? = null, mergePipelinesEnabled: Output<Boolean>? = null, mergeRequestsAccessLevel: Output<String>? = null, mergeRequestsEnabled: Output<Boolean>? = null, mergeRequestsTemplate: Output<String>? = null, mergeTrainsEnabled: Output<Boolean>? = null, mirror: Output<Boolean>? = null, mirrorOverwritesDivergedBranches: Output<Boolean>? = null, mirrorTriggerBuilds: Output<Boolean>? = null, modelExperimentsAccessLevel: Output<String>? = null, modelRegistryAccessLevel: Output<String>? = null, monitorAccessLevel: Output<String>? = null, mrDefaultTargetSelf: Output<Boolean>? = null, name: Output<String>? = null, namespaceId: Output<Int>? = null, onlyAllowMergeIfAllDiscussionsAreResolved: Output<Boolean>? = null, onlyAllowMergeIfPipelineSucceeds: Output<Boolean>? = null, onlyMirrorProtectedBranches: Output<Boolean>? = null, packagesEnabled: Output<Boolean>? = null, pagesAccessLevel: Output<String>? = null, path: Output<String>? = null, permanentlyDeleteOnDestroy: Output<Boolean>? = null, pipelinesEnabled: Output<Boolean>? = null, preReceiveSecretDetectionEnabled: Output<Boolean>? = null, preventMergeWithoutJiraIssue: Output<Boolean>? = null, printingMergeRequestLinkEnabled: Output<Boolean>? = null, publicBuilds: Output<Boolean>? = null, publicJobs: Output<Boolean>? = null, pushRules: Output<ProjectPushRulesArgs>? = null, releasesAccessLevel: Output<String>? = null, removeSourceBranchAfterMerge: Output<Boolean>? = null, repositoryAccessLevel: Output<String>? = null, repositoryStorage: Output<String>? = null, requestAccessEnabled: Output<Boolean>? = null, requirementsAccessLevel: Output<String>? = null, resolveOutdatedDiffDiscussions: Output<Boolean>? = null, restrictUserDefinedVariables: Output<Boolean>? = null, securityAndComplianceAccessLevel: Output<String>? = null, sharedRunnersEnabled: Output<Boolean>? = null, skipWaitForDefaultBranchProtection: Output<Boolean>? = null, snippetsAccessLevel: Output<String>? = null, snippetsEnabled: Output<Boolean>? = null, squashCommitTemplate: Output<String>? = null, squashOption: Output<String>? = null, suggestionCommitMessage: Output<String>? = null, tags: Output<List<String>>? = null, templateName: Output<String>? = null, templateProjectId: Output<Int>? = null, topics: Output<List<String>>? = null, useCustomTemplate: Output<Boolean>? = null, visibilityLevel: Output<String>? = null, wikiAccessLevel: Output<String>? = null, wikiEnabled: Output<Boolean>? = null)

Properties

Link copied to clipboard

Set to true if you want to treat skipped pipelines as if they finished with success.

Link copied to clipboard

Set whether or not a pipeline triggerer is allowed to approve deployments. Premium and Ultimate only.

Link copied to clipboard
val analyticsAccessLevel: Output<String>? = null

Set the analytics access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val approvalsBeforeMerge: Output<Int>? = null

Number of merge request approvals required for merging. Default is 0. This field does not work well in combination with the gitlab.ProjectApprovalRule resource and is most likely gonna be deprecated in a future GitLab version (see this upstream epic). In the meantime we recommend against using this attribute and use gitlab.ProjectApprovalRule instead.

Link copied to clipboard
val archived: Output<Boolean>? = null

Whether the project is in read-only mode (archived). Repositories can be archived/unarchived by toggling this parameter.

Link copied to clipboard
val archiveOnDestroy: Output<Boolean>? = null

Set to true to archive the project instead of deleting on destroy. If set to true it will entire omit the DELETE operation.

Link copied to clipboard
val autoCancelPendingPipelines: Output<String>? = null

Auto-cancel pending pipelines. This isn’t a boolean, but enabled/disabled.

Link copied to clipboard
val autocloseReferencedIssues: Output<Boolean>? = null

Set whether auto-closing referenced issues on default branch.

Link copied to clipboard
val autoDevopsDeployStrategy: Output<String>? = null

Auto Deploy strategy. Valid values are continuous, manual, timed_incremental.

Link copied to clipboard
val autoDevopsEnabled: Output<Boolean>? = null

Enable Auto DevOps for this project.

Link copied to clipboard
val avatar: Output<String>? = null

A local path to the avatar image to upload. Note: not available for imported resources.

Link copied to clipboard
val avatarHash: Output<String>? = null

The hash of the avatar image. Use filesha256("path/to/avatar.png") whenever possible. Note: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.

Link copied to clipboard
val buildCoverageRegex: Output<String>? = null

Test coverage parsing for the project. This is deprecated feature in GitLab 15.0.

Link copied to clipboard
val buildGitStrategy: Output<String>? = null

The Git strategy. Defaults to fetch. Valid values are clone, fetch.

Link copied to clipboard
val buildsAccessLevel: Output<String>? = null

Set the builds access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val buildTimeout: Output<Int>? = null

The maximum amount of time, in seconds, that a job can run.

Link copied to clipboard
val ciConfigPath: Output<String>? = null

Custom Path to CI config file.

Link copied to clipboard
val ciDefaultGitDepth: Output<Int>? = null

Default number of revisions for shallow cloning.

Link copied to clipboard
val ciForwardDeploymentEnabled: Output<Boolean>? = null

When a new deployment job starts, skip older deployment jobs that are still pending.

Link copied to clipboard

The minimum role required to set variables when running pipelines and jobs. Introduced in GitLab 17.1. Valid values are developer, maintainer, owner, no_one_allowed

Link copied to clipboard

The role required to cancel a pipeline or job. Premium and Ultimate only. Valid values are developer, maintainer, no one

Link copied to clipboard
val ciSeparatedCaches: Output<Boolean>? = null

Use separate caches for protected branches.

Link copied to clipboard

Set the image cleanup policy for this project. Note: this field is sometimes named container_expiration_policy_attributes in the GitLab Upstream API.

Link copied to clipboard

Set visibility of container registry, for this project. Valid values are disabled, private, enabled.

Link copied to clipboard
val containerRegistryEnabled: Output<Boolean>? = null

Enable container registry for the project.

Link copied to clipboard
val defaultBranch: Output<String>? = null

The default branch for the project.

Link copied to clipboard
val description: Output<String>? = null

A description of the project.

Link copied to clipboard
val emailsEnabled: Output<Boolean>? = null

Enable email notifications.

Link copied to clipboard
val environmentsAccessLevel: Output<String>? = null

Set the environments access level. Valid values are disabled, private, enabled.

Link copied to clipboard

The classification label for the project.

Link copied to clipboard
val featureFlagsAccessLevel: Output<String>? = null

Set the feature flags access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val forkedFromProjectId: Output<Int>? = null

The id of the project to fork. During create the project is forked and during an update the fork relation is changed.

Link copied to clipboard
val forkingAccessLevel: Output<String>? = null

Set the forking access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val groupRunnersEnabled: Output<Boolean>? = null

Enable group runners for this project.

Link copied to clipboard
val groupWithProjectTemplatesId: Output<Int>? = null

For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires usecustomtemplate to be true (enterprise edition).

Link copied to clipboard
val importUrl: Output<String>? = null

Git URL to a repository to be imported. Together with mirror = true it will setup a Pull Mirror. This can also be used together with forked_from_project_id to setup a Pull Mirror for a fork. The fork takes precedence over the import. Make sure to provide the credentials in import_url_username and import_url_password. GitLab never returns the credentials, thus the provider cannot detect configuration drift in the credentials. They can also not be imported using pulumi import. See the examples section for how to properly use it.

Link copied to clipboard
val importUrlPassword: Output<String>? = null

The password for the import_url. The value of this field is used to construct a valid import_url and is only related to the provider. This field cannot be imported using pulumi import. See the examples section for how to properly use it.

Link copied to clipboard
val importUrlUsername: Output<String>? = null

The username for the import_url. The value of this field is used to construct a valid import_url and is only related to the provider. This field cannot be imported using pulumi import. See the examples section for how to properly use it.

Link copied to clipboard
val infrastructureAccessLevel: Output<String>? = null

Set the infrastructure access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val initializeWithReadme: Output<Boolean>? = null

Create main branch with first commit containing a README.md file. Must be set to true if importing an uninitialized project with a different default_branch.

Link copied to clipboard
val issuesAccessLevel: Output<String>? = null

Set the issues access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val issuesEnabled: Output<Boolean>? = null

Enable issue tracking for the project.

Link copied to clipboard
val issuesTemplate: Output<String>? = null

Sets the template for new issues in the project.

Link copied to clipboard
val keepLatestArtifact: Output<Boolean>? = null

Disable or enable the ability to keep the latest artifact for this project.

Link copied to clipboard
val lfsEnabled: Output<Boolean>? = null

Enable LFS for the project.

Link copied to clipboard
val mergeCommitTemplate: Output<String>? = null

Template used to create merge commit message in merge requests.

Link copied to clipboard
val mergeMethod: Output<String>? = null

Set the merge method. Valid values are merge, rebase_merge, ff.

Link copied to clipboard
val mergePipelinesEnabled: Output<Boolean>? = null

Enable or disable merge pipelines.

Link copied to clipboard
val mergeRequestsAccessLevel: Output<String>? = null

Set the merge requests access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val mergeRequestsEnabled: Output<Boolean>? = null

Enable merge requests for the project.

Link copied to clipboard
val mergeRequestsTemplate: Output<String>? = null

Sets the template for new merge requests in the project.

Link copied to clipboard
val mergeTrainsEnabled: Output<Boolean>? = null

Enable or disable merge trains. Requires merge_pipelines_enabled to be set to true to take effect.

Link copied to clipboard
val mirror: Output<Boolean>? = null

Enable project pull mirror.

Link copied to clipboard

Enable overwrite diverged branches for a mirrored project.

Link copied to clipboard
val mirrorTriggerBuilds: Output<Boolean>? = null

Enable trigger builds on pushes for a mirrored project.

Link copied to clipboard
val modelExperimentsAccessLevel: Output<String>? = null

Set visibility of machine learning model experiments. Valid values are disabled, private, enabled.

Link copied to clipboard
val modelRegistryAccessLevel: Output<String>? = null

Set visibility of machine learning model registry. Valid values are disabled, private, enabled.

Link copied to clipboard
val monitorAccessLevel: Output<String>? = null

Set the monitor access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val mrDefaultTargetSelf: Output<Boolean>? = null

For forked projects, target merge requests to this project. If false, the target will be the upstream project.

Link copied to clipboard
val name: Output<String>? = null

The name of the project.

Link copied to clipboard
val namespaceId: Output<Int>? = null

The namespace (group or user) of the project. Defaults to your user.

Set to true if you want allow merges only if all discussions are resolved.

Link copied to clipboard

Set to true if you want allow merges only if a pipeline succeeds.

Link copied to clipboard

Enable only mirror protected branches for a mirrored project.

Link copied to clipboard
val packagesEnabled: Output<Boolean>? = null

Enable packages repository for the project.

Link copied to clipboard
val pagesAccessLevel: Output<String>? = null

Enable pages access control. Valid values are public, private, enabled, disabled.

Link copied to clipboard
val path: Output<String>? = null

The path of the repository.

Link copied to clipboard
val permanentlyDeleteOnDestroy: Output<Boolean>? = null

Set to true to immediately permanently delete the project instead of scheduling a delete for Premium and Ultimate tiers.

Link copied to clipboard
val pipelinesEnabled: Output<Boolean>? = null

Enable pipelines for the project. The pipelines_enabled field is being sent as jobs_enabled in the GitLab API calls.

Link copied to clipboard

Whether Secret Push Detection is enabled. Requires GitLab Ultimate and at least GitLab 17.3.

Link copied to clipboard

Set whether merge requests require an associated issue from Jira. Premium and Ultimate only.

Link copied to clipboard

Show link to create/view merge request when pushing from the command line

Link copied to clipboard
val publicBuilds: Output<Boolean>? = null

If true, jobs can be viewed by non-project members.

Link copied to clipboard
val publicJobs: Output<Boolean>? = null

If true, jobs can be viewed by non-project members.

Link copied to clipboard
val pushRules: Output<ProjectPushRulesArgs>? = null

Push rules for the project.

Link copied to clipboard
val releasesAccessLevel: Output<String>? = null

Set the releases access level. Valid values are disabled, private, enabled.

Link copied to clipboard

Enable Delete source branch option by default for all new merge requests.

Link copied to clipboard
val repositoryAccessLevel: Output<String>? = null

Set the repository access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val repositoryStorage: Output<String>? = null

Which storage shard the repository is on. (administrator only)

Link copied to clipboard
val requestAccessEnabled: Output<Boolean>? = null

Allow users to request member access.

Link copied to clipboard
val requirementsAccessLevel: Output<String>? = null

Set the requirements access level. Valid values are disabled, private, enabled.

Link copied to clipboard

Automatically resolve merge request diffs discussions on lines changed with a push.

Link copied to clipboard

Allow only users with the Maintainer role to pass user-defined variables when triggering a pipeline.

Link copied to clipboard

Set the security and compliance access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val sharedRunnersEnabled: Output<Boolean>? = null

Enable shared runners for this project.

Link copied to clipboard

If true, the default behavior to wait for the default branch protection to be created is skipped. This is necessary if the current user is not an admin and the default branch protection is disabled on an instance-level. There is currently no known way to determine if the default branch protection is disabled on an instance-level for non-admin users. This attribute is only used during resource creation, thus changes are suppressed and the attribute cannot be imported.

Link copied to clipboard
val snippetsAccessLevel: Output<String>? = null

Set the snippets access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val snippetsEnabled: Output<Boolean>? = null

Enable snippets for the project.

Link copied to clipboard
val squashCommitTemplate: Output<String>? = null

Template used to create squash commit message in merge requests.

Link copied to clipboard
val squashOption: Output<String>? = null

Squash commits when merge request. Valid values are never, always, default_on, or default_off. The default value is default_off.

Link copied to clipboard
val suggestionCommitMessage: Output<String>? = null

The commit message used to apply merge request suggestions.

Link copied to clipboard
val tags: Output<List<String>>? = null

The list of tags for a project; put array of tags, that should be finally assigned to a project. Use topics instead.

Link copied to clipboard
val templateName: Output<String>? = null

When used without usecustomtemplate, name of a built-in project template. When used with usecustomtemplate, name of a custom project template. This option is mutually exclusive with template_project_id.

Link copied to clipboard
val templateProjectId: Output<Int>? = null

When used with usecustomtemplate, project ID of a custom project template. This is preferable to using templatename since templatename may be ambiguous (enterprise edition). This option is mutually exclusive with template_name. See gitlab.GroupProjectFileTemplate to set a project as a template project. If a project has not been set as a template, using it here will result in an error.

Link copied to clipboard
val topics: Output<List<String>>? = null

The list of topics for the project.

Link copied to clipboard
val useCustomTemplate: Output<Boolean>? = null

Use either custom instance or group (with groupwithprojecttemplatesid) project template (enterprise edition).

Link copied to clipboard
val visibilityLevel: Output<String>? = null

Set to public to create a public project. Valid values are private, internal, public.

Link copied to clipboard
val wikiAccessLevel: Output<String>? = null

Set the wiki access level. Valid values are disabled, private, enabled.

Link copied to clipboard
val wikiEnabled: Output<Boolean>? = null

Enable wiki for the project.

Functions

Link copied to clipboard
open override fun toJava(): ProjectArgs