HashiCorp Cloud Platform (HCP) v0.1.14, Dec 2 22
HashiCorp Cloud Platform (HCP) v0.1.14, Dec 2 22
hcp.getPackerImageIteration
Explore with Pulumi AI
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 alpine = Hcp.GetPackerImageIteration.Invoke(new()
{
BucketName = "alpine",
Channel = "production",
});
});
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.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:
- Bucket
Name 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 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 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 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.
- bucket
Name 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:
- Bucket
Name string The slug of the HCP Packer Registry image bucket to pull from.
- Builds
List<Get
Packer Image Iteration Build> 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.
- Created
At string Creation time of this iteration
- Id string
The provider-assigned unique ID for this managed resource.
- Incremental
Version int Incremental version of this iteration
- Organization
Id string The ID of the organization this HCP Packer registry is located in.
- Project
Id string The ID of the project this HCP Packer registry is located in.
- Revoke
At string
- Bucket
Name string The slug of the HCP Packer Registry image bucket to pull from.
- Builds
[]Get
Packer Image Iteration Build 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.
- Created
At string Creation time of this iteration
- Id string
The provider-assigned unique ID for this managed resource.
- Incremental
Version int Incremental version of this iteration
- Organization
Id string The ID of the organization this HCP Packer registry is located in.
- Project
Id string The ID of the project this HCP Packer registry is located in.
- Revoke
At string
- bucket
Name String The slug of the HCP Packer Registry image bucket to pull from.
- builds
List<Get
Packer Image Iteration Build> 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.
- created
At String Creation time of this iteration
- id String
The provider-assigned unique ID for this managed resource.
- incremental
Version Integer Incremental version of this iteration
- organization
Id String The ID of the organization this HCP Packer registry is located in.
- project
Id String The ID of the project this HCP Packer registry is located in.
- revoke
At String
- bucket
Name string The slug of the HCP Packer Registry image bucket to pull from.
- builds
Get
Packer Image Iteration Build[] 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.
- created
At string Creation time of this iteration
- id string
The provider-assigned unique ID for this managed resource.
- incremental
Version number Incremental version of this iteration
- organization
Id string The ID of the organization this HCP Packer registry is located in.
- project
Id string The ID of the project this HCP Packer registry is located in.
- revoke
At string
- bucket_
name str The slug of the HCP Packer Registry image bucket to pull from.
- builds
Sequence[Get
Packer Image Iteration Build] 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
- bucket
Name 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.
- created
At String Creation time of this iteration
- id String
The provider-assigned unique ID for this managed resource.
- incremental
Version Number Incremental version of this iteration
- organization
Id String The ID of the organization this HCP Packer registry is located in.
- project
Id String The ID of the project this HCP Packer registry is located in.
- revoke
At String
Supporting Types
GetPackerImageIterationBuild
- Cloud
Provider string Name of the cloud provider this image is stored-in, if any.
- Component
Type string Name of the builder that built this. Ex: 'amazon-ebs.example'.
- Created
At string Creation time of this build.
- Id string
HCP ID of this build.
- Images
List<Get
Packer Image Iteration Build Image> - Labels Dictionary<string, string>
Labels for this build.
- Packer
Run stringUuid Packer generated UUID of this build.
- Status string
Status of this build. DONE means that all images tied to this build were successfully built.
- Updated
At string Time this build was last updated.
- Cloud
Provider string Name of the cloud provider this image is stored-in, if any.
- Component
Type string Name of the builder that built this. Ex: 'amazon-ebs.example'.
- Created
At string Creation time of this build.
- Id string
HCP ID of this build.
- Images
[]Get
Packer Image Iteration Build Image - Labels map[string]string
Labels for this build.
- Packer
Run stringUuid Packer generated UUID of this build.
- Status string
Status of this build. DONE means that all images tied to this build were successfully built.
- Updated
At string Time this build was last updated.
- cloud
Provider String Name of the cloud provider this image is stored-in, if any.
- component
Type String Name of the builder that built this. Ex: 'amazon-ebs.example'.
- created
At String Creation time of this build.
- id String
HCP ID of this build.
- images
List<Get
Packer Image Iteration Build Image> - labels Map<String,String>
Labels for this build.
- packer
Run StringUuid Packer generated UUID of this build.
- status String
Status of this build. DONE means that all images tied to this build were successfully built.
- updated
At String Time this build was last updated.
- cloud
Provider string Name of the cloud provider this image is stored-in, if any.
- component
Type string Name of the builder that built this. Ex: 'amazon-ebs.example'.
- created
At string Creation time of this build.
- id string
HCP ID of this build.
- images
Get
Packer Image Iteration Build Image[] - labels {[key: string]: string}
Labels for this build.
- packer
Run stringUuid Packer generated UUID of this build.
- status string
Status of this build. DONE means that all images tied to this build were successfully built.
- updated
At 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[Get
Packer Image Iteration Build Image] - labels Mapping[str, str]
Labels for this build.
- packer_
run_ struuid 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.
- cloud
Provider String Name of the cloud provider this image is stored-in, if any.
- component
Type String Name of the builder that built this. Ex: 'amazon-ebs.example'.
- created
At String Creation time of this build.
- id String
HCP ID of this build.
- images List<Property Map>
- labels Map<String>
Labels for this build.
- packer
Run StringUuid Packer generated UUID of this build.
- status String
Status of this build. DONE means that all images tied to this build were successfully built.
- updated
At String Time this build was last updated.
GetPackerImageIterationBuildImage
- created_
at str Creation time of this iteration
- id str
The ID of this resource.
- image_
id str - region str
Package Details
- Repository
- hcp grapl-security/pulumi-hcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
hcp
Terraform Provider.