1. Registry
  2. Packages
  3. Defang
  4. API Docs
  5. Project

This package is deprecated. It has been split into cloud-specific packages: defang-aws, defang-gcp, and defang-azure.

Viewing docs for defang v1.0.0
published on Monday, Mar 24, 2025 by Defang
defang logo defang

This package is deprecated. It has been split into cloud-specific packages: defang-aws, defang-gcp, and defang-azure.

Viewing docs for defang v1.0.0
published on Monday, Mar 24, 2025 by Defang

    Create Project Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: ProjectArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                config_paths: Optional[Sequence[str]] = None,
                provider_id: Optional[str] = None)
    func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: defang:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "defang_project" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var projectResource = new Defang.Project("projectResource", new()
    {
        ConfigPaths = new[]
        {
            "string",
        },
        ProviderID = "string",
    });
    
    example, err := defang.NewProject(ctx, "projectResource", &defang.ProjectArgs{
    	ConfigPaths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProviderID: pulumi.String("string"),
    })
    
    resource "defang_project" "projectResource" {
      lifecycle {
        create_before_destroy = true
      }
      config_paths = ["string"]
      provider_id  = "string"
    }
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .configPaths("string")
        .providerID("string")
        .build());
    
    project_resource = defang.Project("projectResource",
        config_paths=["string"],
        provider_id="string")
    
    const projectResource = new defang.Project("projectResource", {
        configPaths: ["string"],
        providerID: "string",
    });
    
    type: defang:Project
    properties:
        configPaths:
            - string
        providerID: string
    

    Project Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Project resource accepts the following input properties:

    ConfigPaths List<string>
    ProviderID string
    ConfigPaths []string
    ProviderID string
    config_paths list(string)
    provider_id string
    configPaths List<String>
    providerID String
    configPaths string[]
    providerID string
    config_paths Sequence[str]
    provider_id str
    configPaths List<String>
    providerID String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

    AlbArn string
    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    Services List<DefangLabs.Defang.V1.Outputs.ServiceInfo>
    AlbArn string
    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    Services ServiceInfo
    alb_arn string
    etag string
    id string
    The provider-assigned unique ID for this managed resource.
    services list(object)
    albArn String
    etag String
    id String
    The provider-assigned unique ID for this managed resource.
    services List<ServiceInfo>
    albArn string
    etag string
    id string
    The provider-assigned unique ID for this managed resource.
    services v1ServiceInfo[]
    alb_arn str
    etag str
    id str
    The provider-assigned unique ID for this managed resource.
    services Sequence[v1.ServiceInfo]
    albArn String
    etag String
    id String
    The provider-assigned unique ID for this managed resource.
    services List<Property Map>

    Look up Existing Project Resource

    Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingProject:    type: defang:Project    get:      id: ${id}
    import {
      to = defang_project.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state ProjectState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Package Details

    Repository
    defang DefangLabs/pulumi-defang
    License
    Apache-2.0
    defang logo defang

    This package is deprecated. It has been split into cloud-specific packages: defang-aws, defang-gcp, and defang-azure.

    Viewing docs for defang v1.0.0
    published on Monday, Mar 24, 2025 by Defang

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial