1. Packages
  2. OpenStack
  3. API Docs
  4. identity
  5. Project
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.identity.Project

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Manages a V3 Project resource within OpenStack Keystone.

    Note: You must have admin privileges in your OpenStack cloud to use this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const project1 = new openstack.identity.Project("project_1", {
        name: "project_1",
        description: "A project",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    project1 = openstack.identity.Project("project_1",
        name="project_1",
        description="A project")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.NewProject(ctx, "project_1", &identity.ProjectArgs{
    			Name:        pulumi.String("project_1"),
    			Description: pulumi.String("A project"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var project1 = new OpenStack.Identity.Project("project_1", new()
        {
            Name = "project_1",
            Description = "A project",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.identity.Project;
    import com.pulumi.openstack.identity.ProjectArgs;
    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 project1 = new Project("project1", ProjectArgs.builder()        
                .name("project_1")
                .description("A project")
                .build());
    
        }
    }
    
    resources:
      project1:
        type: openstack:identity:Project
        name: project_1
        properties:
          name: project_1
          description: A project
    

    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: Optional[ProjectArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                domain_id: Optional[str] = None,
                enabled: Optional[bool] = None,
                is_domain: Optional[bool] = None,
                name: Optional[str] = None,
                parent_id: Optional[str] = None,
                region: Optional[str] = None,
                tags: Optional[Sequence[str]] = None)
    func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: openstack:identity:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    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 OpenStack.Identity.Project("projectResource", new()
    {
        Description = "string",
        DomainId = "string",
        Enabled = false,
        IsDomain = false,
        Name = "string",
        ParentId = "string",
        Region = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := identity.NewProject(ctx, "projectResource", &identity.ProjectArgs{
    	Description: pulumi.String("string"),
    	DomainId:    pulumi.String("string"),
    	Enabled:     pulumi.Bool(false),
    	IsDomain:    pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	ParentId:    pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .description("string")
        .domainId("string")
        .enabled(false)
        .isDomain(false)
        .name("string")
        .parentId("string")
        .region("string")
        .tags("string")
        .build());
    
    project_resource = openstack.identity.Project("projectResource",
        description="string",
        domain_id="string",
        enabled=False,
        is_domain=False,
        name="string",
        parent_id="string",
        region="string",
        tags=["string"])
    
    const projectResource = new openstack.identity.Project("projectResource", {
        description: "string",
        domainId: "string",
        enabled: false,
        isDomain: false,
        name: "string",
        parentId: "string",
        region: "string",
        tags: ["string"],
    });
    
    type: openstack:identity:Project
    properties:
        description: string
        domainId: string
        enabled: false
        isDomain: false
        name: string
        parentId: string
        region: string
        tags:
            - 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

    The Project resource accepts the following input properties:

    Description string
    A description of the project.
    DomainId string
    The domain this project belongs to.
    Enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    IsDomain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    Name string
    The name of the project.
    ParentId string
    The parent of this project. Changing this creates a new project.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    Tags List<string>
    Tags for the project. Changing this updates the existing project.
    Description string
    A description of the project.
    DomainId string
    The domain this project belongs to.
    Enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    IsDomain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    Name string
    The name of the project.
    ParentId string
    The parent of this project. Changing this creates a new project.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    Tags []string
    Tags for the project. Changing this updates the existing project.
    description String
    A description of the project.
    domainId String
    The domain this project belongs to.
    enabled Boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain Boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name String
    The name of the project.
    parentId String
    The parent of this project. Changing this creates a new project.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags List<String>
    Tags for the project. Changing this updates the existing project.
    description string
    A description of the project.
    domainId string
    The domain this project belongs to.
    enabled boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name string
    The name of the project.
    parentId string
    The parent of this project. Changing this creates a new project.
    region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags string[]
    Tags for the project. Changing this updates the existing project.
    description str
    A description of the project.
    domain_id str
    The domain this project belongs to.
    enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    is_domain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name str
    The name of the project.
    parent_id str
    The parent of this project. Changing this creates a new project.
    region str
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags Sequence[str]
    Tags for the project. Changing this updates the existing project.
    description String
    A description of the project.
    domainId String
    The domain this project belongs to.
    enabled Boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain Boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name String
    The name of the project.
    parentId String
    The parent of this project. Changing this creates a new project.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags List<String>
    Tags for the project. Changing this updates the existing project.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    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>, state?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            domain_id: Optional[str] = None,
            enabled: Optional[bool] = None,
            is_domain: Optional[bool] = None,
            name: Optional[str] = None,
            parent_id: Optional[str] = None,
            region: Optional[str] = None,
            tags: Optional[Sequence[str]] = 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, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    A description of the project.
    DomainId string
    The domain this project belongs to.
    Enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    IsDomain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    Name string
    The name of the project.
    ParentId string
    The parent of this project. Changing this creates a new project.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    Tags List<string>
    Tags for the project. Changing this updates the existing project.
    Description string
    A description of the project.
    DomainId string
    The domain this project belongs to.
    Enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    IsDomain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    Name string
    The name of the project.
    ParentId string
    The parent of this project. Changing this creates a new project.
    Region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    Tags []string
    Tags for the project. Changing this updates the existing project.
    description String
    A description of the project.
    domainId String
    The domain this project belongs to.
    enabled Boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain Boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name String
    The name of the project.
    parentId String
    The parent of this project. Changing this creates a new project.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags List<String>
    Tags for the project. Changing this updates the existing project.
    description string
    A description of the project.
    domainId string
    The domain this project belongs to.
    enabled boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name string
    The name of the project.
    parentId string
    The parent of this project. Changing this creates a new project.
    region string
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags string[]
    Tags for the project. Changing this updates the existing project.
    description str
    A description of the project.
    domain_id str
    The domain this project belongs to.
    enabled bool
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    is_domain bool
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name str
    The name of the project.
    parent_id str
    The parent of this project. Changing this creates a new project.
    region str
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags Sequence[str]
    Tags for the project. Changing this updates the existing project.
    description String
    A description of the project.
    domainId String
    The domain this project belongs to.
    enabled Boolean
    Whether the project is enabled or disabled. Valid values are true and false. Default is true.
    isDomain Boolean
    Whether this project is a domain. Valid values are true and false. Default is false. Changing this creates a new project/domain.
    name String
    The name of the project.
    parentId String
    The parent of this project. Changing this creates a new project.
    region String
    The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used. Changing this creates a new project.
    tags List<String>
    Tags for the project. Changing this updates the existing project.

    Import

    Projects can be imported using the id, e.g.

    $ pulumi import openstack:identity/project:Project project_1 89c60255-9bd6-460c-822a-e2b959ede9d2
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi