1. Packages
  2. Juju Provider
  3. API Docs
  4. JaasAccessGroup
juju 0.19.0-rc1 published on Tuesday, Apr 22, 2025 by juju

juju.JaasAccessGroup

Explore with Pulumi AI

A resource that represents access to a group when using JAAS.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as juju from "@pulumi/juju";

const development = new juju.JaasAccessGroup("development", {
    groupId: juju_jaas_group["target-group"].uuid,
    access: "member",
    users: ["foo@domain.com"],
    groups: [juju_jaas_group.development.uuid],
    serviceAccounts: [
        "Client-ID-1",
        "Client-ID-2",
    ],
});
Copy
import pulumi
import pulumi_juju as juju

development = juju.JaasAccessGroup("development",
    group_id=juju_jaas_group["target-group"]["uuid"],
    access="member",
    users=["foo@domain.com"],
    groups=[juju_jaas_group["development"]["uuid"]],
    service_accounts=[
        "Client-ID-1",
        "Client-ID-2",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/juju/juju"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := juju.NewJaasAccessGroup(ctx, "development", &juju.JaasAccessGroupArgs{
			GroupId: pulumi.Any(juju_jaas_group.TargetGroup.Uuid),
			Access:  pulumi.String("member"),
			Users: pulumi.StringArray{
				pulumi.String("foo@domain.com"),
			},
			Groups: pulumi.StringArray{
				juju_jaas_group.Development.Uuid,
			},
			ServiceAccounts: pulumi.StringArray{
				pulumi.String("Client-ID-1"),
				pulumi.String("Client-ID-2"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Juju = Pulumi.Juju;

return await Deployment.RunAsync(() => 
{
    var development = new Juju.JaasAccessGroup("development", new()
    {
        GroupId = juju_jaas_group.Target_group.Uuid,
        Access = "member",
        Users = new[]
        {
            "foo@domain.com",
        },
        Groups = new[]
        {
            juju_jaas_group.Development.Uuid,
        },
        ServiceAccounts = new[]
        {
            "Client-ID-1",
            "Client-ID-2",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.juju.JaasAccessGroup;
import com.pulumi.juju.JaasAccessGroupArgs;
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 development = new JaasAccessGroup("development", JaasAccessGroupArgs.builder()
            .groupId(juju_jaas_group.target-group().uuid())
            .access("member")
            .users("foo@domain.com")
            .groups(juju_jaas_group.development().uuid())
            .serviceAccounts(            
                "Client-ID-1",
                "Client-ID-2")
            .build());

    }
}
Copy
resources:
  development:
    type: juju:JaasAccessGroup
    properties:
      groupId: ${juju_jaas_group"target-group"[%!s(MISSING)].uuid}
      access: member
      users:
        - foo@domain.com
      groups:
        - ${juju_jaas_group.development.uuid}
      serviceAccounts:
        - Client-ID-1
        - Client-ID-2
Copy

Create JaasAccessGroup Resource

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

Constructor syntax

new JaasAccessGroup(name: string, args: JaasAccessGroupArgs, opts?: CustomResourceOptions);
@overload
def JaasAccessGroup(resource_name: str,
                    args: JaasAccessGroupArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def JaasAccessGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    access: Optional[str] = None,
                    group_id: Optional[str] = None,
                    groups: Optional[Sequence[str]] = None,
                    service_accounts: Optional[Sequence[str]] = None,
                    users: Optional[Sequence[str]] = None)
func NewJaasAccessGroup(ctx *Context, name string, args JaasAccessGroupArgs, opts ...ResourceOption) (*JaasAccessGroup, error)
public JaasAccessGroup(string name, JaasAccessGroupArgs args, CustomResourceOptions? opts = null)
public JaasAccessGroup(String name, JaasAccessGroupArgs args)
public JaasAccessGroup(String name, JaasAccessGroupArgs args, CustomResourceOptions options)
type: juju:JaasAccessGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. JaasAccessGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. JaasAccessGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. JaasAccessGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. JaasAccessGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. JaasAccessGroupArgs
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 jaasAccessGroupResource = new Juju.JaasAccessGroup("jaasAccessGroupResource", new()
{
    Access = "string",
    GroupId = "string",
    Groups = new[]
    {
        "string",
    },
    ServiceAccounts = new[]
    {
        "string",
    },
    Users = new[]
    {
        "string",
    },
});
Copy
example, err := juju.NewJaasAccessGroup(ctx, "jaasAccessGroupResource", &juju.JaasAccessGroupArgs{
	Access:  pulumi.String("string"),
	GroupId: pulumi.String("string"),
	Groups: pulumi.StringArray{
		pulumi.String("string"),
	},
	ServiceAccounts: pulumi.StringArray{
		pulumi.String("string"),
	},
	Users: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var jaasAccessGroupResource = new JaasAccessGroup("jaasAccessGroupResource", JaasAccessGroupArgs.builder()
    .access("string")
    .groupId("string")
    .groups("string")
    .serviceAccounts("string")
    .users("string")
    .build());
Copy
jaas_access_group_resource = juju.JaasAccessGroup("jaasAccessGroupResource",
    access="string",
    group_id="string",
    groups=["string"],
    service_accounts=["string"],
    users=["string"])
Copy
const jaasAccessGroupResource = new juju.JaasAccessGroup("jaasAccessGroupResource", {
    access: "string",
    groupId: "string",
    groups: ["string"],
    serviceAccounts: ["string"],
    users: ["string"],
});
Copy
type: juju:JaasAccessGroup
properties:
    access: string
    groupId: string
    groups:
        - string
    serviceAccounts:
        - string
    users:
        - string
Copy

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

Access This property is required. string
GroupId This property is required. string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
Groups List<string>
List of groups to grant access. A valid group ID is the group's UUID.
ServiceAccounts List<string>
List of service accounts to grant access. A valid service account is the service account's name.
Users List<string>
List of users to grant access. A valid user is the user's name or email.
Access This property is required. string
GroupId This property is required. string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
Groups []string
List of groups to grant access. A valid group ID is the group's UUID.
ServiceAccounts []string
List of service accounts to grant access. A valid service account is the service account's name.
Users []string
List of users to grant access. A valid user is the user's name or email.
access This property is required. String
groupId This property is required. String
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups List<String>
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts List<String>
List of service accounts to grant access. A valid service account is the service account's name.
users List<String>
List of users to grant access. A valid user is the user's name or email.
access This property is required. string
groupId This property is required. string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups string[]
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts string[]
List of service accounts to grant access. A valid service account is the service account's name.
users string[]
List of users to grant access. A valid user is the user's name or email.
access This property is required. str
group_id This property is required. str
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups Sequence[str]
List of groups to grant access. A valid group ID is the group's UUID.
service_accounts Sequence[str]
List of service accounts to grant access. A valid service account is the service account's name.
users Sequence[str]
List of users to grant access. A valid user is the user's name or email.
access This property is required. String
groupId This property is required. String
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups List<String>
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts List<String>
List of service accounts to grant access. A valid service account is the service account's name.
users List<String>
List of users to grant access. A valid user is the user's name or email.

Outputs

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

Get an existing JaasAccessGroup 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?: JaasAccessGroupState, opts?: CustomResourceOptions): JaasAccessGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access: Optional[str] = None,
        group_id: Optional[str] = None,
        groups: Optional[Sequence[str]] = None,
        service_accounts: Optional[Sequence[str]] = None,
        users: Optional[Sequence[str]] = None) -> JaasAccessGroup
func GetJaasAccessGroup(ctx *Context, name string, id IDInput, state *JaasAccessGroupState, opts ...ResourceOption) (*JaasAccessGroup, error)
public static JaasAccessGroup Get(string name, Input<string> id, JaasAccessGroupState? state, CustomResourceOptions? opts = null)
public static JaasAccessGroup get(String name, Output<String> id, JaasAccessGroupState state, CustomResourceOptions options)
resources:  _:    type: juju:JaasAccessGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Access string
GroupId string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
Groups List<string>
List of groups to grant access. A valid group ID is the group's UUID.
ServiceAccounts List<string>
List of service accounts to grant access. A valid service account is the service account's name.
Users List<string>
List of users to grant access. A valid user is the user's name or email.
Access string
GroupId string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
Groups []string
List of groups to grant access. A valid group ID is the group's UUID.
ServiceAccounts []string
List of service accounts to grant access. A valid service account is the service account's name.
Users []string
List of users to grant access. A valid user is the user's name or email.
access String
groupId String
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups List<String>
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts List<String>
List of service accounts to grant access. A valid service account is the service account's name.
users List<String>
List of users to grant access. A valid user is the user's name or email.
access string
groupId string
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups string[]
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts string[]
List of service accounts to grant access. A valid service account is the service account's name.
users string[]
List of users to grant access. A valid user is the user's name or email.
access str
group_id str
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups Sequence[str]
List of groups to grant access. A valid group ID is the group's UUID.
service_accounts Sequence[str]
List of service accounts to grant access. A valid service account is the service account's name.
users Sequence[str]
List of users to grant access. A valid user is the user's name or email.
access String
groupId String
The ID of the group for access management. If this is changed the resource will be deleted and a new resource will be created.
groups List<String>
List of groups to grant access. A valid group ID is the group's UUID.
serviceAccounts List<String>
List of service accounts to grant access. A valid service account is the service account's name.
users List<String>
List of users to grant access. A valid user is the user's name or email.

Import

JAAS group access can be imported using the group UUID and access level

$ pulumi import juju:index/jaasAccessGroup:JaasAccessGroup development UUID:member
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
juju juju/terraform-provider-juju
License
Notes
This Pulumi package is based on the juju Terraform Provider.