koyeb.Secret
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as koyeb from "@pulumi/koyeb";
const simple_secret = new koyeb.Secret("simple-secret", {
name: "secret-name",
value: "secret-value",
});
import pulumi
import pulumi_koyeb as koyeb
simple_secret = koyeb.Secret("simple-secret",
name="secret-name",
value="secret-value")
package main
import (
"github.com/koyeb/pulumi-koyeb/sdk/go/koyeb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := koyeb.NewSecret(ctx, "simple-secret", &koyeb.SecretArgs{
Name: pulumi.String("secret-name"),
Value: pulumi.String("secret-value"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Koyeb = Pulumi.Koyeb;
return await Deployment.RunAsync(() =>
{
var simple_secret = new Koyeb.Secret("simple-secret", new()
{
Name = "secret-name",
Value = "secret-value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.koyeb.Secret;
import com.pulumi.koyeb.SecretArgs;
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 simple_secret = new Secret("simple-secret", SecretArgs.builder()
.name("secret-name")
.value("secret-value")
.build());
}
}
resources:
simple-secret:
type: koyeb:Secret
properties:
name: secret-name
value: secret-value
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args?: SecretArgs, opts?: CustomResourceOptions);
@overload
def Secret(resource_name: str,
args: Optional[SecretArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
azure_container_registry: Optional[SecretAzureContainerRegistryArgs] = None,
digital_ocean_container_registry: Optional[SecretDigitalOceanContainerRegistryArgs] = None,
docker_hub_registry: Optional[SecretDockerHubRegistryArgs] = None,
github_registry: Optional[SecretGithubRegistryArgs] = None,
gitlab_registry: Optional[SecretGitlabRegistryArgs] = None,
name: Optional[str] = None,
private_registry: Optional[SecretPrivateRegistryArgs] = None,
type: Optional[str] = None,
value: Optional[str] = None)
func NewSecret(ctx *Context, name string, args *SecretArgs, opts ...ResourceOption) (*Secret, error)
public Secret(string name, SecretArgs? args = null, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: koyeb:Secret
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 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.
- args SecretArgs
- 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 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.
- name String
- The unique name of the resource.
- args SecretArgs
- 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 secretResource = new Koyeb.Secret("secretResource", new()
{
AzureContainerRegistry = new Koyeb.Inputs.SecretAzureContainerRegistryArgs
{
Password = "string",
RegistryName = "string",
Username = "string",
},
DigitalOceanContainerRegistry = new Koyeb.Inputs.SecretDigitalOceanContainerRegistryArgs
{
Password = "string",
Username = "string",
},
DockerHubRegistry = new Koyeb.Inputs.SecretDockerHubRegistryArgs
{
Password = "string",
Username = "string",
},
GithubRegistry = new Koyeb.Inputs.SecretGithubRegistryArgs
{
Password = "string",
Username = "string",
},
GitlabRegistry = new Koyeb.Inputs.SecretGitlabRegistryArgs
{
Password = "string",
Username = "string",
},
Name = "string",
PrivateRegistry = new Koyeb.Inputs.SecretPrivateRegistryArgs
{
Password = "string",
Url = "string",
Username = "string",
},
Type = "string",
Value = "string",
});
example, err := koyeb.NewSecret(ctx, "secretResource", &koyeb.SecretArgs{
AzureContainerRegistry: &koyeb.SecretAzureContainerRegistryArgs{
Password: pulumi.String("string"),
RegistryName: pulumi.String("string"),
Username: pulumi.String("string"),
},
DigitalOceanContainerRegistry: &koyeb.SecretDigitalOceanContainerRegistryArgs{
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
DockerHubRegistry: &koyeb.SecretDockerHubRegistryArgs{
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
GithubRegistry: &koyeb.SecretGithubRegistryArgs{
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
GitlabRegistry: &koyeb.SecretGitlabRegistryArgs{
Password: pulumi.String("string"),
Username: pulumi.String("string"),
},
Name: pulumi.String("string"),
PrivateRegistry: &koyeb.SecretPrivateRegistryArgs{
Password: pulumi.String("string"),
Url: pulumi.String("string"),
Username: pulumi.String("string"),
},
Type: pulumi.String("string"),
Value: pulumi.String("string"),
})
var secretResource = new Secret("secretResource", SecretArgs.builder()
.azureContainerRegistry(SecretAzureContainerRegistryArgs.builder()
.password("string")
.registryName("string")
.username("string")
.build())
.digitalOceanContainerRegistry(SecretDigitalOceanContainerRegistryArgs.builder()
.password("string")
.username("string")
.build())
.dockerHubRegistry(SecretDockerHubRegistryArgs.builder()
.password("string")
.username("string")
.build())
.githubRegistry(SecretGithubRegistryArgs.builder()
.password("string")
.username("string")
.build())
.gitlabRegistry(SecretGitlabRegistryArgs.builder()
.password("string")
.username("string")
.build())
.name("string")
.privateRegistry(SecretPrivateRegistryArgs.builder()
.password("string")
.url("string")
.username("string")
.build())
.type("string")
.value("string")
.build());
secret_resource = koyeb.Secret("secretResource",
azure_container_registry={
"password": "string",
"registry_name": "string",
"username": "string",
},
digital_ocean_container_registry={
"password": "string",
"username": "string",
},
docker_hub_registry={
"password": "string",
"username": "string",
},
github_registry={
"password": "string",
"username": "string",
},
gitlab_registry={
"password": "string",
"username": "string",
},
name="string",
private_registry={
"password": "string",
"url": "string",
"username": "string",
},
type="string",
value="string")
const secretResource = new koyeb.Secret("secretResource", {
azureContainerRegistry: {
password: "string",
registryName: "string",
username: "string",
},
digitalOceanContainerRegistry: {
password: "string",
username: "string",
},
dockerHubRegistry: {
password: "string",
username: "string",
},
githubRegistry: {
password: "string",
username: "string",
},
gitlabRegistry: {
password: "string",
username: "string",
},
name: "string",
privateRegistry: {
password: "string",
url: "string",
username: "string",
},
type: "string",
value: "string",
});
type: koyeb:Secret
properties:
azureContainerRegistry:
password: string
registryName: string
username: string
digitalOceanContainerRegistry:
password: string
username: string
dockerHubRegistry:
password: string
username: string
githubRegistry:
password: string
username: string
gitlabRegistry:
password: string
username: string
name: string
privateRegistry:
password: string
url: string
username: string
type: string
value: string
Secret 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 Secret resource accepts the following input properties:
- Azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- Digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- Docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- Github
Registry SecretGithub Registry - The GitHub registry configuration to use
- Gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- Name string
- The secret name
- Private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- Type string
- The secret type
- Value string
- The secret value
- Azure
Container SecretRegistry Azure Container Registry Args - The Azure registry configuration to use
- Digital
Ocean SecretContainer Registry Digital Ocean Container Registry Args - The DigitalOcean registry configuration to use
- Docker
Hub SecretRegistry Docker Hub Registry Args - The DockerHub registry configuration to use
- Github
Registry SecretGithub Registry Args - The GitHub registry configuration to use
- Gitlab
Registry SecretGitlab Registry Args - The GitLab registry configuration to use
- Name string
- The secret name
- Private
Registry SecretPrivate Registry Args - The DigitalOcean registry configuration to use
- Type string
- The secret type
- Value string
- The secret value
- azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- github
Registry SecretGithub Registry - The GitHub registry configuration to use
- gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- name String
- The secret name
- private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- type String
- The secret type
- value String
- The secret value
- azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- github
Registry SecretGithub Registry - The GitHub registry configuration to use
- gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- name string
- The secret name
- private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- type string
- The secret type
- value string
- The secret value
- azure_
container_ Secretregistry Azure Container Registry Args - The Azure registry configuration to use
- digital_
ocean_ Secretcontainer_ registry Digital Ocean Container Registry Args - The DigitalOcean registry configuration to use
- docker_
hub_ Secretregistry Docker Hub Registry Args - The DockerHub registry configuration to use
- github_
registry SecretGithub Registry Args - The GitHub registry configuration to use
- gitlab_
registry SecretGitlab Registry Args - The GitLab registry configuration to use
- name str
- The secret name
- private_
registry SecretPrivate Registry Args - The DigitalOcean registry configuration to use
- type str
- The secret type
- value str
- The secret value
- azure
Container Property MapRegistry - The Azure registry configuration to use
- digital
Ocean Property MapContainer Registry - The DigitalOcean registry configuration to use
- docker
Hub Property MapRegistry - The DockerHub registry configuration to use
- github
Registry Property Map - The GitHub registry configuration to use
- gitlab
Registry Property Map - The GitLab registry configuration to use
- name String
- The secret name
- private
Registry Property Map - The DigitalOcean registry configuration to use
- type String
- The secret type
- value String
- The secret value
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Created
At string - The date and time of when the secret was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The organization ID owning the secret
- Updated
At string - The date and time of when the secret was last updated
- Created
At string - The date and time of when the secret was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The organization ID owning the secret
- Updated
At string - The date and time of when the secret was last updated
- created
At String - The date and time of when the secret was created
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The organization ID owning the secret
- updated
At String - The date and time of when the secret was last updated
- created
At string - The date and time of when the secret was created
- id string
- The provider-assigned unique ID for this managed resource.
- organization
Id string - The organization ID owning the secret
- updated
At string - The date and time of when the secret was last updated
- created_
at str - The date and time of when the secret was created
- id str
- The provider-assigned unique ID for this managed resource.
- organization_
id str - The organization ID owning the secret
- updated_
at str - The date and time of when the secret was last updated
- created
At String - The date and time of when the secret was created
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The organization ID owning the secret
- updated
At String - The date and time of when the secret was last updated
Look up 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): Secret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
azure_container_registry: Optional[SecretAzureContainerRegistryArgs] = None,
created_at: Optional[str] = None,
digital_ocean_container_registry: Optional[SecretDigitalOceanContainerRegistryArgs] = None,
docker_hub_registry: Optional[SecretDockerHubRegistryArgs] = None,
github_registry: Optional[SecretGithubRegistryArgs] = None,
gitlab_registry: Optional[SecretGitlabRegistryArgs] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
private_registry: Optional[SecretPrivateRegistryArgs] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None,
value: Optional[str] = None) -> Secret
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)
public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- Created
At string - The date and time of when the secret was created
- Digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- Docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- Github
Registry SecretGithub Registry - The GitHub registry configuration to use
- Gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- Name string
- The secret name
- Organization
Id string - The organization ID owning the secret
- Private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- Type string
- The secret type
- Updated
At string - The date and time of when the secret was last updated
- Value string
- The secret value
- Azure
Container SecretRegistry Azure Container Registry Args - The Azure registry configuration to use
- Created
At string - The date and time of when the secret was created
- Digital
Ocean SecretContainer Registry Digital Ocean Container Registry Args - The DigitalOcean registry configuration to use
- Docker
Hub SecretRegistry Docker Hub Registry Args - The DockerHub registry configuration to use
- Github
Registry SecretGithub Registry Args - The GitHub registry configuration to use
- Gitlab
Registry SecretGitlab Registry Args - The GitLab registry configuration to use
- Name string
- The secret name
- Organization
Id string - The organization ID owning the secret
- Private
Registry SecretPrivate Registry Args - The DigitalOcean registry configuration to use
- Type string
- The secret type
- Updated
At string - The date and time of when the secret was last updated
- Value string
- The secret value
- azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- created
At String - The date and time of when the secret was created
- digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- github
Registry SecretGithub Registry - The GitHub registry configuration to use
- gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- name String
- The secret name
- organization
Id String - The organization ID owning the secret
- private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- type String
- The secret type
- updated
At String - The date and time of when the secret was last updated
- value String
- The secret value
- azure
Container SecretRegistry Azure Container Registry - The Azure registry configuration to use
- created
At string - The date and time of when the secret was created
- digital
Ocean SecretContainer Registry Digital Ocean Container Registry - The DigitalOcean registry configuration to use
- docker
Hub SecretRegistry Docker Hub Registry - The DockerHub registry configuration to use
- github
Registry SecretGithub Registry - The GitHub registry configuration to use
- gitlab
Registry SecretGitlab Registry - The GitLab registry configuration to use
- name string
- The secret name
- organization
Id string - The organization ID owning the secret
- private
Registry SecretPrivate Registry - The DigitalOcean registry configuration to use
- type string
- The secret type
- updated
At string - The date and time of when the secret was last updated
- value string
- The secret value
- azure_
container_ Secretregistry Azure Container Registry Args - The Azure registry configuration to use
- created_
at str - The date and time of when the secret was created
- digital_
ocean_ Secretcontainer_ registry Digital Ocean Container Registry Args - The DigitalOcean registry configuration to use
- docker_
hub_ Secretregistry Docker Hub Registry Args - The DockerHub registry configuration to use
- github_
registry SecretGithub Registry Args - The GitHub registry configuration to use
- gitlab_
registry SecretGitlab Registry Args - The GitLab registry configuration to use
- name str
- The secret name
- organization_
id str - The organization ID owning the secret
- private_
registry SecretPrivate Registry Args - The DigitalOcean registry configuration to use
- type str
- The secret type
- updated_
at str - The date and time of when the secret was last updated
- value str
- The secret value
- azure
Container Property MapRegistry - The Azure registry configuration to use
- created
At String - The date and time of when the secret was created
- digital
Ocean Property MapContainer Registry - The DigitalOcean registry configuration to use
- docker
Hub Property MapRegistry - The DockerHub registry configuration to use
- github
Registry Property Map - The GitHub registry configuration to use
- gitlab
Registry Property Map - The GitLab registry configuration to use
- name String
- The secret name
- organization
Id String - The organization ID owning the secret
- private
Registry Property Map - The DigitalOcean registry configuration to use
- type String
- The secret type
- updated
At String - The date and time of when the secret was last updated
- value String
- The secret value
Supporting Types
SecretAzureContainerRegistry, SecretAzureContainerRegistryArgs
- Password string
- The registry password
- Registry
Name string - The registry name
- Username string
- The registry username
- Password string
- The registry password
- Registry
Name string - The registry name
- Username string
- The registry username
- password String
- The registry password
- registry
Name String - The registry name
- username String
- The registry username
- password string
- The registry password
- registry
Name string - The registry name
- username string
- The registry username
- password str
- The registry password
- registry_
name str - The registry name
- username str
- The registry username
- password String
- The registry password
- registry
Name String - The registry name
- username String
- The registry username
SecretDigitalOceanContainerRegistry, SecretDigitalOceanContainerRegistryArgs
SecretDockerHubRegistry, SecretDockerHubRegistryArgs
SecretGithubRegistry, SecretGithubRegistryArgs
SecretGitlabRegistry, SecretGitlabRegistryArgs
SecretPrivateRegistry, SecretPrivateRegistryArgs
Package Details
- Repository
- koyeb koyeb/pulumi-koyeb
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
koyeb
Terraform Provider.