HCP

Community
Package contributed by a community member
v0.1.11 published on Monday, Jul 25, 2022 by Grapl Security

getPackerImageIteration

The Packer Image data source iteration gets the most recent iteration (or build) of an image, given a channel.

Example Usage

using Pulumi;
using Hcp = Pulumi.Hcp;

class MyStack : Stack
{
    public MyStack()
    {
        var alpine = Output.Create(Hcp.GetPackerImageIteration.InvokeAsync(new Hcp.GetPackerImageIterationArgs
        {
            BucketName = "alpine",
            Channel = "production",
        }));
    }

}
package main

import (
	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcp.GetPackerImageIteration(ctx, &GetPackerImageIterationArgs{
			BucketName: "alpine",
			Channel:    "production",
		}, nil)
		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.hcp.HcpFunctions;
import com.pulumi.hcp.inputs.GetPackerImageIterationArgs;
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 alpine = HcpFunctions.getPackerImageIteration(GetPackerImageIterationArgs.builder()
            .bucketName("alpine")
            .channel("production")
            .build());

    }
}
import pulumi
import pulumi_hcp as hcp

alpine = hcp.get_packer_image_iteration(bucket_name="alpine",
    channel="production")
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const alpine = pulumi.output(hcp.getPackerImageIteration({
    bucketName: "alpine",
    channel: "production",
}));
variables:
  alpine:
    Fn::Invoke:
      Function: hcp:getPackerImageIteration
      Arguments:
        bucketName: alpine
        channel: production

Using getPackerImageIteration

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPackerImageIteration(args: GetPackerImageIterationArgs, opts?: InvokeOptions): Promise<GetPackerImageIterationResult>
function getPackerImageIterationOutput(args: GetPackerImageIterationOutputArgs, opts?: InvokeOptions): Output<GetPackerImageIterationResult>
def get_packer_image_iteration(bucket_name: Optional[str] = None,
                               channel: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetPackerImageIterationResult
def get_packer_image_iteration_output(bucket_name: Optional[pulumi.Input[str]] = None,
                               channel: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetPackerImageIterationResult]
func GetPackerImageIteration(ctx *Context, args *GetPackerImageIterationArgs, opts ...InvokeOption) (*GetPackerImageIterationResult, error)
func GetPackerImageIterationOutput(ctx *Context, args *GetPackerImageIterationOutputArgs, opts ...InvokeOption) GetPackerImageIterationResultOutput

> Note: This function is named GetPackerImageIteration in the Go SDK.

public static class GetPackerImageIteration 
{
    public static Task<GetPackerImageIterationResult> InvokeAsync(GetPackerImageIterationArgs args, InvokeOptions? opts = null)
    public static Output<GetPackerImageIterationResult> Invoke(GetPackerImageIterationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPackerImageIterationResult> getPackerImageIteration(GetPackerImageIterationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcp:index/getPackerImageIteration:getPackerImageIteration
  Arguments:
    # Arguments dictionary

The following arguments are supported:

BucketName string

The slug of the HCP Packer Registry image bucket to pull from.

Channel string

The channel that points to the version of the image you want.

BucketName string

The slug of the HCP Packer Registry image bucket to pull from.

Channel string

The channel that points to the version of the image you want.

bucketName String

The slug of the HCP Packer Registry image bucket to pull from.

channel String

The channel that points to the version of the image you want.

bucketName string

The slug of the HCP Packer Registry image bucket to pull from.

channel string

The channel that points to the version of the image you want.

bucket_name str

The slug of the HCP Packer Registry image bucket to pull from.

channel str

The channel that points to the version of the image you want.

bucketName String

The slug of the HCP Packer Registry image bucket to pull from.

channel String

The channel that points to the version of the image you want.

getPackerImageIteration Result

The following output properties are available:

BucketName string

The slug of the HCP Packer Registry image bucket to pull from.

Builds List<GetPackerImageIterationBuild>

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

Channel string

The channel that points to the version of the image you want.

CreatedAt string

Creation time of this iteration

Id string

The provider-assigned unique ID for this managed resource.

IncrementalVersion int

Incremental version of this iteration

OrganizationId string

The ID of the organization this HCP Packer registry is located in.

ProjectId string

The ID of the project this HCP Packer registry is located in.

RevokeAt string
BucketName string

The slug of the HCP Packer Registry image bucket to pull from.

Builds []GetPackerImageIterationBuild

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

Channel string

The channel that points to the version of the image you want.

CreatedAt string

Creation time of this iteration

Id string

The provider-assigned unique ID for this managed resource.

IncrementalVersion int

Incremental version of this iteration

OrganizationId string

The ID of the organization this HCP Packer registry is located in.

ProjectId string

The ID of the project this HCP Packer registry is located in.

RevokeAt string
bucketName String

The slug of the HCP Packer Registry image bucket to pull from.

builds List<GetPackerImageIterationBuild>

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

channel String

The channel that points to the version of the image you want.

createdAt String

Creation time of this iteration

id String

The provider-assigned unique ID for this managed resource.

incrementalVersion Integer

Incremental version of this iteration

organizationId String

The ID of the organization this HCP Packer registry is located in.

projectId String

The ID of the project this HCP Packer registry is located in.

revokeAt String
bucketName string

The slug of the HCP Packer Registry image bucket to pull from.

builds GetPackerImageIterationBuild[]

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

channel string

The channel that points to the version of the image you want.

createdAt string

Creation time of this iteration

id string

The provider-assigned unique ID for this managed resource.

incrementalVersion number

Incremental version of this iteration

organizationId string

The ID of the organization this HCP Packer registry is located in.

projectId string

The ID of the project this HCP Packer registry is located in.

revokeAt string
bucket_name str

The slug of the HCP Packer Registry image bucket to pull from.

builds Sequence[GetPackerImageIterationBuild]

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

channel str

The channel that points to the version of the image you want.

created_at str

Creation time of this iteration

id str

The provider-assigned unique ID for this managed resource.

incremental_version int

Incremental version of this iteration

organization_id str

The ID of the organization this HCP Packer registry is located in.

project_id str

The ID of the project this HCP Packer registry is located in.

revoke_at str
bucketName String

The slug of the HCP Packer Registry image bucket to pull from.

builds List<Property Map>

Builds for this iteration. An iteration can have more than one build if it took more than one go to build all images.

channel String

The channel that points to the version of the image you want.

createdAt String

Creation time of this iteration

id String

The provider-assigned unique ID for this managed resource.

incrementalVersion Number

Incremental version of this iteration

organizationId String

The ID of the organization this HCP Packer registry is located in.

projectId String

The ID of the project this HCP Packer registry is located in.

revokeAt String

Supporting Types

GetPackerImageIterationBuild

CloudProvider string

Name of the cloud provider this image is stored-in, if any.

ComponentType string

Name of the builder that built this. Ex: 'amazon-ebs.example'.

CreatedAt string

Creation time of this build.

Id string

HCP ID of this build.

Images List<GetPackerImageIterationBuildImage>
Labels Dictionary<string, string>

Labels for this build.

PackerRunUuid string

Packer generated UUID of this build.

Status string

Status of this build. DONE means that all images tied to this build were successfully built.

UpdatedAt string

Time this build was last updated.

CloudProvider string

Name of the cloud provider this image is stored-in, if any.

ComponentType string

Name of the builder that built this. Ex: 'amazon-ebs.example'.

CreatedAt string

Creation time of this build.

Id string

HCP ID of this build.

Images []GetPackerImageIterationBuildImage
Labels map[string]string

Labels for this build.

PackerRunUuid string

Packer generated UUID of this build.

Status string

Status of this build. DONE means that all images tied to this build were successfully built.

UpdatedAt string

Time this build was last updated.

cloudProvider String

Name of the cloud provider this image is stored-in, if any.

componentType String

Name of the builder that built this. Ex: 'amazon-ebs.example'.

createdAt String

Creation time of this build.

id String

HCP ID of this build.

images List<GetPackerImageIterationBuildImage>
labels Map<String,String>

Labels for this build.

packerRunUuid String

Packer generated UUID of this build.

status String

Status of this build. DONE means that all images tied to this build were successfully built.

updatedAt String

Time this build was last updated.

cloudProvider string

Name of the cloud provider this image is stored-in, if any.

componentType string

Name of the builder that built this. Ex: 'amazon-ebs.example'.

createdAt string

Creation time of this build.

id string

HCP ID of this build.

images GetPackerImageIterationBuildImage[]
labels {[key: string]: string}

Labels for this build.

packerRunUuid string

Packer generated UUID of this build.

status string

Status of this build. DONE means that all images tied to this build were successfully built.

updatedAt string

Time this build was last updated.

cloud_provider str

Name of the cloud provider this image is stored-in, if any.

component_type str

Name of the builder that built this. Ex: 'amazon-ebs.example'.

created_at str

Creation time of this build.

id str

HCP ID of this build.

images Sequence[GetPackerImageIterationBuildImage]
labels Mapping[str, str]

Labels for this build.

packer_run_uuid str

Packer generated UUID of this build.

status str

Status of this build. DONE means that all images tied to this build were successfully built.

updated_at str

Time this build was last updated.

cloudProvider String

Name of the cloud provider this image is stored-in, if any.

componentType String

Name of the builder that built this. Ex: 'amazon-ebs.example'.

createdAt String

Creation time of this build.

id String

HCP ID of this build.

images List<Property Map>
labels Map<String>

Labels for this build.

packerRunUuid String

Packer generated UUID of this build.

status String

Status of this build. DONE means that all images tied to this build were successfully built.

updatedAt String

Time this build was last updated.

GetPackerImageIterationBuildImage

CreatedAt string

Creation time of this iteration

Id string

The ID of this resource.

ImageId string
Region string
CreatedAt string

Creation time of this iteration

Id string

The ID of this resource.

ImageId string
Region string
createdAt String

Creation time of this iteration

id String

The ID of this resource.

imageId String
region String
createdAt string

Creation time of this iteration

id string

The ID of this resource.

imageId string
region string
created_at str

Creation time of this iteration

id str

The ID of this resource.

image_id str
region str
createdAt String

Creation time of this iteration

id String

The ID of this resource.

imageId String
region String

Package Details

Repository
https://github.com/grapl-security/pulumi-hcp
License
Apache-2.0
Notes

This Pulumi package is based on the hcp Terraform Provider.