import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Use this data source to access information about an [Image](https://docs.controlplane.com/reference/image) within Control Plane. * * ## Required * * - **name** (String) Name of the image. If the tag of the image is not specified, the latest image will be fetched for this data source. * * ## Outputs * * The following attributes are exported: * * - **cpln_id** (String) The ID, in GUID format, of the Image. * - **name** (String) Name of the Image. * - **tags** (Map of String) Key-value map of resource tags. * - **self_link** (String) Full link to this resource. Can be referenced by other resources. * - **tag** (String) Tag of the image. * - **repository** (String) Respository name of the image. * - **digest** (String) A unique SHA256 hash used to identify a specific image version within the image registry. * - **manifest** (Block List, Max: 1) (see below) * * * * ### `manifest` * * The manifest provides configuration and layers information about the image. It plays a crucial role in the Docker image distribution system, enabling image creation, verification, and replication in a consistent and secure manner. * * - **config** (Block List, Max: 1) (see below). * - **layers** (Block List) (see below). * - **media_type** (String) Specifies the type of the content represented in the manifest, allowing Docker clients and registries to understand how to handle the document correctly. * - **schema_version** (Number) The version of the Docker Image Manifest format. * * * * ### `config` and `layers` * * The config is a JSON blob that contains the image configuration data which includes environment variables, default command to run, and other settings necessary to run the container based on this image. * * Layers lists the digests of the image's layers. These layers are filesystem changes or additions made in each step of the Docker image's creation process. The layers are stored separately and pulled as needed, which allows for efficient storage and transfer of images. Each layer is represented by a SHA256 digest, ensuring the integrity and authenticity of the image. * * - **size** (Number) The size of the image or layer in bytes. This helps in estimating the space required and the download time. * - **digest** (String) A unique SHA256 hash used to identify a specific image version within the image registry. * - **media_type** (String) Specifies the type of the content represented in the manifest, allowing Docker clients and registries to understand how to handle the document correctly. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cpln from "@pulumiverse/cpln"; * * // Get latest image * const image_name_only = cpln.getImage({ * name: "IMAGE_NAME", * }); * // Get Specific image * const image_name_with_tag = cpln.getImage({ * name: "IMAGE_NAME:TAG", * }); * export const latestImage = image_name_only; * export const specificImage = image_name_with_tag; * ``` */ export declare function getImage(args: GetImageArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getImage. */ export interface GetImageArgs { name: string; tags?: { [key: string]: string; }; } /** * A collection of values returned by getImage. */ export interface GetImageResult { readonly cplnId: string; readonly description: string; readonly digest: string; readonly id: string; readonly manifests: outputs.GetImageManifest[]; readonly name: string; readonly repository: string; readonly selfLink: string; readonly tag: string; readonly tags: { [key: string]: string; }; } /** * Use this data source to access information about an [Image](https://docs.controlplane.com/reference/image) within Control Plane. * * ## Required * * - **name** (String) Name of the image. If the tag of the image is not specified, the latest image will be fetched for this data source. * * ## Outputs * * The following attributes are exported: * * - **cpln_id** (String) The ID, in GUID format, of the Image. * - **name** (String) Name of the Image. * - **tags** (Map of String) Key-value map of resource tags. * - **self_link** (String) Full link to this resource. Can be referenced by other resources. * - **tag** (String) Tag of the image. * - **repository** (String) Respository name of the image. * - **digest** (String) A unique SHA256 hash used to identify a specific image version within the image registry. * - **manifest** (Block List, Max: 1) (see below) * * * * ### `manifest` * * The manifest provides configuration and layers information about the image. It plays a crucial role in the Docker image distribution system, enabling image creation, verification, and replication in a consistent and secure manner. * * - **config** (Block List, Max: 1) (see below). * - **layers** (Block List) (see below). * - **media_type** (String) Specifies the type of the content represented in the manifest, allowing Docker clients and registries to understand how to handle the document correctly. * - **schema_version** (Number) The version of the Docker Image Manifest format. * * * * ### `config` and `layers` * * The config is a JSON blob that contains the image configuration data which includes environment variables, default command to run, and other settings necessary to run the container based on this image. * * Layers lists the digests of the image's layers. These layers are filesystem changes or additions made in each step of the Docker image's creation process. The layers are stored separately and pulled as needed, which allows for efficient storage and transfer of images. Each layer is represented by a SHA256 digest, ensuring the integrity and authenticity of the image. * * - **size** (Number) The size of the image or layer in bytes. This helps in estimating the space required and the download time. * - **digest** (String) A unique SHA256 hash used to identify a specific image version within the image registry. * - **media_type** (String) Specifies the type of the content represented in the manifest, allowing Docker clients and registries to understand how to handle the document correctly. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cpln from "@pulumiverse/cpln"; * * // Get latest image * const image_name_only = cpln.getImage({ * name: "IMAGE_NAME", * }); * // Get Specific image * const image_name_with_tag = cpln.getImage({ * name: "IMAGE_NAME:TAG", * }); * export const latestImage = image_name_only; * export const specificImage = image_name_with_tag; * ``` */ export declare function getImageOutput(args: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getImage. */ export interface GetImageOutputArgs { name: pulumi.Input; tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }