harbor.ProjectMemberUser
Explore with Pulumi AI
Example Usage
resource "harbor_project" "main" {
name = "main"
}
resource "harbor_project_member_user" "main" {
project_id = harbor_project.main.id
user_name = "testing1"
role = "projectadmin"
}
Create ProjectMemberUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectMemberUser(name: string, args: ProjectMemberUserArgs, opts?: CustomResourceOptions);
@overload
def ProjectMemberUser(resource_name: str,
args: ProjectMemberUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectMemberUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
role: Optional[str] = None,
user_name: Optional[str] = None)
func NewProjectMemberUser(ctx *Context, name string, args ProjectMemberUserArgs, opts ...ResourceOption) (*ProjectMemberUser, error)
public ProjectMemberUser(string name, ProjectMemberUserArgs args, CustomResourceOptions? opts = null)
public ProjectMemberUser(String name, ProjectMemberUserArgs args)
public ProjectMemberUser(String name, ProjectMemberUserArgs args, CustomResourceOptions options)
type: harbor:ProjectMemberUser
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 ProjectMemberUserArgs
- 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 ProjectMemberUserArgs
- 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 ProjectMemberUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectMemberUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectMemberUserArgs
- 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 projectMemberUserResource = new Harbor.ProjectMemberUser("projectMemberUserResource", new()
{
ProjectId = "string",
Role = "string",
UserName = "string",
});
example, err := harbor.NewProjectMemberUser(ctx, "projectMemberUserResource", &harbor.ProjectMemberUserArgs{
ProjectId: pulumi.String("string"),
Role: pulumi.String("string"),
UserName: pulumi.String("string"),
})
var projectMemberUserResource = new ProjectMemberUser("projectMemberUserResource", ProjectMemberUserArgs.builder()
.projectId("string")
.role("string")
.userName("string")
.build());
project_member_user_resource = harbor.ProjectMemberUser("projectMemberUserResource",
project_id="string",
role="string",
user_name="string")
const projectMemberUserResource = new harbor.ProjectMemberUser("projectMemberUserResource", {
projectId: "string",
role: "string",
userName: "string",
});
type: harbor:ProjectMemberUser
properties:
projectId: string
role: string
userName: string
ProjectMemberUser 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 ProjectMemberUser resource accepts the following input properties:
- project_
id str - The project id of the project that the entity will have access to.
- role str
- The permissions that the entity will be granted.
- user_
name str - The name of the member entity.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectMemberUser resource produces the following output properties:
Look up Existing ProjectMemberUser Resource
Get an existing ProjectMemberUser 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?: ProjectMemberUserState, opts?: CustomResourceOptions): ProjectMemberUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
member_id: Optional[int] = None,
project_id: Optional[str] = None,
role: Optional[str] = None,
user_name: Optional[str] = None) -> ProjectMemberUser
func GetProjectMemberUser(ctx *Context, name string, id IDInput, state *ProjectMemberUserState, opts ...ResourceOption) (*ProjectMemberUser, error)
public static ProjectMemberUser Get(string name, Input<string> id, ProjectMemberUserState? state, CustomResourceOptions? opts = null)
public static ProjectMemberUser get(String name, Output<String> id, ProjectMemberUserState 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.
- member_
id int - The member id of the member.
- project_
id str - The project id of the project that the entity will have access to.
- role str
- The permissions that the entity will be granted.
- user_
name str - The name of the member entity.
Import
$ pulumi import harbor:index/projectMemberUser:ProjectMemberUser main /projects/10/members/200
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harbor pulumiverse/pulumi-harbor
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harbor
Terraform Provider.