1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. ContainerRegistryToken
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.ContainerRegistryToken

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Manages an Container Registry Token on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const exampleContainerRegistry = new ionoscloud.ContainerRegistry("exampleContainerRegistry", {
        garbageCollectionSchedule: {
            days: [
                "Monday",
                "Tuesday",
            ],
            time: "05:19:00+00:00",
        },
        location: "de/fra",
    });
    const exampleContainerRegistryToken = new ionoscloud.ContainerRegistryToken("exampleContainerRegistryToken", {
        expiryDate: "2023-01-13 16:27:42Z",
        scopes: [{
            actions: ["push"],
            name: "Scope1",
            type: "repository",
        }],
        status: "enabled",
        registryId: exampleContainerRegistry.containerRegistryId,
        savePasswordToFile: "pass.txt",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example_container_registry = ionoscloud.ContainerRegistry("exampleContainerRegistry",
        garbage_collection_schedule={
            "days": [
                "Monday",
                "Tuesday",
            ],
            "time": "05:19:00+00:00",
        },
        location="de/fra")
    example_container_registry_token = ionoscloud.ContainerRegistryToken("exampleContainerRegistryToken",
        expiry_date="2023-01-13 16:27:42Z",
        scopes=[{
            "actions": ["push"],
            "name": "Scope1",
            "type": "repository",
        }],
        status="enabled",
        registry_id=example_container_registry.container_registry_id,
        save_password_to_file="pass.txt")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleContainerRegistry, err := ionoscloud.NewContainerRegistry(ctx, "exampleContainerRegistry", &ionoscloud.ContainerRegistryArgs{
    			GarbageCollectionSchedule: &ionoscloud.ContainerRegistryGarbageCollectionScheduleArgs{
    				Days: pulumi.StringArray{
    					pulumi.String("Monday"),
    					pulumi.String("Tuesday"),
    				},
    				Time: pulumi.String("05:19:00+00:00"),
    			},
    			Location: pulumi.String("de/fra"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ionoscloud.NewContainerRegistryToken(ctx, "exampleContainerRegistryToken", &ionoscloud.ContainerRegistryTokenArgs{
    			ExpiryDate: pulumi.String("2023-01-13 16:27:42Z"),
    			Scopes: ionoscloud.ContainerRegistryTokenScopeArray{
    				&ionoscloud.ContainerRegistryTokenScopeArgs{
    					Actions: pulumi.StringArray{
    						pulumi.String("push"),
    					},
    					Name: pulumi.String("Scope1"),
    					Type: pulumi.String("repository"),
    				},
    			},
    			Status:             pulumi.String("enabled"),
    			RegistryId:         exampleContainerRegistry.ContainerRegistryId,
    			SavePasswordToFile: pulumi.String("pass.txt"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleContainerRegistry = new Ionoscloud.ContainerRegistry("exampleContainerRegistry", new()
        {
            GarbageCollectionSchedule = new Ionoscloud.Inputs.ContainerRegistryGarbageCollectionScheduleArgs
            {
                Days = new[]
                {
                    "Monday",
                    "Tuesday",
                },
                Time = "05:19:00+00:00",
            },
            Location = "de/fra",
        });
    
        var exampleContainerRegistryToken = new Ionoscloud.ContainerRegistryToken("exampleContainerRegistryToken", new()
        {
            ExpiryDate = "2023-01-13 16:27:42Z",
            Scopes = new[]
            {
                new Ionoscloud.Inputs.ContainerRegistryTokenScopeArgs
                {
                    Actions = new[]
                    {
                        "push",
                    },
                    Name = "Scope1",
                    Type = "repository",
                },
            },
            Status = "enabled",
            RegistryId = exampleContainerRegistry.ContainerRegistryId,
            SavePasswordToFile = "pass.txt",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.ContainerRegistry;
    import com.pulumi.ionoscloud.ContainerRegistryArgs;
    import com.pulumi.ionoscloud.inputs.ContainerRegistryGarbageCollectionScheduleArgs;
    import com.pulumi.ionoscloud.ContainerRegistryToken;
    import com.pulumi.ionoscloud.ContainerRegistryTokenArgs;
    import com.pulumi.ionoscloud.inputs.ContainerRegistryTokenScopeArgs;
    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 exampleContainerRegistry = new ContainerRegistry("exampleContainerRegistry", ContainerRegistryArgs.builder()
                .garbageCollectionSchedule(ContainerRegistryGarbageCollectionScheduleArgs.builder()
                    .days(                
                        "Monday",
                        "Tuesday")
                    .time("05:19:00+00:00")
                    .build())
                .location("de/fra")
                .build());
    
            var exampleContainerRegistryToken = new ContainerRegistryToken("exampleContainerRegistryToken", ContainerRegistryTokenArgs.builder()
                .expiryDate("2023-01-13 16:27:42Z")
                .scopes(ContainerRegistryTokenScopeArgs.builder()
                    .actions("push")
                    .name("Scope1")
                    .type("repository")
                    .build())
                .status("enabled")
                .registryId(exampleContainerRegistry.containerRegistryId())
                .savePasswordToFile("pass.txt")
                .build());
    
        }
    }
    
    resources:
      exampleContainerRegistry:
        type: ionoscloud:ContainerRegistry
        properties:
          garbageCollectionSchedule:
            days:
              - Monday
              - Tuesday
            time: 05:19:00+00:00
          location: de/fra
      exampleContainerRegistryToken:
        type: ionoscloud:ContainerRegistryToken
        properties:
          expiryDate: 2023-01-13 16:27:42Z
          scopes:
            - actions:
                - push
              name: Scope1
              type: repository
          status: enabled
          registryId: ${exampleContainerRegistry.containerRegistryId}
          savePasswordToFile: pass.txt
    

    Create ContainerRegistryToken Resource

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

    Constructor syntax

    new ContainerRegistryToken(name: string, args: ContainerRegistryTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ContainerRegistryToken(resource_name: str,
                               args: ContainerRegistryTokenArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContainerRegistryToken(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               registry_id: Optional[str] = None,
                               container_registry_token_id: Optional[str] = None,
                               expiry_date: Optional[str] = None,
                               name: Optional[str] = None,
                               save_password_to_file: Optional[str] = None,
                               scopes: Optional[Sequence[ContainerRegistryTokenScopeArgs]] = None,
                               status: Optional[str] = None,
                               timeouts: Optional[ContainerRegistryTokenTimeoutsArgs] = None)
    func NewContainerRegistryToken(ctx *Context, name string, args ContainerRegistryTokenArgs, opts ...ResourceOption) (*ContainerRegistryToken, error)
    public ContainerRegistryToken(string name, ContainerRegistryTokenArgs args, CustomResourceOptions? opts = null)
    public ContainerRegistryToken(String name, ContainerRegistryTokenArgs args)
    public ContainerRegistryToken(String name, ContainerRegistryTokenArgs args, CustomResourceOptions options)
    
    type: ionoscloud:ContainerRegistryToken
    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 ContainerRegistryTokenArgs
    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 ContainerRegistryTokenArgs
    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 ContainerRegistryTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContainerRegistryTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContainerRegistryTokenArgs
    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 containerRegistryTokenResource = new Ionoscloud.ContainerRegistryToken("containerRegistryTokenResource", new()
    {
        RegistryId = "string",
        ContainerRegistryTokenId = "string",
        ExpiryDate = "string",
        Name = "string",
        SavePasswordToFile = "string",
        Scopes = new[]
        {
            new Ionoscloud.Inputs.ContainerRegistryTokenScopeArgs
            {
                Actions = new[]
                {
                    "string",
                },
                Name = "string",
                Type = "string",
            },
        },
        Status = "string",
        Timeouts = new Ionoscloud.Inputs.ContainerRegistryTokenTimeoutsArgs
        {
            Create = "string",
            Default = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ionoscloud.NewContainerRegistryToken(ctx, "containerRegistryTokenResource", &ionoscloud.ContainerRegistryTokenArgs{
    	RegistryId:               pulumi.String("string"),
    	ContainerRegistryTokenId: pulumi.String("string"),
    	ExpiryDate:               pulumi.String("string"),
    	Name:                     pulumi.String("string"),
    	SavePasswordToFile:       pulumi.String("string"),
    	Scopes: ionoscloud.ContainerRegistryTokenScopeArray{
    		&ionoscloud.ContainerRegistryTokenScopeArgs{
    			Actions: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Name: pulumi.String("string"),
    			Type: pulumi.String("string"),
    		},
    	},
    	Status: pulumi.String("string"),
    	Timeouts: &ionoscloud.ContainerRegistryTokenTimeoutsArgs{
    		Create:  pulumi.String("string"),
    		Default: pulumi.String("string"),
    		Delete:  pulumi.String("string"),
    		Update:  pulumi.String("string"),
    	},
    })
    
    var containerRegistryTokenResource = new ContainerRegistryToken("containerRegistryTokenResource", ContainerRegistryTokenArgs.builder()
        .registryId("string")
        .containerRegistryTokenId("string")
        .expiryDate("string")
        .name("string")
        .savePasswordToFile("string")
        .scopes(ContainerRegistryTokenScopeArgs.builder()
            .actions("string")
            .name("string")
            .type("string")
            .build())
        .status("string")
        .timeouts(ContainerRegistryTokenTimeoutsArgs.builder()
            .create("string")
            .default_("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    container_registry_token_resource = ionoscloud.ContainerRegistryToken("containerRegistryTokenResource",
        registry_id="string",
        container_registry_token_id="string",
        expiry_date="string",
        name="string",
        save_password_to_file="string",
        scopes=[{
            "actions": ["string"],
            "name": "string",
            "type": "string",
        }],
        status="string",
        timeouts={
            "create": "string",
            "default": "string",
            "delete": "string",
            "update": "string",
        })
    
    const containerRegistryTokenResource = new ionoscloud.ContainerRegistryToken("containerRegistryTokenResource", {
        registryId: "string",
        containerRegistryTokenId: "string",
        expiryDate: "string",
        name: "string",
        savePasswordToFile: "string",
        scopes: [{
            actions: ["string"],
            name: "string",
            type: "string",
        }],
        status: "string",
        timeouts: {
            create: "string",
            "default": "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ionoscloud:ContainerRegistryToken
    properties:
        containerRegistryTokenId: string
        expiryDate: string
        name: string
        registryId: string
        savePasswordToFile: string
        scopes:
            - actions:
                - string
              name: string
              type: string
        status: string
        timeouts:
            create: string
            default: string
            delete: string
            update: string
    

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

    RegistryId string
    [string] The ID of the container registry
    ContainerRegistryTokenId string
    ExpiryDate string
    Name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    SavePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    Scopes List<ContainerRegistryTokenScope>
    (Computed) [map]
    Status string
    [string] Must have one of the values: enabled, disabled
    Timeouts ContainerRegistryTokenTimeouts
    RegistryId string
    [string] The ID of the container registry
    ContainerRegistryTokenId string
    ExpiryDate string
    Name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    SavePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    Scopes []ContainerRegistryTokenScopeArgs
    (Computed) [map]
    Status string
    [string] Must have one of the values: enabled, disabled
    Timeouts ContainerRegistryTokenTimeoutsArgs
    registryId String
    [string] The ID of the container registry
    containerRegistryTokenId String
    expiryDate String
    name String
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    savePasswordToFile String

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes List<ContainerRegistryTokenScope>
    (Computed) [map]
    status String
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeouts
    registryId string
    [string] The ID of the container registry
    containerRegistryTokenId string
    expiryDate string
    name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    savePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes ContainerRegistryTokenScope[]
    (Computed) [map]
    status string
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeouts
    registry_id str
    [string] The ID of the container registry
    container_registry_token_id str
    expiry_date str
    name str
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    save_password_to_file str

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes Sequence[ContainerRegistryTokenScopeArgs]
    (Computed) [map]
    status str
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeoutsArgs
    registryId String
    [string] The ID of the container registry
    containerRegistryTokenId String
    expiryDate String
    name String
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    savePasswordToFile String

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes List<Property Map>
    (Computed) [map]
    status String
    [string] Must have one of the values: enabled, disabled
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ContainerRegistryToken resource produces the following output properties:

    Credentials List<ContainerRegistryTokenCredential>
    [map]
    Id string
    The provider-assigned unique ID for this managed resource.
    Credentials []ContainerRegistryTokenCredential
    [map]
    Id string
    The provider-assigned unique ID for this managed resource.
    credentials List<ContainerRegistryTokenCredential>
    [map]
    id String
    The provider-assigned unique ID for this managed resource.
    credentials ContainerRegistryTokenCredential[]
    [map]
    id string
    The provider-assigned unique ID for this managed resource.
    credentials Sequence[ContainerRegistryTokenCredential]
    [map]
    id str
    The provider-assigned unique ID for this managed resource.
    credentials List<Property Map>
    [map]
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ContainerRegistryToken Resource

    Get an existing ContainerRegistryToken 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?: ContainerRegistryTokenState, opts?: CustomResourceOptions): ContainerRegistryToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_registry_token_id: Optional[str] = None,
            credentials: Optional[Sequence[ContainerRegistryTokenCredentialArgs]] = None,
            expiry_date: Optional[str] = None,
            name: Optional[str] = None,
            registry_id: Optional[str] = None,
            save_password_to_file: Optional[str] = None,
            scopes: Optional[Sequence[ContainerRegistryTokenScopeArgs]] = None,
            status: Optional[str] = None,
            timeouts: Optional[ContainerRegistryTokenTimeoutsArgs] = None) -> ContainerRegistryToken
    func GetContainerRegistryToken(ctx *Context, name string, id IDInput, state *ContainerRegistryTokenState, opts ...ResourceOption) (*ContainerRegistryToken, error)
    public static ContainerRegistryToken Get(string name, Input<string> id, ContainerRegistryTokenState? state, CustomResourceOptions? opts = null)
    public static ContainerRegistryToken get(String name, Output<String> id, ContainerRegistryTokenState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:ContainerRegistryToken    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.
    The following state arguments are supported:
    ContainerRegistryTokenId string
    Credentials List<ContainerRegistryTokenCredential>
    [map]
    ExpiryDate string
    Name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    RegistryId string
    [string] The ID of the container registry
    SavePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    Scopes List<ContainerRegistryTokenScope>
    (Computed) [map]
    Status string
    [string] Must have one of the values: enabled, disabled
    Timeouts ContainerRegistryTokenTimeouts
    ContainerRegistryTokenId string
    Credentials []ContainerRegistryTokenCredentialArgs
    [map]
    ExpiryDate string
    Name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    RegistryId string
    [string] The ID of the container registry
    SavePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    Scopes []ContainerRegistryTokenScopeArgs
    (Computed) [map]
    Status string
    [string] Must have one of the values: enabled, disabled
    Timeouts ContainerRegistryTokenTimeoutsArgs
    containerRegistryTokenId String
    credentials List<ContainerRegistryTokenCredential>
    [map]
    expiryDate String
    name String
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    registryId String
    [string] The ID of the container registry
    savePasswordToFile String

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes List<ContainerRegistryTokenScope>
    (Computed) [map]
    status String
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeouts
    containerRegistryTokenId string
    credentials ContainerRegistryTokenCredential[]
    [map]
    expiryDate string
    name string
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    registryId string
    [string] The ID of the container registry
    savePasswordToFile string

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes ContainerRegistryTokenScope[]
    (Computed) [map]
    status string
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeouts
    container_registry_token_id str
    credentials Sequence[ContainerRegistryTokenCredentialArgs]
    [map]
    expiry_date str
    name str
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    registry_id str
    [string] The ID of the container registry
    save_password_to_file str

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes Sequence[ContainerRegistryTokenScopeArgs]
    (Computed) [map]
    status str
    [string] Must have one of the values: enabled, disabled
    timeouts ContainerRegistryTokenTimeoutsArgs
    containerRegistryTokenId String
    credentials List<Property Map>
    [map]
    expiryDate String
    name String
    [string] The name of the container registry token. Immutable, update forces re-creation of the resource.

    • expiry-date - (Optional)[string] The value must be supplied as ISO 8601 timestamp
    registryId String
    [string] The ID of the container registry
    savePasswordToFile String

    [string] Saves token password to file. Only works on create. Takes as argument a file name, or a file path

    ⚠ WARNING save_password_to_file must be used with caution. It will save the password(token) returned on create to a file. This is the only way to get the token.

    scopes List<Property Map>
    (Computed) [map]
    status String
    [string] Must have one of the values: enabled, disabled
    timeouts Property Map

    Supporting Types

    ContainerRegistryTokenCredential, ContainerRegistryTokenCredentialArgs

    Password string
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    Username string
    [string] The username of the container registry token
    Password string
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    Username string
    [string] The username of the container registry token
    password String
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    username String
    [string] The username of the container registry token
    password string
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    username string
    [string] The username of the container registry token
    password str
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    username str
    [string] The username of the container registry token
    password String
    [string] The password/token of the container registry token which will also be saved to a file if save_password_to_file is set
    username String
    [string] The username of the container registry token

    ContainerRegistryTokenScope, ContainerRegistryTokenScopeArgs

    Actions List<string>
    [string] Example: ["pull", "push", "delete"]
    Name string
    [string]
    Type string
    [string]
    Actions []string
    [string] Example: ["pull", "push", "delete"]
    Name string
    [string]
    Type string
    [string]
    actions List<String>
    [string] Example: ["pull", "push", "delete"]
    name String
    [string]
    type String
    [string]
    actions string[]
    [string] Example: ["pull", "push", "delete"]
    name string
    [string]
    type string
    [string]
    actions Sequence[str]
    [string] Example: ["pull", "push", "delete"]
    name str
    [string]
    type str
    [string]
    actions List<String>
    [string] Example: ["pull", "push", "delete"]
    name String
    [string]
    type String
    [string]

    ContainerRegistryTokenTimeouts, ContainerRegistryTokenTimeoutsArgs

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    Import

    Resource Container Registry Token can be imported using the container registry id and resource id, e.g.

    $ pulumi import ionoscloud:index/containerRegistryToken:ContainerRegistryToken mycrtoken container_registry uuid/container_registry_token uuid
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud