1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. ScopedUserRole
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

octopusdeploy.ScopedUserRole

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

    This resource manages scoped user roles in Octopus Deploy.

    NOTE on Team User Roles and Scoped User Roles: We currently provides both a standalone Scoped User Role resource and a Team resource with user_roles blocks defined in-line. At this time you cannot use a Team with in-line user_roles in conjunction with any Scoped User Role resources. Doing so will cause a conflict of user role settings and will overwrite user roles.

    Create ScopedUserRole Resource

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

    Constructor syntax

    new ScopedUserRole(name: string, args: ScopedUserRoleArgs, opts?: CustomResourceOptions);
    @overload
    def ScopedUserRole(resource_name: str,
                       args: ScopedUserRoleArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScopedUserRole(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       space_id: Optional[str] = None,
                       team_id: Optional[str] = None,
                       user_role_id: Optional[str] = None,
                       environment_ids: Optional[Sequence[str]] = None,
                       project_group_ids: Optional[Sequence[str]] = None,
                       project_ids: Optional[Sequence[str]] = None,
                       scoped_user_role_id: Optional[str] = None,
                       tenant_ids: Optional[Sequence[str]] = None)
    func NewScopedUserRole(ctx *Context, name string, args ScopedUserRoleArgs, opts ...ResourceOption) (*ScopedUserRole, error)
    public ScopedUserRole(string name, ScopedUserRoleArgs args, CustomResourceOptions? opts = null)
    public ScopedUserRole(String name, ScopedUserRoleArgs args)
    public ScopedUserRole(String name, ScopedUserRoleArgs args, CustomResourceOptions options)
    
    type: octopusdeploy:ScopedUserRole
    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 ScopedUserRoleArgs
    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 ScopedUserRoleArgs
    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 ScopedUserRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScopedUserRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScopedUserRoleArgs
    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 scopedUserRoleResource = new Octopusdeploy.ScopedUserRole("scopedUserRoleResource", new()
    {
        SpaceId = "string",
        TeamId = "string",
        UserRoleId = "string",
        EnvironmentIds = new[]
        {
            "string",
        },
        ProjectGroupIds = new[]
        {
            "string",
        },
        ProjectIds = new[]
        {
            "string",
        },
        ScopedUserRoleId = "string",
        TenantIds = new[]
        {
            "string",
        },
    });
    
    example, err := octopusdeploy.NewScopedUserRole(ctx, "scopedUserRoleResource", &octopusdeploy.ScopedUserRoleArgs{
    	SpaceId:    pulumi.String("string"),
    	TeamId:     pulumi.String("string"),
    	UserRoleId: pulumi.String("string"),
    	EnvironmentIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ScopedUserRoleId: pulumi.String("string"),
    	TenantIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var scopedUserRoleResource = new ScopedUserRole("scopedUserRoleResource", ScopedUserRoleArgs.builder()
        .spaceId("string")
        .teamId("string")
        .userRoleId("string")
        .environmentIds("string")
        .projectGroupIds("string")
        .projectIds("string")
        .scopedUserRoleId("string")
        .tenantIds("string")
        .build());
    
    scoped_user_role_resource = octopusdeploy.ScopedUserRole("scopedUserRoleResource",
        space_id="string",
        team_id="string",
        user_role_id="string",
        environment_ids=["string"],
        project_group_ids=["string"],
        project_ids=["string"],
        scoped_user_role_id="string",
        tenant_ids=["string"])
    
    const scopedUserRoleResource = new octopusdeploy.ScopedUserRole("scopedUserRoleResource", {
        spaceId: "string",
        teamId: "string",
        userRoleId: "string",
        environmentIds: ["string"],
        projectGroupIds: ["string"],
        projectIds: ["string"],
        scopedUserRoleId: "string",
        tenantIds: ["string"],
    });
    
    type: octopusdeploy:ScopedUserRole
    properties:
        environmentIds:
            - string
        projectGroupIds:
            - string
        projectIds:
            - string
        scopedUserRoleId: string
        spaceId: string
        teamId: string
        tenantIds:
            - string
        userRoleId: string
    

    ScopedUserRole 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 ScopedUserRole resource accepts the following input properties:

    SpaceId string
    TeamId string
    UserRoleId string
    EnvironmentIds List<string>
    ProjectGroupIds List<string>
    ProjectIds List<string>
    ScopedUserRoleId string
    The unique ID for this resource.
    TenantIds List<string>
    SpaceId string
    TeamId string
    UserRoleId string
    EnvironmentIds []string
    ProjectGroupIds []string
    ProjectIds []string
    ScopedUserRoleId string
    The unique ID for this resource.
    TenantIds []string
    spaceId String
    teamId String
    userRoleId String
    environmentIds List<String>
    projectGroupIds List<String>
    projectIds List<String>
    scopedUserRoleId String
    The unique ID for this resource.
    tenantIds List<String>
    spaceId string
    teamId string
    userRoleId string
    environmentIds string[]
    projectGroupIds string[]
    projectIds string[]
    scopedUserRoleId string
    The unique ID for this resource.
    tenantIds string[]
    space_id str
    team_id str
    user_role_id str
    environment_ids Sequence[str]
    project_group_ids Sequence[str]
    project_ids Sequence[str]
    scoped_user_role_id str
    The unique ID for this resource.
    tenant_ids Sequence[str]
    spaceId String
    teamId String
    userRoleId String
    environmentIds List<String>
    projectGroupIds List<String>
    projectIds List<String>
    scopedUserRoleId String
    The unique ID for this resource.
    tenantIds List<String>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScopedUserRole 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 ScopedUserRole Resource

    Get an existing ScopedUserRole 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?: ScopedUserRoleState, opts?: CustomResourceOptions): ScopedUserRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            environment_ids: Optional[Sequence[str]] = None,
            project_group_ids: Optional[Sequence[str]] = None,
            project_ids: Optional[Sequence[str]] = None,
            scoped_user_role_id: Optional[str] = None,
            space_id: Optional[str] = None,
            team_id: Optional[str] = None,
            tenant_ids: Optional[Sequence[str]] = None,
            user_role_id: Optional[str] = None) -> ScopedUserRole
    func GetScopedUserRole(ctx *Context, name string, id IDInput, state *ScopedUserRoleState, opts ...ResourceOption) (*ScopedUserRole, error)
    public static ScopedUserRole Get(string name, Input<string> id, ScopedUserRoleState? state, CustomResourceOptions? opts = null)
    public static ScopedUserRole get(String name, Output<String> id, ScopedUserRoleState state, CustomResourceOptions options)
    resources:  _:    type: octopusdeploy:ScopedUserRole    get:      id: ${id}
    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:
    EnvironmentIds List<string>
    ProjectGroupIds List<string>
    ProjectIds List<string>
    ScopedUserRoleId string
    The unique ID for this resource.
    SpaceId string
    TeamId string
    TenantIds List<string>
    UserRoleId string
    EnvironmentIds []string
    ProjectGroupIds []string
    ProjectIds []string
    ScopedUserRoleId string
    The unique ID for this resource.
    SpaceId string
    TeamId string
    TenantIds []string
    UserRoleId string
    environmentIds List<String>
    projectGroupIds List<String>
    projectIds List<String>
    scopedUserRoleId String
    The unique ID for this resource.
    spaceId String
    teamId String
    tenantIds List<String>
    userRoleId String
    environmentIds string[]
    projectGroupIds string[]
    projectIds string[]
    scopedUserRoleId string
    The unique ID for this resource.
    spaceId string
    teamId string
    tenantIds string[]
    userRoleId string
    environment_ids Sequence[str]
    project_group_ids Sequence[str]
    project_ids Sequence[str]
    scoped_user_role_id str
    The unique ID for this resource.
    space_id str
    team_id str
    tenant_ids Sequence[str]
    user_role_id str
    environmentIds List<String>
    projectGroupIds List<String>
    projectIds List<String>
    scopedUserRoleId String
    The unique ID for this resource.
    spaceId String
    teamId String
    tenantIds List<String>
    userRoleId String

    Package Details

    Repository
    octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
    License
    Notes
    This Pulumi package is based on the octopusdeploy Terraform Provider.
    octopusdeploy logo
    octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs