sdm.AccountGroup
An AccountGroup is a link between an Account and a Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdm from "@pierskarsenbarg/sdm";
const securityLeadToSecurityTeam = new sdm.AccountGroup("securityLeadToSecurityTeam", {
accountId: sdm_account.security_lead.id,
groupId: sdm_group.security_team.id,
});
const adminUserToAdministrators = new sdm.AccountGroup("adminUserToAdministrators", {
accountId: "a-1234567890abcdef",
groupId: "group-1234567890abcdef",
});
import pulumi
import pierskarsenbarg_pulumi_sdm as sdm
security_lead_to_security_team = sdm.AccountGroup("securityLeadToSecurityTeam",
account_id=sdm_account["security_lead"]["id"],
group_id=sdm_group["security_team"]["id"])
admin_user_to_administrators = sdm.AccountGroup("adminUserToAdministrators",
account_id="a-1234567890abcdef",
group_id="group-1234567890abcdef")
package main
import (
"github.com/pierskarsenbarg/pulumi-sdm/sdk/go/sdm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sdm.NewAccountGroup(ctx, "securityLeadToSecurityTeam", &sdm.AccountGroupArgs{
AccountId: pulumi.Any(sdm_account.Security_lead.Id),
GroupId: pulumi.Any(sdm_group.Security_team.Id),
})
if err != nil {
return err
}
_, err = sdm.NewAccountGroup(ctx, "adminUserToAdministrators", &sdm.AccountGroupArgs{
AccountId: pulumi.String("a-1234567890abcdef"),
GroupId: pulumi.String("group-1234567890abcdef"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sdm = PiersKarsenbarg.Sdm;
return await Deployment.RunAsync(() =>
{
var securityLeadToSecurityTeam = new Sdm.AccountGroup("securityLeadToSecurityTeam", new()
{
AccountId = sdm_account.Security_lead.Id,
GroupId = sdm_group.Security_team.Id,
});
var adminUserToAdministrators = new Sdm.AccountGroup("adminUserToAdministrators", new()
{
AccountId = "a-1234567890abcdef",
GroupId = "group-1234567890abcdef",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdm.AccountGroup;
import com.pulumi.sdm.AccountGroupArgs;
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 securityLeadToSecurityTeam = new AccountGroup("securityLeadToSecurityTeam", AccountGroupArgs.builder()
.accountId(sdm_account.security_lead().id())
.groupId(sdm_group.security_team().id())
.build());
var adminUserToAdministrators = new AccountGroup("adminUserToAdministrators", AccountGroupArgs.builder()
.accountId("a-1234567890abcdef")
.groupId("group-1234567890abcdef")
.build());
}
}
resources:
securityLeadToSecurityTeam:
type: sdm:AccountGroup
properties:
accountId: ${sdm_account.security_lead.id}
groupId: ${sdm_group.security_team.id}
adminUserToAdministrators:
type: sdm:AccountGroup
properties:
accountId: a-1234567890abcdef
groupId: group-1234567890abcdef
This resource can be imported using the import command.
Create AccountGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountGroup(name: string, args: AccountGroupArgs, opts?: CustomResourceOptions);
@overload
def AccountGroup(resource_name: str,
args: AccountGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccountGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
group_id: Optional[str] = None)
func NewAccountGroup(ctx *Context, name string, args AccountGroupArgs, opts ...ResourceOption) (*AccountGroup, error)
public AccountGroup(string name, AccountGroupArgs args, CustomResourceOptions? opts = null)
public AccountGroup(String name, AccountGroupArgs args)
public AccountGroup(String name, AccountGroupArgs args, CustomResourceOptions options)
type: sdm:AccountGroup
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 AccountGroupArgs
- 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 AccountGroupArgs
- 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 AccountGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountGroupArgs
- 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 accountGroupResource = new Sdm.AccountGroup("accountGroupResource", new()
{
AccountId = "string",
GroupId = "string",
});
example, err := sdm.NewAccountGroup(ctx, "accountGroupResource", &sdm.AccountGroupArgs{
AccountId: pulumi.String("string"),
GroupId: pulumi.String("string"),
})
var accountGroupResource = new AccountGroup("accountGroupResource", AccountGroupArgs.builder()
.accountId("string")
.groupId("string")
.build());
account_group_resource = sdm.AccountGroup("accountGroupResource",
account_id="string",
group_id="string")
const accountGroupResource = new sdm.AccountGroup("accountGroupResource", {
accountId: "string",
groupId: "string",
});
type: sdm:AccountGroup
properties:
accountId: string
groupId: string
AccountGroup 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 AccountGroup resource accepts the following input properties:
- account_
id str - Unique identifier of the Account.
- group_
id str - Unique identifier of the Group.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountGroup 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 AccountGroup Resource
Get an existing AccountGroup 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?: AccountGroupState, opts?: CustomResourceOptions): AccountGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
group_id: Optional[str] = None) -> AccountGroup
func GetAccountGroup(ctx *Context, name string, id IDInput, state *AccountGroupState, opts ...ResourceOption) (*AccountGroup, error)
public static AccountGroup Get(string name, Input<string> id, AccountGroupState? state, CustomResourceOptions? opts = null)
public static AccountGroup get(String name, Output<String> id, AccountGroupState state, CustomResourceOptions options)
resources: _: type: sdm:AccountGroup 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.
- account_
id str - Unique identifier of the Account.
- group_
id str - Unique identifier of the Group.
Import
A AccountGroup can be imported using the id, e.g.,
$ pulumi import sdm:index/accountGroup:AccountGroup example accountgroup-12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sdm pierskarsenbarg/pulumi-sdm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sdm
Terraform Provider.