1. Packages
  2. HCP
  3. API Docs
  4. getPackerIteration
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

hcp.getPackerIteration

Explore with Pulumi AI

hcp logo
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

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

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Hcp = Pulumi.Hcp;
    
    return await Deployment.RunAsync(() => 
    {
        var hardened_source = Hcp.GetPackerIteration.Invoke(new()
        {
            BucketName = "hardened-ubuntu-16-04",
            Channel = "megan-test",
        });
    
    });
    
    package main
    
    import (
    	"github.com/grapl-security/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
    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.

    getPackerIteration Result

    The following output properties are available:

    AuthorId string
    The name of the person who created this iteration.
    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.
    CreatedAt string
    Creation time of this iteration
    Fingerprint string
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    Ulid string
    The ULID of this iteration.
    UpdatedAt string
    Time this build was last updated.
    AuthorId string
    The name of the person who created this iteration.
    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.
    CreatedAt string
    Creation time of this iteration
    Fingerprint string
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    Ulid string
    The ULID of this iteration.
    UpdatedAt string
    Time this build was last updated.
    authorId String
    The name of the person who created this iteration.
    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.
    createdAt String
    Creation time of this iteration
    fingerprint String
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    ulid String
    The ULID of this iteration.
    updatedAt String
    Time this build was last updated.
    authorId string
    The name of the person who created this iteration.
    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.
    createdAt string
    Creation time of this iteration
    fingerprint string
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    ulid string
    The ULID of this iteration.
    updatedAt string
    Time this build was last updated.
    author_id str
    The name of the person who created this iteration.
    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.
    created_at str
    Creation time of this iteration
    fingerprint str
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    ulid str
    The ULID of this iteration.
    updated_at str
    Time this build was last updated.
    authorId String
    The name of the person who created this iteration.
    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.
    createdAt String
    Creation time of this iteration
    fingerprint String
    The unique fingerprint associated with this iteration; often a git sha.
    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
    The revocation time of this iteration. This field will be null for any iteration that has not been revoked or scheduled for revocation.
    ulid String
    The ULID of this iteration.
    updatedAt String
    Time this build was last updated.

    Package Details

    Repository
    hcp grapl-security/pulumi-hcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcp Terraform Provider.
    hcp logo
    HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security