ProjectArgs

data class ProjectArgs(val allowMergeOnSkippedPipeline: 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 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 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 emailsDisabled: Output<Boolean>? = null, val externalAuthorizationClassificationLabel: Output<String>? = null, val forkingAccessLevel: Output<String>? = null, val groupWithProjectTemplatesId: Output<Int>? = null, val importUrl: Output<String>? = null, val initializeWithReadme: Output<Boolean>? = null, val issuesAccessLevel: Output<String>? = null, val issuesEnabled: Output<Boolean>? = null, val issuesTemplate: Output<String>? = 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 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 operationsAccessLevel: Output<String>? = null, val packagesEnabled: Output<Boolean>? = null, val pagesAccessLevel: Output<String>? = null, val path: Output<String>? = null, val pipelinesEnabled: Output<Boolean>? = null, val printingMergeRequestLinkEnabled: Output<Boolean>? = null, val publicBuilds: Output<Boolean>? = null, val pushRules: Output<ProjectPushRulesArgs>? = 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 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

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.ProjectArgs;
import com.pulumi.gitlab.inputs.ProjectPushRulesArgs;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetUserArgs;
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 example = new Project("example", ProjectArgs.builder()
.description("My awesome codebase")
.visibilityLevel("public")
.build());
var example_two = new Project("example-two", ProjectArgs.builder()
.pushRules(ProjectPushRulesArgs.builder()
.authorEmailRegex("@example\\.com$")
.commitCommitterCheck(true)
.memberCheck(true)
.preventSecrets(true)
.build())
.build());
final var peterParker = GitlabFunctions.getUser(GetUserArgs.builder()
.username("peter_parker")
.build());
var petersRepo = new Project("petersRepo", ProjectArgs.builder()
.description("This is a description")
.namespaceId(peterParker.applyValue(getUserResult -> getUserResult.namespaceId()))
.build());
}
}

Import

$ 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

Constructors

Link copied to clipboard
constructor(allowMergeOnSkippedPipeline: 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, 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, containerExpirationPolicy: Output<ProjectContainerExpirationPolicyArgs>? = null, containerRegistryAccessLevel: Output<String>? = null, containerRegistryEnabled: Output<Boolean>? = null, defaultBranch: Output<String>? = null, description: Output<String>? = null, emailsDisabled: Output<Boolean>? = null, externalAuthorizationClassificationLabel: Output<String>? = null, forkingAccessLevel: Output<String>? = null, groupWithProjectTemplatesId: Output<Int>? = null, importUrl: Output<String>? = null, initializeWithReadme: Output<Boolean>? = null, issuesAccessLevel: Output<String>? = null, issuesEnabled: Output<Boolean>? = null, issuesTemplate: Output<String>? = 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, name: Output<String>? = null, namespaceId: Output<Int>? = null, onlyAllowMergeIfAllDiscussionsAreResolved: Output<Boolean>? = null, onlyAllowMergeIfPipelineSucceeds: Output<Boolean>? = null, onlyMirrorProtectedBranches: Output<Boolean>? = null, operationsAccessLevel: Output<String>? = null, packagesEnabled: Output<Boolean>? = null, pagesAccessLevel: Output<String>? = null, path: Output<String>? = null, pipelinesEnabled: Output<Boolean>? = null, printingMergeRequestLinkEnabled: Output<Boolean>? = null, publicBuilds: Output<Boolean>? = null, pushRules: Output<ProjectPushRulesArgs>? = 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, 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
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 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.

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

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 emailsDisabled: Output<Boolean>? = null

Disable email notifications.

Link copied to clipboard

The classification label for the project.

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 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.

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

Create main branch with first commit containing a README.md file.

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 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. (Introduced in GitLab 14.5.)

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 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 operationsAccessLevel: Output<String>? = null

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

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

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

The path of the repository.

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

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 pushRules: Output<ProjectPushRulesArgs>? = null

Push rules for the project.

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

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. (Introduced in GitLab 14.6.)

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. GitLab >= 14.1

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.

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