juju.JaasAccessServiceAccount
Explore with Pulumi AI
A resource that represents access to a service account when using JAAS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as juju from "@pulumi/juju";
const development = new juju.JaasAccessServiceAccount("development", {
serviceAccountId: "Client-ID",
access: "administrator",
users: ["foo@domain.com"],
groups: [juju_jaas_group.development.uuid],
serviceAccounts: [
"Client-ID-1",
"Client-ID-2",
],
});
import pulumi
import pulumi_juju as juju
development = juju.JaasAccessServiceAccount("development",
service_account_id="Client-ID",
access="administrator",
users=["foo@domain.com"],
groups=[juju_jaas_group["development"]["uuid"]],
service_accounts=[
"Client-ID-1",
"Client-ID-2",
])
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.NewJaasAccessServiceAccount(ctx, "development", &juju.JaasAccessServiceAccountArgs{
ServiceAccountId: pulumi.String("Client-ID"),
Access: pulumi.String("administrator"),
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Juju = Pulumi.Juju;
return await Deployment.RunAsync(() =>
{
var development = new Juju.JaasAccessServiceAccount("development", new()
{
ServiceAccountId = "Client-ID",
Access = "administrator",
Users = new[]
{
"foo@domain.com",
},
Groups = new[]
{
juju_jaas_group.Development.Uuid,
},
ServiceAccounts = new[]
{
"Client-ID-1",
"Client-ID-2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.juju.JaasAccessServiceAccount;
import com.pulumi.juju.JaasAccessServiceAccountArgs;
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 JaasAccessServiceAccount("development", JaasAccessServiceAccountArgs.builder()
.serviceAccountId("Client-ID")
.access("administrator")
.users("foo@domain.com")
.groups(juju_jaas_group.development().uuid())
.serviceAccounts(
"Client-ID-1",
"Client-ID-2")
.build());
}
}
resources:
development:
type: juju:JaasAccessServiceAccount
properties:
serviceAccountId: Client-ID
access: administrator
users:
- foo@domain.com
groups:
- ${juju_jaas_group.development.uuid}
serviceAccounts:
- Client-ID-1
- Client-ID-2
Create JaasAccessServiceAccount Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new JaasAccessServiceAccount(name: string, args: JaasAccessServiceAccountArgs, opts?: CustomResourceOptions);
@overload
def JaasAccessServiceAccount(resource_name: str,
args: JaasAccessServiceAccountArgs,
opts: Optional[ResourceOptions] = None)
@overload
def JaasAccessServiceAccount(resource_name: str,
opts: Optional[ResourceOptions] = None,
access: Optional[str] = None,
service_account_id: Optional[str] = None,
groups: Optional[Sequence[str]] = None,
roles: Optional[Sequence[str]] = None,
service_accounts: Optional[Sequence[str]] = None,
users: Optional[Sequence[str]] = None)
func NewJaasAccessServiceAccount(ctx *Context, name string, args JaasAccessServiceAccountArgs, opts ...ResourceOption) (*JaasAccessServiceAccount, error)
public JaasAccessServiceAccount(string name, JaasAccessServiceAccountArgs args, CustomResourceOptions? opts = null)
public JaasAccessServiceAccount(String name, JaasAccessServiceAccountArgs args)
public JaasAccessServiceAccount(String name, JaasAccessServiceAccountArgs args, CustomResourceOptions options)
type: juju:JaasAccessServiceAccount
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 JaasAccessServiceAccountArgs
- 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 JaasAccessServiceAccountArgs
- 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 JaasAccessServiceAccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JaasAccessServiceAccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JaasAccessServiceAccountArgs
- 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 jaasAccessServiceAccountResource = new Juju.JaasAccessServiceAccount("jaasAccessServiceAccountResource", new()
{
Access = "string",
ServiceAccountId = "string",
Groups = new[]
{
"string",
},
Roles = new[]
{
"string",
},
ServiceAccounts = new[]
{
"string",
},
Users = new[]
{
"string",
},
});
example, err := juju.NewJaasAccessServiceAccount(ctx, "jaasAccessServiceAccountResource", &juju.JaasAccessServiceAccountArgs{
Access: pulumi.String("string"),
ServiceAccountId: pulumi.String("string"),
Groups: pulumi.StringArray{
pulumi.String("string"),
},
Roles: pulumi.StringArray{
pulumi.String("string"),
},
ServiceAccounts: pulumi.StringArray{
pulumi.String("string"),
},
Users: pulumi.StringArray{
pulumi.String("string"),
},
})
var jaasAccessServiceAccountResource = new JaasAccessServiceAccount("jaasAccessServiceAccountResource", JaasAccessServiceAccountArgs.builder()
.access("string")
.serviceAccountId("string")
.groups("string")
.roles("string")
.serviceAccounts("string")
.users("string")
.build());
jaas_access_service_account_resource = juju.JaasAccessServiceAccount("jaasAccessServiceAccountResource",
access="string",
service_account_id="string",
groups=["string"],
roles=["string"],
service_accounts=["string"],
users=["string"])
const jaasAccessServiceAccountResource = new juju.JaasAccessServiceAccount("jaasAccessServiceAccountResource", {
access: "string",
serviceAccountId: "string",
groups: ["string"],
roles: ["string"],
serviceAccounts: ["string"],
users: ["string"],
});
type: juju:JaasAccessServiceAccount
properties:
access: string
groups:
- string
roles:
- string
serviceAccountId: string
serviceAccounts:
- string
users:
- string
JaasAccessServiceAccount 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 JaasAccessServiceAccount resource accepts the following input properties:
- Access string
- Service
Account stringId - The ID of the service account 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.
- Roles List<string>
- List of roles UUIDs to grant access.
- Service
Accounts 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
- Service
Account stringId - The ID of the service account 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.
- Roles []string
- List of roles UUIDs to grant access.
- Service
Accounts []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
- service
Account StringId - The ID of the service account 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.
- roles List<String>
- List of roles UUIDs to grant access.
- service
Accounts 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
- service
Account stringId - The ID of the service account 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.
- roles string[]
- List of roles UUIDs to grant access.
- service
Accounts 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
- service_
account_ strid - The ID of the service account 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.
- roles Sequence[str]
- List of roles UUIDs to grant access.
- 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
- service
Account StringId - The ID of the service account 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.
- roles List<String>
- List of roles UUIDs to grant access.
- service
Accounts 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 JaasAccessServiceAccount 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 JaasAccessServiceAccount Resource
Get an existing JaasAccessServiceAccount 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?: JaasAccessServiceAccountState, opts?: CustomResourceOptions): JaasAccessServiceAccount
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access: Optional[str] = None,
groups: Optional[Sequence[str]] = None,
roles: Optional[Sequence[str]] = None,
service_account_id: Optional[str] = None,
service_accounts: Optional[Sequence[str]] = None,
users: Optional[Sequence[str]] = None) -> JaasAccessServiceAccount
func GetJaasAccessServiceAccount(ctx *Context, name string, id IDInput, state *JaasAccessServiceAccountState, opts ...ResourceOption) (*JaasAccessServiceAccount, error)
public static JaasAccessServiceAccount Get(string name, Input<string> id, JaasAccessServiceAccountState? state, CustomResourceOptions? opts = null)
public static JaasAccessServiceAccount get(String name, Output<String> id, JaasAccessServiceAccountState state, CustomResourceOptions options)
resources: _: type: juju:JaasAccessServiceAccount 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.
- Access string
- Groups List<string>
- List of groups to grant access. A valid group ID is the group's UUID.
- Roles List<string>
- List of roles UUIDs to grant access.
- Service
Account stringId - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- Service
Accounts 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
- Groups []string
- List of groups to grant access. A valid group ID is the group's UUID.
- Roles []string
- List of roles UUIDs to grant access.
- Service
Account stringId - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- Service
Accounts []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
- groups List<String>
- List of groups to grant access. A valid group ID is the group's UUID.
- roles List<String>
- List of roles UUIDs to grant access.
- service
Account StringId - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- service
Accounts 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
- groups string[]
- List of groups to grant access. A valid group ID is the group's UUID.
- roles string[]
- List of roles UUIDs to grant access.
- service
Account stringId - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- service
Accounts 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
- groups Sequence[str]
- List of groups to grant access. A valid group ID is the group's UUID.
- roles Sequence[str]
- List of roles UUIDs to grant access.
- service_
account_ strid - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- groups List<String>
- List of groups to grant access. A valid group ID is the group's UUID.
- roles List<String>
- List of roles UUIDs to grant access.
- service
Account StringId - The ID of the service account for access management. If this is changed the resource will be deleted and a new resource will be created.
- service
Accounts 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 service account access can be imported using the service account ID
(normally referred to as a client ID) and access level.
$ pulumi import juju:index/jaasAccessServiceAccount:JaasAccessServiceAccount development ClientID:administrator
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.