Secret
Manages the secrets of a Docker service in a swarm.
Example Usage
Basic
using Pulumi;
using Docker = Pulumi.Docker;
class MyStack : Stack
{
public MyStack()
{
// Creates a secret
var fooSecret = new Docker.Secret("fooSecret", new Docker.SecretArgs
{
Data = "ewogICJzZXJsaasIfQo=",
});
}
}
Coming soon!
import pulumi
import pulumi_docker as docker
# Creates a secret
foo_secret = docker.Secret("fooSecret", data="ewogICJzZXJsaasIfQo=")import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
// Creates a secret
const fooSecret = new docker.Secret("foo_secret", {
data: "ewogICJzZXJsaasIfQo=",
});Create a Secret Resource
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);def Secret(resource_name, opts=None, data=None, labels=None, name=None, __props__=None);func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Secret Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Secret resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
Look up an Existing Secret Resource
Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secretstatic get(resource_name, id, opts=None, data=None, labels=None, name=None, __props__=None);func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
Supporting Types
SecretLabel
Package Details
- Repository
- https://github.com/pulumi/pulumi-docker
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dockerTerraform Provider.