digitalocean.ContainerRegistryDockerCredentials
Explore with Pulumi AI
Get Docker credentials for your DigitalOcean container registry.
An error is triggered if the provided container registry name does not exist.
Example Usage
Basic Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var example = new DigitalOcean.ContainerRegistryDockerCredentials("example", new()
{
RegistryName = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := digitalocean.NewContainerRegistryDockerCredentials(ctx, "example", &digitalocean.ContainerRegistryDockerCredentialsArgs{
RegistryName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.ContainerRegistryDockerCredentials;
import com.pulumi.digitalocean.ContainerRegistryDockerCredentialsArgs;
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 example = new ContainerRegistryDockerCredentials("example", ContainerRegistryDockerCredentialsArgs.builder()
.registryName("example")
.build());
}
}
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.ContainerRegistryDockerCredentials("example", registry_name="example")
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = new digitalocean.ContainerRegistryDockerCredentials("example", {registryName: "example"});
resources:
example:
type: digitalocean:ContainerRegistryDockerCredentials
properties:
registryName: example
Docker Provider Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var exampleContainerRegistry = DigitalOcean.GetContainerRegistry.Invoke(new()
{
Name = "example",
});
var exampleContainerRegistryDockerCredentials = new DigitalOcean.ContainerRegistryDockerCredentials("exampleContainerRegistryDockerCredentials", new()
{
RegistryName = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := digitalocean.LookupContainerRegistry(ctx, &digitalocean.LookupContainerRegistryArgs{
Name: "example",
}, nil)
if err != nil {
return err
}
_, err = digitalocean.NewContainerRegistryDockerCredentials(ctx, "exampleContainerRegistryDockerCredentials", &digitalocean.ContainerRegistryDockerCredentialsArgs{
RegistryName: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DigitaloceanFunctions;
import com.pulumi.digitalocean.inputs.GetContainerRegistryArgs;
import com.pulumi.digitalocean.ContainerRegistryDockerCredentials;
import com.pulumi.digitalocean.ContainerRegistryDockerCredentialsArgs;
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) {
final var exampleContainerRegistry = DigitaloceanFunctions.getContainerRegistry(GetContainerRegistryArgs.builder()
.name("example")
.build());
var exampleContainerRegistryDockerCredentials = new ContainerRegistryDockerCredentials("exampleContainerRegistryDockerCredentials", ContainerRegistryDockerCredentialsArgs.builder()
.registryName("example")
.build());
}
}
import pulumi
import pulumi_digitalocean as digitalocean
example_container_registry = digitalocean.get_container_registry(name="example")
example_container_registry_docker_credentials = digitalocean.ContainerRegistryDockerCredentials("exampleContainerRegistryDockerCredentials", registry_name="example")
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const exampleContainerRegistry = digitalocean.getContainerRegistry({
name: "example",
});
const exampleContainerRegistryDockerCredentials = new digitalocean.ContainerRegistryDockerCredentials("exampleContainerRegistryDockerCredentials", {registryName: "example"});
resources:
exampleContainerRegistryDockerCredentials:
type: digitalocean:ContainerRegistryDockerCredentials
properties:
registryName: example
variables:
exampleContainerRegistry:
fn::invoke:
Function: digitalocean:getContainerRegistry
Arguments:
name: example
Create ContainerRegistryDockerCredentials Resource
new ContainerRegistryDockerCredentials(name: string, args: ContainerRegistryDockerCredentialsArgs, opts?: CustomResourceOptions);
@overload
def ContainerRegistryDockerCredentials(resource_name: str,
opts: Optional[ResourceOptions] = None,
expiry_seconds: Optional[int] = None,
registry_name: Optional[str] = None,
write: Optional[bool] = None)
@overload
def ContainerRegistryDockerCredentials(resource_name: str,
args: ContainerRegistryDockerCredentialsArgs,
opts: Optional[ResourceOptions] = None)
func NewContainerRegistryDockerCredentials(ctx *Context, name string, args ContainerRegistryDockerCredentialsArgs, opts ...ResourceOption) (*ContainerRegistryDockerCredentials, error)
public ContainerRegistryDockerCredentials(string name, ContainerRegistryDockerCredentialsArgs args, CustomResourceOptions? opts = null)
public ContainerRegistryDockerCredentials(String name, ContainerRegistryDockerCredentialsArgs args)
public ContainerRegistryDockerCredentials(String name, ContainerRegistryDockerCredentialsArgs args, CustomResourceOptions options)
type: digitalocean:ContainerRegistryDockerCredentials
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContainerRegistryDockerCredentialsArgs
- 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 ContainerRegistryDockerCredentialsArgs
- 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 ContainerRegistryDockerCredentialsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContainerRegistryDockerCredentialsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContainerRegistryDockerCredentialsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ContainerRegistryDockerCredentials Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ContainerRegistryDockerCredentials resource accepts the following input properties:
- Registry
Name string The name of the container registry.
- Expiry
Seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- Write bool
Allow for write access to the container registry. Defaults to false.
- Registry
Name string The name of the container registry.
- Expiry
Seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- Write bool
Allow for write access to the container registry. Defaults to false.
- registry
Name String The name of the container registry.
- expiry
Seconds Integer The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- write Boolean
Allow for write access to the container registry. Defaults to false.
- registry
Name string The name of the container registry.
- expiry
Seconds number The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- write boolean
Allow for write access to the container registry. Defaults to false.
- registry_
name str The name of the container registry.
- expiry_
seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- write bool
Allow for write access to the container registry. Defaults to false.
- registry
Name String The name of the container registry.
- expiry
Seconds Number The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- write Boolean
Allow for write access to the container registry. Defaults to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the ContainerRegistryDockerCredentials resource produces the following output properties:
- Credential
Expiration stringTime The date and time the registry access token will expire.
- Docker
Credentials string Credentials for the container registry.
- Id string
The provider-assigned unique ID for this managed resource.
- Credential
Expiration stringTime The date and time the registry access token will expire.
- Docker
Credentials string Credentials for the container registry.
- Id string
The provider-assigned unique ID for this managed resource.
- credential
Expiration StringTime The date and time the registry access token will expire.
- docker
Credentials String Credentials for the container registry.
- id String
The provider-assigned unique ID for this managed resource.
- credential
Expiration stringTime The date and time the registry access token will expire.
- docker
Credentials string Credentials for the container registry.
- id string
The provider-assigned unique ID for this managed resource.
- credential_
expiration_ strtime The date and time the registry access token will expire.
- docker_
credentials str Credentials for the container registry.
- id str
The provider-assigned unique ID for this managed resource.
- credential
Expiration StringTime The date and time the registry access token will expire.
- docker
Credentials String Credentials for the container registry.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ContainerRegistryDockerCredentials Resource
Get an existing ContainerRegistryDockerCredentials 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?: ContainerRegistryDockerCredentialsState, opts?: CustomResourceOptions): ContainerRegistryDockerCredentials
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credential_expiration_time: Optional[str] = None,
docker_credentials: Optional[str] = None,
expiry_seconds: Optional[int] = None,
registry_name: Optional[str] = None,
write: Optional[bool] = None) -> ContainerRegistryDockerCredentials
func GetContainerRegistryDockerCredentials(ctx *Context, name string, id IDInput, state *ContainerRegistryDockerCredentialsState, opts ...ResourceOption) (*ContainerRegistryDockerCredentials, error)
public static ContainerRegistryDockerCredentials Get(string name, Input<string> id, ContainerRegistryDockerCredentialsState? state, CustomResourceOptions? opts = null)
public static ContainerRegistryDockerCredentials get(String name, Output<String> id, ContainerRegistryDockerCredentialsState 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.
- Credential
Expiration stringTime The date and time the registry access token will expire.
- Docker
Credentials string Credentials for the container registry.
- Expiry
Seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- Registry
Name string The name of the container registry.
- Write bool
Allow for write access to the container registry. Defaults to false.
- Credential
Expiration stringTime The date and time the registry access token will expire.
- Docker
Credentials string Credentials for the container registry.
- Expiry
Seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- Registry
Name string The name of the container registry.
- Write bool
Allow for write access to the container registry. Defaults to false.
- credential
Expiration StringTime The date and time the registry access token will expire.
- docker
Credentials String Credentials for the container registry.
- expiry
Seconds Integer The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- registry
Name String The name of the container registry.
- write Boolean
Allow for write access to the container registry. Defaults to false.
- credential
Expiration stringTime The date and time the registry access token will expire.
- docker
Credentials string Credentials for the container registry.
- expiry
Seconds number The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- registry
Name string The name of the container registry.
- write boolean
Allow for write access to the container registry. Defaults to false.
- credential_
expiration_ strtime The date and time the registry access token will expire.
- docker_
credentials str Credentials for the container registry.
- expiry_
seconds int The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- registry_
name str The name of the container registry.
- write bool
Allow for write access to the container registry. Defaults to false.
- credential
Expiration StringTime The date and time the registry access token will expire.
- docker
Credentials String Credentials for the container registry.
- expiry
Seconds Number The amount of time to pass before the Docker credentials expire in seconds. Defaults to 1576800000, or roughly 50 years. Must be greater than 0 and less than 1576800000.
- registry
Name String The name of the container registry.
- write Boolean
Allow for write access to the container registry. Defaults to false.
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
digitalocean
Terraform Provider.