<gh_stars>0// *** 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;
using Pulumi;

namespace PiersKarsenbarg.Octopusdeploy
{
    /// <summary>
    /// This resource manages projects in Octopus Deploy.
    /// 
    /// &gt; Credentials are stored in state as plaintext. Read more about sensitive data in state.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Octopusdeploy = PiersKarsenbarg.Octopusdeploy;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new Octopusdeploy.Project("example", new()
    ///     {
    ///         AutoCreateRelease = false,
    ///         DefaultGuidedFailureMode = "EnvironmentDefault",
    ///         DefaultToSkipIfAlreadyInstalled = false,
    ///         Description = "The development project.",
    ///         DiscreteChannelRelease = false,
    ///         IsDisabled = false,
    ///         IsDiscreteChannelRelease = false,
    ///         IsVersionControlled = false,
    ///         LifecycleId = "Lifecycles-123",
    ///         ProjectGroupId = "ProjectGroups-123",
    ///         TenantedDeploymentParticipation = "TenantedOrUntenanted",
    ///         ConnectivityPolicy = new Octopusdeploy.Inputs.ProjectConnectivityPolicyArgs
    ///         {
    ///             AllowDeploymentsToNoTargets = false,
    ///             ExcludeUnhealthyTargets = false,
    ///             SkipMachineBehavior = "SkipUnavailableMachines",
    ///         },
    ///         JiraServiceManagementExtensionSettings = new Octopusdeploy.Inputs.ProjectJiraServiceManagementExtensionSettingsArgs
    ///         {
    ///             ConnectionId = "133d7fe602514060a48bc42ee9870f99",
    ///             IsEnabled = false,
    ///             ServiceDeskProjectName = "Test Service Desk Project (OK to Delete)",
    ///         },
    ///         ServicenowExtensionSettings = new Octopusdeploy.Inputs.ProjectServicenowExtensionSettingsArgs
    ///         {
    ///             ConnectionId = "989034685e2c48c4b06a29286c9ef5cc",
    ///             IsEnabled = false,
    ///             IsStateAutomaticallyTransitioned = false,
    ///             StandardChangeTemplateName = "Standard Change Template Name (OK to Delete)",
    ///         },
    ///         Templates = new[]
    ///         {
    ///             new Octopusdeploy.Inputs.ProjectTemplateArgs
    ///             {
    ///                 DefaultValue = "example-default-value",
    ///                 HelpText = "example-help-test",
    ///                 Label = "example-label",
    ///                 Name = "example-template-value",
    ///                 DisplaySettings = 
    ///                 {
    ///                     { "Octopus.ControlType", "SingleLineText" },
    ///                 },
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import octopusdeploy:index/project:Project [options] octopusdeploy_project.&lt;name&gt; &lt;project-id&gt;
    /// ```
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/project:Project")]
    public partial class Project : global::Pulumi.CustomResource
    {
        [Output("allowDeploymentsToNoTargets")]
        public Output<bool?> AllowDeploymentsToNoTargets { get; private set; } = null!;

        [Output("autoCreateRelease")]
        public Output<bool> AutoCreateRelease { get; private set; } = null!;

        [Output("autoDeployReleaseOverrides")]
        public Output<string> AutoDeployReleaseOverrides { get; private set; } = null!;

        [Output("clonedFromProjectId")]
        public Output<string> ClonedFromProjectId { get; private set; } = null!;

        [Output("connectivityPolicy")]
        public Output<Outputs.ProjectConnectivityPolicy> ConnectivityPolicy { get; private set; } = null!;

        [Output("defaultGuidedFailureMode")]
        public Output<string> DefaultGuidedFailureMode { get; private set; } = null!;

        [Output("defaultToSkipIfAlreadyInstalled")]
        public Output<bool> DefaultToSkipIfAlreadyInstalled { get; private set; } = null!;

        [Output("deploymentChangesTemplate")]
        public Output<string> DeploymentChangesTemplate { get; private set; } = null!;

        [Output("deploymentProcessId")]
        public Output<string> DeploymentProcessId { get; private set; } = null!;

        /// <summary>
        /// The description of this project.
        /// </summary>
        [Output("description")]
        public Output<string> Description { get; private set; } = null!;

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Output("discreteChannelRelease")]
        public Output<bool?> DiscreteChannelRelease { get; private set; } = null!;

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Output("gitAnonymousPersistenceSettings")]
        public Output<Outputs.ProjectGitAnonymousPersistenceSettings?> GitAnonymousPersistenceSettings { get; private set; } = null!;

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Output("gitLibraryPersistenceSettings")]
        public Output<Outputs.ProjectGitLibraryPersistenceSettings?> GitLibraryPersistenceSettings { get; private set; } = null!;

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Output("gitUsernamePasswordPersistenceSettings")]
        public Output<Outputs.ProjectGitUsernamePasswordPersistenceSettings?> GitUsernamePasswordPersistenceSettings { get; private set; } = null!;

        [Output("includedLibraryVariableSets")]
        public Output<ImmutableArray<string>> IncludedLibraryVariableSets { get; private set; } = null!;

        [Output("isDisabled")]
        public Output<bool> IsDisabled { get; private set; } = null!;

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Output("isDiscreteChannelRelease")]
        public Output<bool> IsDiscreteChannelRelease { get; private set; } = null!;

        [Output("isVersionControlled")]
        public Output<bool> IsVersionControlled { get; private set; } = null!;

        /// <summary>
        /// Provides extension settings for the Jira Service Management (JSM) integration for this project.
        /// </summary>
        [Output("jiraServiceManagementExtensionSettings")]
        public Output<Outputs.ProjectJiraServiceManagementExtensionSettings?> JiraServiceManagementExtensionSettings { get; private set; } = null!;

        /// <summary>
        /// The lifecycle ID associated with this project.
        /// </summary>
        [Output("lifecycleId")]
        public Output<string> LifecycleId { get; private set; } = null!;

        /// <summary>
        /// The name of the project in Octopus Deploy. This name must be unique.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The project group ID associated with this project.
        /// </summary>
        [Output("projectGroupId")]
        public Output<string> ProjectGroupId { get; private set; } = null!;

        [Output("releaseCreationStrategy")]
        public Output<Outputs.ProjectReleaseCreationStrategy> ReleaseCreationStrategy { get; private set; } = null!;

        [Output("releaseNotesTemplate")]
        public Output<string> ReleaseNotesTemplate { get; private set; } = null!;

        /// <summary>
        /// Provides extension settings for the ServiceNow integration for this project.
        /// </summary>
        [Output("servicenowExtensionSettings")]
        public Output<Outputs.ProjectServicenowExtensionSettings?> ServicenowExtensionSettings { get; private set; } = null!;

        /// <summary>
        /// A human-readable, unique identifier, used to identify a project.
        /// </summary>
        [Output("slug")]
        public Output<string> Slug { get; private set; } = null!;

        /// <summary>
        /// The space ID associated with this project.
        /// </summary>
        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        [Output("templates")]
        public Output<ImmutableArray<Outputs.ProjectTemplate>> Templates { get; private set; } = null!;

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Output("tenantedDeploymentParticipation")]
        public Output<string> TenantedDeploymentParticipation { get; private set; } = null!;

        [Output("variableSetId")]
        public Output<string> VariableSetId { get; private set; } = null!;

        [Output("versioningStrategies")]
        public Output<ImmutableArray<Outputs.ProjectVersioningStrategy>> VersioningStrategies { get; private set; } = null!;


        /// <summary>
        /// Create a Project resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Project(string name, ProjectArgs args, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/project:Project", name, args ?? new ProjectArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Project(string name, Input<string> id, ProjectState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/project:Project", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? 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;
        }
        /// <summary>
        /// Get an existing Project resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Project Get(string name, Input<string> id, ProjectState? state = null, CustomResourceOptions? options = null)
        {
            return new Project(name, id, state, options);
        }
    }

    public sealed class ProjectArgs : global::Pulumi.ResourceArgs
    {
        [Input("allowDeploymentsToNoTargets")]
        public Input<bool>? AllowDeploymentsToNoTargets { get; set; }

        [Input("autoCreateRelease")]
        public Input<bool>? AutoCreateRelease { get; set; }

        [Input("autoDeployReleaseOverrides")]
        public Input<string>? AutoDeployReleaseOverrides { get; set; }

        [Input("clonedFromProjectId")]
        public Input<string>? ClonedFromProjectId { get; set; }

        [Input("connectivityPolicy")]
        public Input<Inputs.ProjectConnectivityPolicyArgs>? ConnectivityPolicy { get; set; }

        [Input("defaultGuidedFailureMode")]
        public Input<string>? DefaultGuidedFailureMode { get; set; }

        [Input("defaultToSkipIfAlreadyInstalled")]
        public Input<bool>? DefaultToSkipIfAlreadyInstalled { get; set; }

        [Input("deploymentChangesTemplate")]
        public Input<string>? DeploymentChangesTemplate { get; set; }

        /// <summary>
        /// The description of this project.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Input("discreteChannelRelease")]
        public Input<bool>? DiscreteChannelRelease { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitAnonymousPersistenceSettings")]
        public Input<Inputs.ProjectGitAnonymousPersistenceSettingsArgs>? GitAnonymousPersistenceSettings { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitLibraryPersistenceSettings")]
        public Input<Inputs.ProjectGitLibraryPersistenceSettingsArgs>? GitLibraryPersistenceSettings { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitUsernamePasswordPersistenceSettings")]
        public Input<Inputs.ProjectGitUsernamePasswordPersistenceSettingsArgs>? GitUsernamePasswordPersistenceSettings { get; set; }

        [Input("includedLibraryVariableSets")]
        private InputList<string>? _includedLibraryVariableSets;
        public InputList<string> IncludedLibraryVariableSets
        {
            get => _includedLibraryVariableSets ?? (_includedLibraryVariableSets = new InputList<string>());
            set => _includedLibraryVariableSets = value;
        }

        [Input("isDisabled")]
        public Input<bool>? IsDisabled { get; set; }

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Input("isDiscreteChannelRelease")]
        public Input<bool>? IsDiscreteChannelRelease { get; set; }

        [Input("isVersionControlled")]
        public Input<bool>? IsVersionControlled { get; set; }

        /// <summary>
        /// Provides extension settings for the Jira Service Management (JSM) integration for this project.
        /// </summary>
        [Input("jiraServiceManagementExtensionSettings")]
        public Input<Inputs.ProjectJiraServiceManagementExtensionSettingsArgs>? JiraServiceManagementExtensionSettings { get; set; }

        /// <summary>
        /// The lifecycle ID associated with this project.
        /// </summary>
        [Input("lifecycleId", required: true)]
        public Input<string> LifecycleId { get; set; } = null!;

        /// <summary>
        /// The name of the project in Octopus Deploy. This name must be unique.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The project group ID associated with this project.
        /// </summary>
        [Input("projectGroupId", required: true)]
        public Input<string> ProjectGroupId { get; set; } = null!;

        [Input("releaseCreationStrategy")]
        public Input<Inputs.ProjectReleaseCreationStrategyArgs>? ReleaseCreationStrategy { get; set; }

        [Input("releaseNotesTemplate")]
        public Input<string>? ReleaseNotesTemplate { get; set; }

        /// <summary>
        /// Provides extension settings for the ServiceNow integration for this project.
        /// </summary>
        [Input("servicenowExtensionSettings")]
        public Input<Inputs.ProjectServicenowExtensionSettingsArgs>? ServicenowExtensionSettings { get; set; }

        /// <summary>
        /// A human-readable, unique identifier, used to identify a project.
        /// </summary>
        [Input("slug")]
        public Input<string>? Slug { get; set; }

        /// <summary>
        /// The space ID associated with this project.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("templates")]
        private InputList<Inputs.ProjectTemplateArgs>? _templates;
        public InputList<Inputs.ProjectTemplateArgs> Templates
        {
            get => _templates ?? (_templates = new InputList<Inputs.ProjectTemplateArgs>());
            set => _templates = value;
        }

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Input("tenantedDeploymentParticipation")]
        public Input<string>? TenantedDeploymentParticipation { get; set; }

        [Input("versioningStrategies")]
        private InputList<Inputs.ProjectVersioningStrategyArgs>? _versioningStrategies;
        public InputList<Inputs.ProjectVersioningStrategyArgs> VersioningStrategies
        {
            get => _versioningStrategies ?? (_versioningStrategies = new InputList<Inputs.ProjectVersioningStrategyArgs>());
            set => _versioningStrategies = value;
        }

        public ProjectArgs()
        {
        }
        public static new ProjectArgs Empty => new ProjectArgs();
    }

    public sealed class ProjectState : global::Pulumi.ResourceArgs
    {
        [Input("allowDeploymentsToNoTargets")]
        public Input<bool>? AllowDeploymentsToNoTargets { get; set; }

        [Input("autoCreateRelease")]
        public Input<bool>? AutoCreateRelease { get; set; }

        [Input("autoDeployReleaseOverrides")]
        public Input<string>? AutoDeployReleaseOverrides { get; set; }

        [Input("clonedFromProjectId")]
        public Input<string>? ClonedFromProjectId { get; set; }

        [Input("connectivityPolicy")]
        public Input<Inputs.ProjectConnectivityPolicyGetArgs>? ConnectivityPolicy { get; set; }

        [Input("defaultGuidedFailureMode")]
        public Input<string>? DefaultGuidedFailureMode { get; set; }

        [Input("defaultToSkipIfAlreadyInstalled")]
        public Input<bool>? DefaultToSkipIfAlreadyInstalled { get; set; }

        [Input("deploymentChangesTemplate")]
        public Input<string>? DeploymentChangesTemplate { get; set; }

        [Input("deploymentProcessId")]
        public Input<string>? DeploymentProcessId { get; set; }

        /// <summary>
        /// The description of this project.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Input("discreteChannelRelease")]
        public Input<bool>? DiscreteChannelRelease { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitAnonymousPersistenceSettings")]
        public Input<Inputs.ProjectGitAnonymousPersistenceSettingsGetArgs>? GitAnonymousPersistenceSettings { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitLibraryPersistenceSettings")]
        public Input<Inputs.ProjectGitLibraryPersistenceSettingsGetArgs>? GitLibraryPersistenceSettings { get; set; }

        /// <summary>
        /// Provides Git-related persistence settings for a version-controlled project.
        /// </summary>
        [Input("gitUsernamePasswordPersistenceSettings")]
        public Input<Inputs.ProjectGitUsernamePasswordPersistenceSettingsGetArgs>? GitUsernamePasswordPersistenceSettings { get; set; }

        [Input("includedLibraryVariableSets")]
        private InputList<string>? _includedLibraryVariableSets;
        public InputList<string> IncludedLibraryVariableSets
        {
            get => _includedLibraryVariableSets ?? (_includedLibraryVariableSets = new InputList<string>());
            set => _includedLibraryVariableSets = value;
        }

        [Input("isDisabled")]
        public Input<bool>? IsDisabled { get; set; }

        /// <summary>
        /// Treats releases of different channels to the same environment as a separate deployment dimension
        /// </summary>
        [Input("isDiscreteChannelRelease")]
        public Input<bool>? IsDiscreteChannelRelease { get; set; }

        [Input("isVersionControlled")]
        public Input<bool>? IsVersionControlled { get; set; }

        /// <summary>
        /// Provides extension settings for the Jira Service Management (JSM) integration for this project.
        /// </summary>
        [Input("jiraServiceManagementExtensionSettings")]
        public Input<Inputs.ProjectJiraServiceManagementExtensionSettingsGetArgs>? JiraServiceManagementExtensionSettings { get; set; }

        /// <summary>
        /// The lifecycle ID associated with this project.
        /// </summary>
        [Input("lifecycleId")]
        public Input<string>? LifecycleId { get; set; }

        /// <summary>
        /// The name of the project in Octopus Deploy. This name must be unique.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The project group ID associated with this project.
        /// </summary>
        [Input("projectGroupId")]
        public Input<string>? ProjectGroupId { get; set; }

        [Input("releaseCreationStrategy")]
        public Input<Inputs.ProjectReleaseCreationStrategyGetArgs>? ReleaseCreationStrategy { get; set; }

        [Input("releaseNotesTemplate")]
        public Input<string>? ReleaseNotesTemplate { get; set; }

        /// <summary>
        /// Provides extension settings for the ServiceNow integration for this project.
        /// </summary>
        [Input("servicenowExtensionSettings")]
        public Input<Inputs.ProjectServicenowExtensionSettingsGetArgs>? ServicenowExtensionSettings { get; set; }

        /// <summary>
        /// A human-readable, unique identifier, used to identify a project.
        /// </summary>
        [Input("slug")]
        public Input<string>? Slug { get; set; }

        /// <summary>
        /// The space ID associated with this project.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("templates")]
        private InputList<Inputs.ProjectTemplateGetArgs>? _templates;
        public InputList<Inputs.ProjectTemplateGetArgs> Templates
        {
            get => _templates ?? (_templates = new InputList<Inputs.ProjectTemplateGetArgs>());
            set => _templates = value;
        }

        /// <summary>
        /// The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
        /// </summary>
        [Input("tenantedDeploymentParticipation")]
        public Input<string>? TenantedDeploymentParticipation { get; set; }

        [Input("variableSetId")]
        public Input<string>? VariableSetId { get; set; }

        [Input("versioningStrategies")]
        private InputList<Inputs.ProjectVersioningStrategyGetArgs>? _versioningStrategies;
        public InputList<Inputs.ProjectVersioningStrategyGetArgs> VersioningStrategies
        {
            get => _versioningStrategies ?? (_versioningStrategies = new InputList<Inputs.ProjectVersioningStrategyGetArgs>());
            set => _versioningStrategies = value;
        }

        public ProjectState()
        {
        }
        public static new ProjectState Empty => new ProjectState();
    }
}
