<filename>sdk/dotnet/Ovh/Vrack/CloudProject.cs<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 Lbrlabs.PulumiPackage.Ovh.Vrack
{
    /// <summary>
    /// Attach a Public Cloud Project to a VRack.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using System.Linq;
    /// using Pulumi;
    /// using Ovh = Lbrlabs.PulumiPackage.Ovh;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var vcp = new Ovh.Vrack.CloudProject("vcp", new()
    ///     {
    ///         ProjectId = "67890",
    ///         ServiceName = "12345",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Attachment of a public cloud project and a VRack can be imported using the `project_id`, the `service_name` (vRackID) and the `attach_id`, separated by "/" E.g., bash
    /// 
    /// ```sh
    ///  $ pulumi import ovh:Vrack/cloudProject:CloudProject myattach ookie9mee8Shaeghaeleeju7Xeghohv6e/pn-12345678/vrack_pn-12345678-cloudproject_ookie9mee8Shaeghaeleeju7Xeghohv6e-attach
    /// ```
    /// </summary>
    [OvhResourceType("ovh:Vrack/cloudProject:CloudProject")]
    public partial class CloudProject : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// The service name of the vrack. If omitted,
        /// the `OVH_VRACK_SERVICE` environment variable is used.
        /// </summary>
        [Output("serviceName")]
        public Output<string> ServiceName { get; private set; } = null!;


        /// <summary>
        /// Create a CloudProject 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 CloudProject(string name, CloudProjectArgs args, CustomResourceOptions? options = null)
            : base("ovh:Vrack/cloudProject:CloudProject", name, args ?? new CloudProjectArgs(), MakeResourceOptions(options, ""))
        {
        }

        private CloudProject(string name, Input<string> id, CloudProjectState? state = null, CustomResourceOptions? options = null)
            : base("ovh:Vrack/cloudProject:CloudProject", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/lbrlabs",
            };
            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 CloudProject 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 CloudProject Get(string name, Input<string> id, CloudProjectState? state = null, CustomResourceOptions? options = null)
        {
            return new CloudProject(name, id, state, options);
        }
    }

    public sealed class CloudProjectArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        /// <summary>
        /// The service name of the vrack. If omitted,
        /// the `OVH_VRACK_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

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

    public sealed class CloudProjectState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of the public cloud project. If omitted,
        /// the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// The service name of the vrack. If omitted,
        /// the `OVH_VRACK_SERVICE` environment variable is used.
        /// </summary>
        [Input("serviceName")]
        public Input<string>? ServiceName { get; set; }

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