HCP

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

getPackerIteration

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 hardened_source = Output.Create(Hcp.GetPackerIteration.InvokeAsync(new Hcp.GetPackerIterationArgs
        {
            BucketName = "hardened-ubuntu-16-04",
            Channel = "megan-test",
        }));
    }

}
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.GetPackerIteration(ctx, &GetPackerIterationArgs{
			BucketName: "hardened-ubuntu-16-04",
			Channel:    "megan-test",
		}, 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.GetPackerIterationArgs;
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 hardened-source = HcpFunctions.getPackerIteration(GetPackerIterationArgs.builder()
            .bucketName("hardened-ubuntu-16-04")
            .channel("megan-test")
            .build());

    }
}
import pulumi
import pulumi_hcp as hcp

hardened_source = hcp.get_packer_iteration(bucket_name="hardened-ubuntu-16-04",
    channel="megan-test")
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const hardened_source = pulumi.output(hcp.getPackerIteration({
    bucketName: "hardened-ubuntu-16-04",
    channel: "megan-test",
}));
variables:
  hardened-source:
    Fn::Invoke:
      Function: hcp:getPackerIteration
      Arguments:
        bucketName: hardened-ubuntu-16-04
        channel: megan-test

Using getPackerIteration

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 getPackerIteration(args: GetPackerIterationArgs, opts?: InvokeOptions): Promise<GetPackerIterationResult>
function getPackerIterationOutput(args: GetPackerIterationOutputArgs, opts?: InvokeOptions): Output<GetPackerIterationResult>
def get_packer_iteration(bucket_name: Optional[str] = None,
                         channel: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPackerIterationResult
def get_packer_iteration_output(bucket_name: Optional[pulumi.Input[str]] = None,
                         channel: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPackerIterationResult]
func GetPackerIteration(ctx *Context, args *GetPackerIterationArgs, opts ...InvokeOption) (*GetPackerIterationResult, error)
func GetPackerIterationOutput(ctx *Context, args *GetPackerIterationOutputArgs, opts ...InvokeOption) GetPackerIterationResultOutput

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

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

The following arguments are supported:

BucketName string
Channel string
BucketName string
Channel string
bucketName String
channel String
bucketName string
channel string
bucketName String
channel String

getPackerIteration Result

The following output properties are available:

AuthorId string
BucketName string
Channel string
CreatedAt string
Fingerprint string
Id string

The provider-assigned unique ID for this managed resource.

IncrementalVersion int
OrganizationId string
ProjectId string
RevokeAt string
Ulid string
UpdatedAt string
AuthorId string
BucketName string
Channel string
CreatedAt string
Fingerprint string
Id string

The provider-assigned unique ID for this managed resource.

IncrementalVersion int
OrganizationId string
ProjectId string
RevokeAt string
Ulid string
UpdatedAt string
authorId String
bucketName String
channel String
createdAt String
fingerprint String
id String

The provider-assigned unique ID for this managed resource.

incrementalVersion Integer
organizationId String
projectId String
revokeAt String
ulid String
updatedAt String
authorId string
bucketName string
channel string
createdAt string
fingerprint string
id string

The provider-assigned unique ID for this managed resource.

incrementalVersion number
organizationId string
projectId string
revokeAt string
ulid string
updatedAt string
author_id str
bucket_name str
channel str
created_at str
fingerprint str
id str

The provider-assigned unique ID for this managed resource.

incremental_version int
organization_id str
project_id str
revoke_at str
ulid str
updated_at str
authorId String
bucketName String
channel String
createdAt String
fingerprint String
id String

The provider-assigned unique ID for this managed resource.

incrementalVersion Number
organizationId String
projectId String
revokeAt String
ulid String
updatedAt 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.