1. Packages
  2. Nutanix
  3. API Docs
  4. FoundationImage
Nutanix v0.0.55 published on Monday, Jul 22, 2024 by Piers Karsenbarg

nutanix.FoundationImage

Explore with Pulumi AI

nutanix logo
Nutanix v0.0.55 published on Monday, Jul 22, 2024 by Piers Karsenbarg

    Uploads hypervisor or AOS image to foundation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const nos_image = new nutanix.FoundationImage("nos-image", {
        filename: "nos_image.tar",
        installerType: "nos",
        source: "../../../files/nutanix_installer_x86_64.tar",
    });
    const hypervisor_image = new nutanix.FoundationImage("hypervisor-image", {
        filename: "esx_image.iso",
        installerType: "esx",
        source: "../../../files/VMware-Installer.x86_64.iso",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    nos_image = nutanix.FoundationImage("nos-image",
        filename="nos_image.tar",
        installer_type="nos",
        source="../../../files/nutanix_installer_x86_64.tar")
    hypervisor_image = nutanix.FoundationImage("hypervisor-image",
        filename="esx_image.iso",
        installer_type="esx",
        source="../../../files/VMware-Installer.x86_64.iso")
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.NewFoundationImage(ctx, "nos-image", &nutanix.FoundationImageArgs{
    			Filename:      pulumi.String("nos_image.tar"),
    			InstallerType: pulumi.String("nos"),
    			Source:        pulumi.String("../../../files/nutanix_installer_x86_64.tar"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nutanix.NewFoundationImage(ctx, "hypervisor-image", &nutanix.FoundationImageArgs{
    			Filename:      pulumi.String("esx_image.iso"),
    			InstallerType: pulumi.String("esx"),
    			Source:        pulumi.String("../../../files/VMware-Installer.x86_64.iso"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var nos_image = new Nutanix.FoundationImage("nos-image", new()
        {
            Filename = "nos_image.tar",
            InstallerType = "nos",
            Source = "../../../files/nutanix_installer_x86_64.tar",
        });
    
        var hypervisor_image = new Nutanix.FoundationImage("hypervisor-image", new()
        {
            Filename = "esx_image.iso",
            InstallerType = "esx",
            Source = "../../../files/VMware-Installer.x86_64.iso",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.FoundationImage;
    import com.pulumi.nutanix.FoundationImageArgs;
    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) {
            var nos_image = new FoundationImage("nos-image", FoundationImageArgs.builder()
                .filename("nos_image.tar")
                .installerType("nos")
                .source("../../../files/nutanix_installer_x86_64.tar")
                .build());
    
            var hypervisor_image = new FoundationImage("hypervisor-image", FoundationImageArgs.builder()
                .filename("esx_image.iso")
                .installerType("esx")
                .source("../../../files/VMware-Installer.x86_64.iso")
                .build());
    
        }
    }
    
    resources:
      nos-image:
        type: nutanix:FoundationImage
        properties:
          filename: nos_image.tar
          installerType: nos
          source: ../../../files/nutanix_installer_x86_64.tar
      hypervisor-image:
        type: nutanix:FoundationImage
        properties:
          filename: esx_image.iso
          installerType: esx
          source: ../../../files/VMware-Installer.x86_64.iso
    

    lifecycle

    • Update : - Resource will trigger new resource create call for any kind of update in resource config and delete existing image from foundation vm.

    See detailed information in Nutanix Foundation Image.

    Create FoundationImage Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FoundationImage(name: string, args: FoundationImageArgs, opts?: CustomResourceOptions);
    @overload
    def FoundationImage(resource_name: str,
                        args: FoundationImageArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def FoundationImage(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        filename: Optional[str] = None,
                        installer_type: Optional[str] = None,
                        source: Optional[str] = None)
    func NewFoundationImage(ctx *Context, name string, args FoundationImageArgs, opts ...ResourceOption) (*FoundationImage, error)
    public FoundationImage(string name, FoundationImageArgs args, CustomResourceOptions? opts = null)
    public FoundationImage(String name, FoundationImageArgs args)
    public FoundationImage(String name, FoundationImageArgs args, CustomResourceOptions options)
    
    type: nutanix:FoundationImage
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FoundationImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FoundationImageArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FoundationImageArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FoundationImageArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FoundationImageArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var foundationImageResource = new Nutanix.FoundationImage("foundationImageResource", new()
    {
        Filename = "string",
        InstallerType = "string",
        Source = "string",
    });
    
    example, err := nutanix.NewFoundationImage(ctx, "foundationImageResource", &nutanix.FoundationImageArgs{
    	Filename:      pulumi.String("string"),
    	InstallerType: pulumi.String("string"),
    	Source:        pulumi.String("string"),
    })
    
    var foundationImageResource = new FoundationImage("foundationImageResource", FoundationImageArgs.builder()
        .filename("string")
        .installerType("string")
        .source("string")
        .build());
    
    foundation_image_resource = nutanix.FoundationImage("foundationImageResource",
        filename="string",
        installer_type="string",
        source="string")
    
    const foundationImageResource = new nutanix.FoundationImage("foundationImageResource", {
        filename: "string",
        installerType: "string",
        source: "string",
    });
    
    type: nutanix:FoundationImage
    properties:
        filename: string
        installerType: string
        source: string
    

    FoundationImage Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The FoundationImage resource accepts the following input properties:

    Filename string
    • (Required) Name of installer file to be kept in foundation vm.
    InstallerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    Source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    Filename string
    • (Required) Name of installer file to be kept in foundation vm.
    InstallerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    Source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename String
    • (Required) Name of installer file to be kept in foundation vm.
    installerType String
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    source String
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename string
    • (Required) Name of installer file to be kept in foundation vm.
    installerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename str
    • (Required) Name of installer file to be kept in foundation vm.
    installer_type str
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    source str
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename String
    • (Required) Name of installer file to be kept in foundation vm.
    installerType String
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    source String
    • (Required) Complete path to the file in machine where the .tf files runs.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FoundationImage resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    InWhitelist bool
    • If hypervisor ISO is in whitelist.
    Md5sum string
    • md5sum of the ISO.
    Name string
    • file location in foundation vm
    Id string
    The provider-assigned unique ID for this managed resource.
    InWhitelist bool
    • If hypervisor ISO is in whitelist.
    Md5sum string
    • md5sum of the ISO.
    Name string
    • file location in foundation vm
    id String
    The provider-assigned unique ID for this managed resource.
    inWhitelist Boolean
    • If hypervisor ISO is in whitelist.
    md5sum String
    • md5sum of the ISO.
    name String
    • file location in foundation vm
    id string
    The provider-assigned unique ID for this managed resource.
    inWhitelist boolean
    • If hypervisor ISO is in whitelist.
    md5sum string
    • md5sum of the ISO.
    name string
    • file location in foundation vm
    id str
    The provider-assigned unique ID for this managed resource.
    in_whitelist bool
    • If hypervisor ISO is in whitelist.
    md5sum str
    • md5sum of the ISO.
    name str
    • file location in foundation vm
    id String
    The provider-assigned unique ID for this managed resource.
    inWhitelist Boolean
    • If hypervisor ISO is in whitelist.
    md5sum String
    • md5sum of the ISO.
    name String
    • file location in foundation vm

    Look up Existing FoundationImage Resource

    Get an existing FoundationImage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FoundationImageState, opts?: CustomResourceOptions): FoundationImage
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            filename: Optional[str] = None,
            in_whitelist: Optional[bool] = None,
            installer_type: Optional[str] = None,
            md5sum: Optional[str] = None,
            name: Optional[str] = None,
            source: Optional[str] = None) -> FoundationImage
    func GetFoundationImage(ctx *Context, name string, id IDInput, state *FoundationImageState, opts ...ResourceOption) (*FoundationImage, error)
    public static FoundationImage Get(string name, Input<string> id, FoundationImageState? state, CustomResourceOptions? opts = null)
    public static FoundationImage get(String name, Output<String> id, FoundationImageState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Filename string
    • (Required) Name of installer file to be kept in foundation vm.
    InWhitelist bool
    • If hypervisor ISO is in whitelist.
    InstallerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    Md5sum string
    • md5sum of the ISO.
    Name string
    • file location in foundation vm
    Source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    Filename string
    • (Required) Name of installer file to be kept in foundation vm.
    InWhitelist bool
    • If hypervisor ISO is in whitelist.
    InstallerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    Md5sum string
    • md5sum of the ISO.
    Name string
    • file location in foundation vm
    Source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename String
    • (Required) Name of installer file to be kept in foundation vm.
    inWhitelist Boolean
    • If hypervisor ISO is in whitelist.
    installerType String
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    md5sum String
    • md5sum of the ISO.
    name String
    • file location in foundation vm
    source String
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename string
    • (Required) Name of installer file to be kept in foundation vm.
    inWhitelist boolean
    • If hypervisor ISO is in whitelist.
    installerType string
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    md5sum string
    • md5sum of the ISO.
    name string
    • file location in foundation vm
    source string
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename str
    • (Required) Name of installer file to be kept in foundation vm.
    in_whitelist bool
    • If hypervisor ISO is in whitelist.
    installer_type str
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    md5sum str
    • md5sum of the ISO.
    name str
    • file location in foundation vm
    source str
    • (Required) Complete path to the file in machine where the .tf files runs.
    filename String
    • (Required) Name of installer file to be kept in foundation vm.
    inWhitelist Boolean
    • If hypervisor ISO is in whitelist.
    installerType String
    • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
    md5sum String
    • md5sum of the ISO.
    name String
    • file location in foundation vm
    source String
    • (Required) Complete path to the file in machine where the .tf files runs.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.0.55 published on Monday, Jul 22, 2024 by Piers Karsenbarg