1. Packages
  2. Nutanix
  3. API Docs
  4. FoundationImage
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

nutanix.FoundationImage

Explore with Pulumi AI

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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. FoundationImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. FoundationImageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FoundationImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
example, err := nutanix.NewFoundationImage(ctx, "foundationImageResource", &nutanix.FoundationImageArgs{
	Filename:      pulumi.String("string"),
	InstallerType: pulumi.String("string"),
	Source:        pulumi.String("string"),
})
Copy
var foundationImageResource = new FoundationImage("foundationImageResource", FoundationImageArgs.builder()
    .filename("string")
    .installerType("string")
    .source("string")
    .build());
Copy
foundation_image_resource = nutanix.FoundationImage("foundationImageResource",
    filename="string",
    installer_type="string",
    source="string")
Copy
const foundationImageResource = new nutanix.FoundationImage("foundationImageResource", {
    filename: "string",
    installerType: "string",
    source: "string",
});
Copy
type: nutanix:FoundationImage
properties:
    filename: string
    installerType: string
    source: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FoundationImage resource accepts the following input properties:

Filename
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Name of installer file to be kept in foundation vm.
InstallerType
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
Source
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Complete path to the file in machine where the .tf files runs.
Filename
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Name of installer file to be kept in foundation vm.
InstallerType
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
Source
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Complete path to the file in machine where the .tf files runs.
filename
This property is required.
Changes to this property will trigger replacement.
String
  • (Required) Name of installer file to be kept in foundation vm.
installerType
This property is required.
Changes to this property will trigger replacement.
String
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
source
This property is required.
Changes to this property will trigger replacement.
String
  • (Required) Complete path to the file in machine where the .tf files runs.
filename
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Name of installer file to be kept in foundation vm.
installerType
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
source
This property is required.
Changes to this property will trigger replacement.
string
  • (Required) Complete path to the file in machine where the .tf files runs.
filename
This property is required.
Changes to this property will trigger replacement.
str
  • (Required) Name of installer file to be kept in foundation vm.
installer_type
This property is required.
Changes to this property will trigger replacement.
str
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
source
This property is required.
Changes to this property will trigger replacement.
str
  • (Required) Complete path to the file in machine where the .tf files runs.
filename
This property is required.
Changes to this property will trigger replacement.
String
  • (Required) Name of installer file to be kept in foundation vm.
installerType
This property is required.
Changes to this property will trigger replacement.
String
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
source
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: nutanix:FoundationImage    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
  • (Required) Name of installer file to be kept in foundation vm.
InWhitelist bool
  • If hypervisor ISO is in whitelist.
InstallerType Changes to this property will trigger replacement. string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
Md5sum string
  • md5sum of the ISO.
Name string
  • file location in foundation vm
Source Changes to this property will trigger replacement. string
  • (Required) Complete path to the file in machine where the .tf files runs.
Filename Changes to this property will trigger replacement. string
  • (Required) Name of installer file to be kept in foundation vm.
InWhitelist bool
  • If hypervisor ISO is in whitelist.
InstallerType Changes to this property will trigger replacement. string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
Md5sum string
  • md5sum of the ISO.
Name string
  • file location in foundation vm
Source Changes to this property will trigger replacement. string
  • (Required) Complete path to the file in machine where the .tf files runs.
filename Changes to this property will trigger replacement. String
  • (Required) Name of installer file to be kept in foundation vm.
inWhitelist Boolean
  • If hypervisor ISO is in whitelist.
installerType Changes to this property will trigger replacement. String
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
md5sum String
  • md5sum of the ISO.
name String
  • file location in foundation vm
source Changes to this property will trigger replacement. String
  • (Required) Complete path to the file in machine where the .tf files runs.
filename Changes to this property will trigger replacement. string
  • (Required) Name of installer file to be kept in foundation vm.
inWhitelist boolean
  • If hypervisor ISO is in whitelist.
installerType Changes to this property will trigger replacement. string
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
md5sum string
  • md5sum of the ISO.
name string
  • file location in foundation vm
source Changes to this property will trigger replacement. string
  • (Required) Complete path to the file in machine where the .tf files runs.
filename Changes to this property will trigger replacement. str
  • (Required) Name of installer file to be kept in foundation vm.
in_whitelist bool
  • If hypervisor ISO is in whitelist.
installer_type Changes to this property will trigger replacement. str
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
md5sum str
  • md5sum of the ISO.
name str
  • file location in foundation vm
source Changes to this property will trigger replacement. str
  • (Required) Complete path to the file in machine where the .tf files runs.
filename Changes to this property will trigger replacement. String
  • (Required) Name of installer file to be kept in foundation vm.
inWhitelist Boolean
  • If hypervisor ISO is in whitelist.
installerType Changes to this property will trigger replacement. String
  • (Required) One of "kvm", "esx", "hyperv", "xen", or "nos".
md5sum String
  • md5sum of the ISO.
name String
  • file location in foundation vm
source Changes to this property will trigger replacement. 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.