1. Packages
  2. Juju Provider
  3. API Docs
  4. AccessSecret
juju 0.18.0 published on Monday, Apr 14, 2025 by juju

juju.AccessSecret

Explore with Pulumi AI

A resource that represents a Juju secret access.

Create AccessSecret Resource

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

Constructor syntax

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

@overload
def AccessSecret(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 applications: Optional[Sequence[str]] = None,
                 model: Optional[str] = None,
                 secret_id: Optional[str] = None)
func NewAccessSecret(ctx *Context, name string, args AccessSecretArgs, opts ...ResourceOption) (*AccessSecret, error)
public AccessSecret(string name, AccessSecretArgs args, CustomResourceOptions? opts = null)
public AccessSecret(String name, AccessSecretArgs args)
public AccessSecret(String name, AccessSecretArgs args, CustomResourceOptions options)
type: juju:AccessSecret
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. AccessSecretArgs
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. AccessSecretArgs
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. AccessSecretArgs
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. AccessSecretArgs
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. AccessSecretArgs
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 accessSecretResource = new Juju.AccessSecret("accessSecretResource", new()
{
    Applications = new[]
    {
        "string",
    },
    Model = "string",
    SecretId = "string",
});
Copy
example, err := juju.NewAccessSecret(ctx, "accessSecretResource", &juju.AccessSecretArgs{
Applications: pulumi.StringArray{
pulumi.String("string"),
},
Model: pulumi.String("string"),
SecretId: pulumi.String("string"),
})
Copy
var accessSecretResource = new AccessSecret("accessSecretResource", AccessSecretArgs.builder()
    .applications("string")
    .model("string")
    .secretId("string")
    .build());
Copy
access_secret_resource = juju.AccessSecret("accessSecretResource",
    applications=["string"],
    model="string",
    secret_id="string")
Copy
const accessSecretResource = new juju.AccessSecret("accessSecretResource", {
    applications: ["string"],
    model: "string",
    secretId: "string",
});
Copy
type: juju:AccessSecret
properties:
    applications:
        - string
    model: string
    secretId: string
Copy

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

Applications This property is required. List<string>
The list of applications to which the secret is granted.
Model This property is required. string
The model in which the secret belongs.
SecretId This property is required. string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
Applications This property is required. []string
The list of applications to which the secret is granted.
Model This property is required. string
The model in which the secret belongs.
SecretId This property is required. string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications This property is required. List<String>
The list of applications to which the secret is granted.
model This property is required. String
The model in which the secret belongs.
secretId This property is required. String
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications This property is required. string[]
The list of applications to which the secret is granted.
model This property is required. string
The model in which the secret belongs.
secretId This property is required. string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications This property is required. Sequence[str]
The list of applications to which the secret is granted.
model This property is required. str
The model in which the secret belongs.
secret_id This property is required. str
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications This property is required. List<String>
The list of applications to which the secret is granted.
model This property is required. String
The model in which the secret belongs.
secretId This property is required. String
The ID of the secret. E.g. coj8mulh8b41e8nv6p90

Outputs

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

Get an existing AccessSecret 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?: AccessSecretState, opts?: CustomResourceOptions): AccessSecret
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        applications: Optional[Sequence[str]] = None,
        model: Optional[str] = None,
        secret_id: Optional[str] = None) -> AccessSecret
func GetAccessSecret(ctx *Context, name string, id IDInput, state *AccessSecretState, opts ...ResourceOption) (*AccessSecret, error)
public static AccessSecret Get(string name, Input<string> id, AccessSecretState? state, CustomResourceOptions? opts = null)
public static AccessSecret get(String name, Output<String> id, AccessSecretState state, CustomResourceOptions options)
resources:  _:    type: juju:AccessSecret    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:
Applications List<string>
The list of applications to which the secret is granted.
Model string
The model in which the secret belongs.
SecretId string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
Applications []string
The list of applications to which the secret is granted.
Model string
The model in which the secret belongs.
SecretId string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications List<String>
The list of applications to which the secret is granted.
model String
The model in which the secret belongs.
secretId String
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications string[]
The list of applications to which the secret is granted.
model string
The model in which the secret belongs.
secretId string
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications Sequence[str]
The list of applications to which the secret is granted.
model str
The model in which the secret belongs.
secret_id str
The ID of the secret. E.g. coj8mulh8b41e8nv6p90
applications List<String>
The list of applications to which the secret is granted.
model String
The model in which the secret belongs.
secretId String
The ID of the secret. E.g. coj8mulh8b41e8nv6p90

Package Details

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