Project
Provides a Rancher v2 Project resource. This can be used to create projects for Rancher v2 environments and retrieve their information.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
// Create a new rancher2 Project
var foo = new Rancher2.Project("foo", new Rancher2.ProjectArgs
{
ClusterId = "<CLUSTER_ID>",
ContainerResourceLimit = new Rancher2.Inputs.ProjectContainerResourceLimitArgs
{
LimitsCpu = "20m",
LimitsMemory = "20Mi",
RequestsCpu = "1m",
RequestsMemory = "1Mi",
},
ResourceQuota = new Rancher2.Inputs.ProjectResourceQuotaArgs
{
NamespaceDefaultLimit = new Rancher2.Inputs.ProjectResourceQuotaNamespaceDefaultLimitArgs
{
LimitsCpu = "2000m",
LimitsMemory = "500Mi",
RequestsStorage = "1Gi",
},
ProjectLimit = new Rancher2.Inputs.ProjectResourceQuotaProjectLimitArgs
{
LimitsCpu = "2000m",
LimitsMemory = "2000Mi",
RequestsStorage = "2Gi",
},
},
});
}
}
Coming soon!
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 Project
foo = rancher2.Project("foo",
cluster_id="<CLUSTER_ID>",
container_resource_limit={
"limitsCpu": "20m",
"limitsMemory": "20Mi",
"requestsCpu": "1m",
"requestsMemory": "1Mi",
},
resource_quota={
"namespaceDefaultLimit": {
"limitsCpu": "2000m",
"limitsMemory": "500Mi",
"requestsStorage": "1Gi",
},
"projectLimit": {
"limitsCpu": "2000m",
"limitsMemory": "2000Mi",
"requestsStorage": "2Gi",
},
})import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 Project
const foo = new rancher2.Project("foo", {
clusterId: "<CLUSTER_ID>",
containerResourceLimit: {
limitsCpu: "20m",
limitsMemory: "20Mi",
requestsCpu: "1m",
requestsMemory: "1Mi",
},
resourceQuota: {
namespaceDefaultLimit: {
limitsCpu: "2000m",
limitsMemory: "500Mi",
requestsStorage: "1Gi",
},
projectLimit: {
limitsCpu: "2000m",
limitsMemory: "2000Mi",
requestsStorage: "2Gi",
},
},
});Create a Project Resource
new Project(name: string, args: ProjectArgs, opts?: CustomResourceOptions);def Project(resource_name, opts=None, annotations=None, cluster_id=None, container_resource_limit=None, description=None, enable_project_monitoring=None, labels=None, name=None, pod_security_policy_template_id=None, project_monitoring_input=None, resource_quota=None, wait_for_cluster=None, __props__=None);func NewProject(ctx *Context, name string, args ProjectArgs, opts ...ResourceOption) (*Project, error)public Project(string name, ProjectArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Project Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Project resource accepts the following input properties:
- Cluster
Id string The cluster id where create project (string)
- Annotations Dictionary<string, object>
Annotations for Node Pool object (map)
- Container
Resource ProjectLimit Container Resource Limit Args Default containers resource limits on project (List maxitem:1)
- Description string
A project description (string)
- Enable
Project boolMonitoring Enable built-in project monitoring. Default
false(bool)- Labels Dictionary<string, object>
Labels for Node Pool object (map)
- Name string
The name of the project (string)
- Pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- Project
Monitoring ProjectInput Project Monitoring Input Args Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- Resource
Quota ProjectResource Quota Args Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- Wait
For boolCluster Wait for cluster becomes active. Default
false(bool)
- Cluster
Id string The cluster id where create project (string)
- Annotations map[string]interface{}
Annotations for Node Pool object (map)
- Container
Resource ProjectLimit Container Resource Limit Default containers resource limits on project (List maxitem:1)
- Description string
A project description (string)
- Enable
Project boolMonitoring Enable built-in project monitoring. Default
false(bool)- Labels map[string]interface{}
Labels for Node Pool object (map)
- Name string
The name of the project (string)
- Pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- Project
Monitoring ProjectInput Project Monitoring Input Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- Resource
Quota ProjectResource Quota Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- Wait
For boolCluster Wait for cluster becomes active. Default
false(bool)
- cluster
Id string The cluster id where create project (string)
- annotations {[key: string]: any}
Annotations for Node Pool object (map)
- container
Resource ProjectLimit Container Resource Limit Default containers resource limits on project (List maxitem:1)
- description string
A project description (string)
- enable
Project booleanMonitoring Enable built-in project monitoring. Default
false(bool)- labels {[key: string]: any}
Labels for Node Pool object (map)
- name string
The name of the project (string)
- pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- project
Monitoring ProjectInput Project Monitoring Input Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- resource
Quota ProjectResource Quota Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- wait
For booleanCluster Wait for cluster becomes active. Default
false(bool)
- cluster_
id str The cluster id where create project (string)
- annotations Dict[str, Any]
Annotations for Node Pool object (map)
- container_
resource_ Dict[Projectlimit Container Resource Limit] Default containers resource limits on project (List maxitem:1)
- description str
A project description (string)
- enable_
project_ boolmonitoring Enable built-in project monitoring. Default
false(bool)- labels Dict[str, Any]
Labels for Node Pool object (map)
- name str
The name of the project (string)
- pod_
security_ strpolicy_ template_ id Default Pod Security Policy ID for the project (string)
- project_
monitoring_ Dict[Projectinput Project Monitoring Input] Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- resource_
quota Dict[ProjectResource Quota] Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- wait_
for_ boolcluster Wait for cluster becomes active. Default
false(bool)
Outputs
All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:
Look up an 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): Projectstatic get(resource_name, id, opts=None, annotations=None, cluster_id=None, container_resource_limit=None, description=None, enable_project_monitoring=None, labels=None, name=None, pod_security_policy_template_id=None, project_monitoring_input=None, resource_quota=None, wait_for_cluster=None, __props__=None);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)- 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.
The following state arguments are supported:
- Annotations Dictionary<string, object>
Annotations for Node Pool object (map)
- Cluster
Id string The cluster id where create project (string)
- Container
Resource ProjectLimit Container Resource Limit Args Default containers resource limits on project (List maxitem:1)
- Description string
A project description (string)
- Enable
Project boolMonitoring Enable built-in project monitoring. Default
false(bool)- Labels Dictionary<string, object>
Labels for Node Pool object (map)
- Name string
The name of the project (string)
- Pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- Project
Monitoring ProjectInput Project Monitoring Input Args Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- Resource
Quota ProjectResource Quota Args Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- Wait
For boolCluster Wait for cluster becomes active. Default
false(bool)
- Annotations map[string]interface{}
Annotations for Node Pool object (map)
- Cluster
Id string The cluster id where create project (string)
- Container
Resource ProjectLimit Container Resource Limit Default containers resource limits on project (List maxitem:1)
- Description string
A project description (string)
- Enable
Project boolMonitoring Enable built-in project monitoring. Default
false(bool)- Labels map[string]interface{}
Labels for Node Pool object (map)
- Name string
The name of the project (string)
- Pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- Project
Monitoring ProjectInput Project Monitoring Input Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- Resource
Quota ProjectResource Quota Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- Wait
For boolCluster Wait for cluster becomes active. Default
false(bool)
- annotations {[key: string]: any}
Annotations for Node Pool object (map)
- cluster
Id string The cluster id where create project (string)
- container
Resource ProjectLimit Container Resource Limit Default containers resource limits on project (List maxitem:1)
- description string
A project description (string)
- enable
Project booleanMonitoring Enable built-in project monitoring. Default
false(bool)- labels {[key: string]: any}
Labels for Node Pool object (map)
- name string
The name of the project (string)
- pod
Security stringPolicy Template Id Default Pod Security Policy ID for the project (string)
- project
Monitoring ProjectInput Project Monitoring Input Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- resource
Quota ProjectResource Quota Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- wait
For booleanCluster Wait for cluster becomes active. Default
false(bool)
- annotations Dict[str, Any]
Annotations for Node Pool object (map)
- cluster_
id str The cluster id where create project (string)
- container_
resource_ Dict[Projectlimit Container Resource Limit] Default containers resource limits on project (List maxitem:1)
- description str
A project description (string)
- enable_
project_ boolmonitoring Enable built-in project monitoring. Default
false(bool)- labels Dict[str, Any]
Labels for Node Pool object (map)
- name str
The name of the project (string)
- pod_
security_ strpolicy_ template_ id Default Pod Security Policy ID for the project (string)
- project_
monitoring_ Dict[Projectinput Project Monitoring Input] Project monitoring config. Any parameter defined in rancher-monitoring charts could be configured (list maxitems:1)
- resource_
quota Dict[ProjectResource Quota] Resource quota for project. Rancher v2.1.x or higher (list maxitems:1)
- wait_
for_ boolcluster Wait for cluster becomes active. Default
false(bool)
Supporting Types
ProjectContainerResourceLimit
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- limits
Cpu string Limit for limits cpu in project (string)
- limits
Memory string Limit for limits memory in project (string)
- requests
Cpu string Limit for requests cpu in project (string)
- requests
Memory string Limit for requests memory in project (string)
- limits
Cpu str Limit for limits cpu in project (string)
- limits
Memory str Limit for limits memory in project (string)
- requests
Cpu str Limit for requests cpu in project (string)
- requests
Memory str Limit for requests memory in project (string)
ProjectProjectMonitoringInput
ProjectResourceQuota
- Namespace
Default ProjectLimit Resource Quota Namespace Default Limit Args Default resource quota limit for namespaces in project (list maxitems:1)
- Project
Limit ProjectResource Quota Project Limit Args Resource quota limit for project (list maxitems:1)
- Namespace
Default ProjectLimit Resource Quota Namespace Default Limit Default resource quota limit for namespaces in project (list maxitems:1)
- Project
Limit ProjectResource Quota Project Limit Resource quota limit for project (list maxitems:1)
- namespace
Default ProjectLimit Resource Quota Namespace Default Limit Default resource quota limit for namespaces in project (list maxitems:1)
- project
Limit ProjectResource Quota Project Limit Resource quota limit for project (list maxitems:1)
- namespace
Default Dict[ProjectLimit Resource Quota Namespace Default Limit] Default resource quota limit for namespaces in project (list maxitems:1)
- project
Limit Dict[ProjectResource Quota Project Limit] Resource quota limit for project (list maxitems:1)
ProjectResourceQuotaNamespaceDefaultLimit
- Config
Maps string Limit for config maps in project (string)
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- Pods string
Limit for pods in project (string)
- Replication
Controllers string Limit for replication controllers in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- Requests
Storage string Limit for requests storage in project (string)
- Secrets string
Limit for secrets in project (string)
- Services string
- Services
Load stringBalancers Limit for services load balancers in project (string)
- Services
Node stringPorts Limit for services node ports in project (string)
- Config
Maps string Limit for config maps in project (string)
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- Pods string
Limit for pods in project (string)
- Replication
Controllers string Limit for replication controllers in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- Requests
Storage string Limit for requests storage in project (string)
- Secrets string
Limit for secrets in project (string)
- Services string
- Services
Load stringBalancers Limit for services load balancers in project (string)
- Services
Node stringPorts Limit for services node ports in project (string)
- config
Maps string Limit for config maps in project (string)
- limits
Cpu string Limit for limits cpu in project (string)
- limits
Memory string Limit for limits memory in project (string)
- persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- pods string
Limit for pods in project (string)
- replication
Controllers string Limit for replication controllers in project (string)
- requests
Cpu string Limit for requests cpu in project (string)
- requests
Memory string Limit for requests memory in project (string)
- requests
Storage string Limit for requests storage in project (string)
- secrets string
Limit for secrets in project (string)
- services string
- services
Load stringBalancers Limit for services load balancers in project (string)
- services
Node stringPorts Limit for services node ports in project (string)
- config
Maps str Limit for config maps in project (string)
- limits
Cpu str Limit for limits cpu in project (string)
- limits
Memory str Limit for limits memory in project (string)
- persistent
Volume strClaims Limit for persistent volume claims in project (string)
- pods str
Limit for pods in project (string)
- replication
Controllers str Limit for replication controllers in project (string)
- requests
Cpu str Limit for requests cpu in project (string)
- requests
Memory str Limit for requests memory in project (string)
- requests
Storage str Limit for requests storage in project (string)
- secrets str
Limit for secrets in project (string)
- services str
- services
Load strBalancers Limit for services load balancers in project (string)
- services
Node strPorts Limit for services node ports in project (string)
ProjectResourceQuotaProjectLimit
- Config
Maps string Limit for config maps in project (string)
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- Pods string
Limit for pods in project (string)
- Replication
Controllers string Limit for replication controllers in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- Requests
Storage string Limit for requests storage in project (string)
- Secrets string
Limit for secrets in project (string)
- Services string
- Services
Load stringBalancers Limit for services load balancers in project (string)
- Services
Node stringPorts Limit for services node ports in project (string)
- Config
Maps string Limit for config maps in project (string)
- Limits
Cpu string Limit for limits cpu in project (string)
- Limits
Memory string Limit for limits memory in project (string)
- Persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- Pods string
Limit for pods in project (string)
- Replication
Controllers string Limit for replication controllers in project (string)
- Requests
Cpu string Limit for requests cpu in project (string)
- Requests
Memory string Limit for requests memory in project (string)
- Requests
Storage string Limit for requests storage in project (string)
- Secrets string
Limit for secrets in project (string)
- Services string
- Services
Load stringBalancers Limit for services load balancers in project (string)
- Services
Node stringPorts Limit for services node ports in project (string)
- config
Maps string Limit for config maps in project (string)
- limits
Cpu string Limit for limits cpu in project (string)
- limits
Memory string Limit for limits memory in project (string)
- persistent
Volume stringClaims Limit for persistent volume claims in project (string)
- pods string
Limit for pods in project (string)
- replication
Controllers string Limit for replication controllers in project (string)
- requests
Cpu string Limit for requests cpu in project (string)
- requests
Memory string Limit for requests memory in project (string)
- requests
Storage string Limit for requests storage in project (string)
- secrets string
Limit for secrets in project (string)
- services string
- services
Load stringBalancers Limit for services load balancers in project (string)
- services
Node stringPorts Limit for services node ports in project (string)
- config
Maps str Limit for config maps in project (string)
- limits
Cpu str Limit for limits cpu in project (string)
- limits
Memory str Limit for limits memory in project (string)
- persistent
Volume strClaims Limit for persistent volume claims in project (string)
- pods str
Limit for pods in project (string)
- replication
Controllers str Limit for replication controllers in project (string)
- requests
Cpu str Limit for requests cpu in project (string)
- requests
Memory str Limit for requests memory in project (string)
- requests
Storage str Limit for requests storage in project (string)
- secrets str
Limit for secrets in project (string)
- services str
- services
Load strBalancers Limit for services load balancers in project (string)
- services
Node strPorts Limit for services node ports in project (string)
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2Terraform Provider.