awx.Team
Explore with Pulumi AI
TBD
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as awx from "@pulumi/awx";
const _default = awx.getOrganization({
name: "Default",
});
const myinv = awx.getInventory({
name: "My Inventory",
});
const myinvAdmins = myinv.then(myinv => awx.getInventoryRole({
name: "Admin",
inventoryId: myinv.id,
}));
const myproj = awx.getProject({
name: "My Project",
});
const myprojAdmins = myproj.then(myproj => awx.getProjectRole({
name: "Admin",
projectId: myproj.id,
}));
const adminsTeam = new awx.Team("adminsTeam", {
organizationId: _default.then(_default => _default.id),
roleEntitlements: [
{
roleId: myinvAdmins.then(myinvAdmins => myinvAdmins.id),
},
{
roleId: myprojAdmins.then(myprojAdmins => myprojAdmins.id),
},
],
});
import pulumi
import pulumi_awx as awx
default = awx.get_organization(name="Default")
myinv = awx.get_inventory(name="My Inventory")
myinv_admins = awx.get_inventory_role(name="Admin",
inventory_id=myinv.id)
myproj = awx.get_project(name="My Project")
myproj_admins = awx.get_project_role(name="Admin",
project_id=myproj.id)
admins_team = awx.Team("adminsTeam",
organization_id=default.id,
role_entitlements=[
{
"role_id": myinv_admins.id,
},
{
"role_id": myproj_admins.id,
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/awx/awx"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := awx.LookupOrganization(ctx, &awx.LookupOrganizationArgs{
Name: pulumi.StringRef("Default"),
}, nil)
if err != nil {
return err
}
myinv, err := awx.LookupInventory(ctx, &awx.LookupInventoryArgs{
Name: pulumi.StringRef("My Inventory"),
}, nil)
if err != nil {
return err
}
myinvAdmins, err := awx.GetInventoryRole(ctx, &awx.GetInventoryRoleArgs{
Name: pulumi.StringRef("Admin"),
InventoryId: myinv.Id,
}, nil)
if err != nil {
return err
}
myproj, err := awx.LookupProject(ctx, &awx.LookupProjectArgs{
Name: pulumi.StringRef("My Project"),
}, nil)
if err != nil {
return err
}
myprojAdmins, err := awx.GetProjectRole(ctx, &awx.GetProjectRoleArgs{
Name: pulumi.StringRef("Admin"),
ProjectId: myproj.Id,
}, nil)
if err != nil {
return err
}
_, err = awx.NewTeam(ctx, "adminsTeam", &awx.TeamArgs{
OrganizationId: pulumi.Float64(_default.Id),
RoleEntitlements: awx.TeamRoleEntitlementArray{
&awx.TeamRoleEntitlementArgs{
RoleId: pulumi.Float64(myinvAdmins.Id),
},
&awx.TeamRoleEntitlementArgs{
RoleId: pulumi.Float64(myprojAdmins.Id),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Awx = Pulumi.Awx;
return await Deployment.RunAsync(() =>
{
var @default = Awx.GetOrganization.Invoke(new()
{
Name = "Default",
});
var myinv = Awx.GetInventory.Invoke(new()
{
Name = "My Inventory",
});
var myinvAdmins = Awx.GetInventoryRole.Invoke(new()
{
Name = "Admin",
InventoryId = myinv.Apply(getInventoryResult => getInventoryResult.Id),
});
var myproj = Awx.GetProject.Invoke(new()
{
Name = "My Project",
});
var myprojAdmins = Awx.GetProjectRole.Invoke(new()
{
Name = "Admin",
ProjectId = myproj.Apply(getProjectResult => getProjectResult.Id),
});
var adminsTeam = new Awx.Team("adminsTeam", new()
{
OrganizationId = @default.Apply(@default => @default.Apply(getOrganizationResult => getOrganizationResult.Id)),
RoleEntitlements = new[]
{
new Awx.Inputs.TeamRoleEntitlementArgs
{
RoleId = myinvAdmins.Apply(getInventoryRoleResult => getInventoryRoleResult.Id),
},
new Awx.Inputs.TeamRoleEntitlementArgs
{
RoleId = myprojAdmins.Apply(getProjectRoleResult => getProjectRoleResult.Id),
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.awx.AwxFunctions;
import com.pulumi.awx.inputs.GetOrganizationArgs;
import com.pulumi.awx.inputs.GetInventoryArgs;
import com.pulumi.awx.inputs.GetInventoryRoleArgs;
import com.pulumi.awx.inputs.GetProjectArgs;
import com.pulumi.awx.inputs.GetProjectRoleArgs;
import com.pulumi.awx.Team;
import com.pulumi.awx.TeamArgs;
import com.pulumi.awx.inputs.TeamRoleEntitlementArgs;
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) {
final var default = AwxFunctions.getOrganization(GetOrganizationArgs.builder()
.name("Default")
.build());
final var myinv = AwxFunctions.getInventory(GetInventoryArgs.builder()
.name("My Inventory")
.build());
final var myinvAdmins = AwxFunctions.getInventoryRole(GetInventoryRoleArgs.builder()
.name("Admin")
.inventoryId(myinv.applyValue(getInventoryResult -> getInventoryResult.id()))
.build());
final var myproj = AwxFunctions.getProject(GetProjectArgs.builder()
.name("My Project")
.build());
final var myprojAdmins = AwxFunctions.getProjectRole(GetProjectRoleArgs.builder()
.name("Admin")
.projectId(myproj.applyValue(getProjectResult -> getProjectResult.id()))
.build());
var adminsTeam = new Team("adminsTeam", TeamArgs.builder()
.organizationId(default_.id())
.roleEntitlements(
TeamRoleEntitlementArgs.builder()
.roleId(myinvAdmins.applyValue(getInventoryRoleResult -> getInventoryRoleResult.id()))
.build(),
TeamRoleEntitlementArgs.builder()
.roleId(myprojAdmins.applyValue(getProjectRoleResult -> getProjectRoleResult.id()))
.build())
.build());
}
}
resources:
adminsTeam:
type: awx:Team
properties:
organizationId: ${default.id}
roleEntitlements:
- roleId: ${myinvAdmins.id}
- roleId: ${myprojAdmins.id}
variables:
default:
fn::invoke:
function: awx:getOrganization
arguments:
name: Default
myinv:
fn::invoke:
function: awx:getInventory
arguments:
name: My Inventory
myinvAdmins:
fn::invoke:
function: awx:getInventoryRole
arguments:
name: Admin
inventoryId: ${myinv.id}
myproj:
fn::invoke:
function: awx:getProject
arguments:
name: My Project
myprojAdmins:
fn::invoke:
function: awx:getProjectRole
arguments:
name: Admin
projectId: ${myproj.id}
Create Team Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Team(name: string, args: TeamArgs, opts?: CustomResourceOptions);
@overload
def Team(resource_name: str,
args: TeamArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Team(resource_name: str,
opts: Optional[ResourceOptions] = None,
organization_id: Optional[float] = None,
description: Optional[str] = None,
name: Optional[str] = None,
role_entitlements: Optional[Sequence[TeamRoleEntitlementArgs]] = None,
team_id: Optional[str] = None,
timeouts: Optional[TeamTimeoutsArgs] = None)
func NewTeam(ctx *Context, name string, args TeamArgs, opts ...ResourceOption) (*Team, error)
public Team(string name, TeamArgs args, CustomResourceOptions? opts = null)
type: awx:Team
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 TeamArgs
- 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 TeamArgs
- 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 TeamArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeamArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeamArgs
- 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 teamResource = new Awx.Team("teamResource", new()
{
OrganizationId = 0,
Description = "string",
Name = "string",
RoleEntitlements = new[]
{
new Awx.Inputs.TeamRoleEntitlementArgs
{
RoleId = 0,
},
},
TeamId = "string",
Timeouts = new Awx.Inputs.TeamTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := awx.NewTeam(ctx, "teamResource", &awx.TeamArgs{
OrganizationId: pulumi.Float64(0),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
RoleEntitlements: awx.TeamRoleEntitlementArray{
&awx.TeamRoleEntitlementArgs{
RoleId: pulumi.Float64(0),
},
},
TeamId: pulumi.String("string"),
Timeouts: &awx.TeamTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var teamResource = new Team("teamResource", TeamArgs.builder()
.organizationId(0)
.description("string")
.name("string")
.roleEntitlements(TeamRoleEntitlementArgs.builder()
.roleId(0)
.build())
.teamId("string")
.timeouts(TeamTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
team_resource = awx.Team("teamResource",
organization_id=0,
description="string",
name="string",
role_entitlements=[{
"role_id": 0,
}],
team_id="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const teamResource = new awx.Team("teamResource", {
organizationId: 0,
description: "string",
name: "string",
roleEntitlements: [{
roleId: 0,
}],
teamId: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: awx:Team
properties:
description: string
name: string
organizationId: 0
roleEntitlements:
- roleId: 0
teamId: string
timeouts:
create: string
delete: string
update: string
Team 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 Team resource accepts the following input properties:
- Organization
Id double - Numeric ID of the team organization
- Description string
- Optional description of this team
- Name string
- Name of this team
- Role
Entitlements List<TeamRole Entitlement> - Set of role IDs for access by this team
- Team
Id string - Timeouts
Team
Timeouts
- Organization
Id float64 - Numeric ID of the team organization
- Description string
- Optional description of this team
- Name string
- Name of this team
- Role
Entitlements []TeamRole Entitlement Args - Set of role IDs for access by this team
- Team
Id string - Timeouts
Team
Timeouts Args
- organization
Id Double - Numeric ID of the team organization
- description String
- Optional description of this team
- name String
- Name of this team
- role
Entitlements List<TeamRole Entitlement> - Set of role IDs for access by this team
- team
Id String - timeouts
Team
Timeouts
- organization
Id number - Numeric ID of the team organization
- description string
- Optional description of this team
- name string
- Name of this team
- role
Entitlements TeamRole Entitlement[] - Set of role IDs for access by this team
- team
Id string - timeouts
Team
Timeouts
- organization_
id float - Numeric ID of the team organization
- description str
- Optional description of this team
- name str
- Name of this team
- role_
entitlements Sequence[TeamRole Entitlement Args] - Set of role IDs for access by this team
- team_
id str - timeouts
Team
Timeouts Args
- organization
Id Number - Numeric ID of the team organization
- description String
- Optional description of this team
- name String
- Name of this team
- role
Entitlements List<Property Map> - Set of role IDs for access by this team
- team
Id String - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Team 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 Team Resource
Get an existing Team 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?: TeamState, opts?: CustomResourceOptions): Team
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
organization_id: Optional[float] = None,
role_entitlements: Optional[Sequence[TeamRoleEntitlementArgs]] = None,
team_id: Optional[str] = None,
timeouts: Optional[TeamTimeoutsArgs] = None) -> Team
func GetTeam(ctx *Context, name string, id IDInput, state *TeamState, opts ...ResourceOption) (*Team, error)
public static Team Get(string name, Input<string> id, TeamState? state, CustomResourceOptions? opts = null)
public static Team get(String name, Output<String> id, TeamState state, CustomResourceOptions options)
resources: _: type: awx:Team 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.
- Description string
- Optional description of this team
- Name string
- Name of this team
- Organization
Id double - Numeric ID of the team organization
- Role
Entitlements List<TeamRole Entitlement> - Set of role IDs for access by this team
- Team
Id string - Timeouts
Team
Timeouts
- Description string
- Optional description of this team
- Name string
- Name of this team
- Organization
Id float64 - Numeric ID of the team organization
- Role
Entitlements []TeamRole Entitlement Args - Set of role IDs for access by this team
- Team
Id string - Timeouts
Team
Timeouts Args
- description String
- Optional description of this team
- name String
- Name of this team
- organization
Id Double - Numeric ID of the team organization
- role
Entitlements List<TeamRole Entitlement> - Set of role IDs for access by this team
- team
Id String - timeouts
Team
Timeouts
- description string
- Optional description of this team
- name string
- Name of this team
- organization
Id number - Numeric ID of the team organization
- role
Entitlements TeamRole Entitlement[] - Set of role IDs for access by this team
- team
Id string - timeouts
Team
Timeouts
- description str
- Optional description of this team
- name str
- Name of this team
- organization_
id float - Numeric ID of the team organization
- role_
entitlements Sequence[TeamRole Entitlement Args] - Set of role IDs for access by this team
- team_
id str - timeouts
Team
Timeouts Args
- description String
- Optional description of this team
- name String
- Name of this team
- organization
Id Number - Numeric ID of the team organization
- role
Entitlements List<Property Map> - Set of role IDs for access by this team
- team
Id String - timeouts Property Map
Supporting Types
TeamRoleEntitlement, TeamRoleEntitlementArgs
- Role
Id double
- Role
Id float64
- role
Id Double
- role
Id number
- role_
id float
- role
Id Number
TeamTimeouts, TeamTimeoutsArgs
Package Details
- Repository
- awx denouche/terraform-provider-awx
- License
- Notes
- This Pulumi package is based on the
awx
Terraform Provider.