juju.JaasAccessOffer
Explore with Pulumi AI
A resource that represent access to an offer when using JAAS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as juju from "@pulumi/juju";
const development = new juju.JaasAccessOffer("development", {
offerUrl: juju_offer.myoffer.url,
access: "consumer",
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.JaasAccessOffer("development",
offer_url=juju_offer["myoffer"]["url"],
access="consumer",
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.NewJaasAccessOffer(ctx, "development", &juju.JaasAccessOfferArgs{
OfferUrl: pulumi.Any(juju_offer.Myoffer.Url),
Access: pulumi.String("consumer"),
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.JaasAccessOffer("development", new()
{
OfferUrl = juju_offer.Myoffer.Url,
Access = "consumer",
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.JaasAccessOffer;
import com.pulumi.juju.JaasAccessOfferArgs;
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 JaasAccessOffer("development", JaasAccessOfferArgs.builder()
.offerUrl(juju_offer.myoffer().url())
.access("consumer")
.users("foo@domain.com")
.groups(juju_jaas_group.development().uuid())
.serviceAccounts(
"Client-ID-1",
"Client-ID-2")
.build());
}
}
resources:
development:
type: juju:JaasAccessOffer
properties:
offerUrl: ${juju_offer.myoffer.url}
access: consumer
users:
- foo@domain.com
groups:
- ${juju_jaas_group.development.uuid}
serviceAccounts:
- Client-ID-1
- Client-ID-2
Create JaasAccessOffer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new JaasAccessOffer(name: string, args: JaasAccessOfferArgs, opts?: CustomResourceOptions);
@overload
def JaasAccessOffer(resource_name: str,
args: JaasAccessOfferArgs,
opts: Optional[ResourceOptions] = None)
@overload
def JaasAccessOffer(resource_name: str,
opts: Optional[ResourceOptions] = None,
access: Optional[str] = None,
offer_url: 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 NewJaasAccessOffer(ctx *Context, name string, args JaasAccessOfferArgs, opts ...ResourceOption) (*JaasAccessOffer, error)
public JaasAccessOffer(string name, JaasAccessOfferArgs args, CustomResourceOptions? opts = null)
public JaasAccessOffer(String name, JaasAccessOfferArgs args)
public JaasAccessOffer(String name, JaasAccessOfferArgs args, CustomResourceOptions options)
type: juju:JaasAccessOffer
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 JaasAccessOfferArgs
- 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 JaasAccessOfferArgs
- 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 JaasAccessOfferArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args JaasAccessOfferArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args JaasAccessOfferArgs
- 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 jaasAccessOfferResource = new Juju.JaasAccessOffer("jaasAccessOfferResource", new()
{
Access = "string",
OfferUrl = "string",
Groups = new[]
{
"string",
},
Roles = new[]
{
"string",
},
ServiceAccounts = new[]
{
"string",
},
Users = new[]
{
"string",
},
});
example, err := juju.NewJaasAccessOffer(ctx, "jaasAccessOfferResource", &juju.JaasAccessOfferArgs{
Access: pulumi.String("string"),
OfferUrl: 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 jaasAccessOfferResource = new JaasAccessOffer("jaasAccessOfferResource", JaasAccessOfferArgs.builder()
.access("string")
.offerUrl("string")
.groups("string")
.roles("string")
.serviceAccounts("string")
.users("string")
.build());
jaas_access_offer_resource = juju.JaasAccessOffer("jaasAccessOfferResource",
access="string",
offer_url="string",
groups=["string"],
roles=["string"],
service_accounts=["string"],
users=["string"])
const jaasAccessOfferResource = new juju.JaasAccessOffer("jaasAccessOfferResource", {
access: "string",
offerUrl: "string",
groups: ["string"],
roles: ["string"],
serviceAccounts: ["string"],
users: ["string"],
});
type: juju:JaasAccessOffer
properties:
access: string
groups:
- string
offerUrl: string
roles:
- string
serviceAccounts:
- string
users:
- string
JaasAccessOffer 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 JaasAccessOffer resource accepts the following input properties:
- Access string
- Offer
Url string - The url of the offer 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
- Offer
Url string - The url of the offer 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
- offer
Url String - The url of the offer 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
- offer
Url string - The url of the offer 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
- offer_
url str - The url of the offer 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
- offer
Url String - The url of the offer 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 JaasAccessOffer 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 JaasAccessOffer Resource
Get an existing JaasAccessOffer 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?: JaasAccessOfferState, opts?: CustomResourceOptions): JaasAccessOffer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access: Optional[str] = None,
groups: Optional[Sequence[str]] = None,
offer_url: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
service_accounts: Optional[Sequence[str]] = None,
users: Optional[Sequence[str]] = None) -> JaasAccessOffer
func GetJaasAccessOffer(ctx *Context, name string, id IDInput, state *JaasAccessOfferState, opts ...ResourceOption) (*JaasAccessOffer, error)
public static JaasAccessOffer Get(string name, Input<string> id, JaasAccessOfferState? state, CustomResourceOptions? opts = null)
public static JaasAccessOffer get(String name, Output<String> id, JaasAccessOfferState state, CustomResourceOptions options)
resources: _: type: juju:JaasAccessOffer 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.
- Offer
Url string - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- Groups []string
- List of groups to grant access. A valid group ID is the group's UUID.
- Offer
Url string - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- groups List<String>
- List of groups to grant access. A valid group ID is the group's UUID.
- offer
Url String - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- groups string[]
- List of groups to grant access. A valid group ID is the group's UUID.
- offer
Url string - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- groups Sequence[str]
- List of groups to grant access. A valid group ID is the group's UUID.
- offer_
url str - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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
- groups List<String>
- List of groups to grant access. A valid group ID is the group's UUID.
- offer
Url String - The url of the offer for access management. If this is changed the resource will be deleted and a new resource will be created.
- 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.
Import
JAAS offer access can be imported by using the URL as in the juju show-offers output and the access level.
Example:
$ juju show-offer mysql
Store URL Access Description Endpoint Interface Role
mycontroller admin/db.mysql admin MariaDB Server is one of the most … mysql mysql provider
$ pulumi import juju:index/jaasAccessOffer:JaasAccessOffer db admin/db.mysql:consumer
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.