1. Packages
  2. Iterative Provider
  3. API Docs
  4. Machine
iterative 0.11.20 published on Monday, Apr 14, 2025 by iterative

iterative.Machine

Explore with Pulumi AI

iterative logo
iterative 0.11.20 published on Monday, Apr 14, 2025 by iterative

    Create Machine Resource

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

    Constructor syntax

    new Machine(name: string, args?: MachineArgs, opts?: CustomResourceOptions);
    @overload
    def Machine(resource_name: str,
                args: Optional[MachineArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Machine(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                aws_security_group: Optional[str] = None,
                aws_subnet_id: Optional[str] = None,
                cloud: Optional[str] = None,
                image: Optional[str] = None,
                instance_gpu: Optional[str] = None,
                instance_hdd_size: Optional[float] = None,
                instance_permission_set: Optional[str] = None,
                instance_type: Optional[str] = None,
                kubernetes_node_selector: Optional[Mapping[str, str]] = None,
                machine_id: Optional[str] = None,
                metadata: Optional[Mapping[str, str]] = None,
                name: Optional[str] = None,
                region: Optional[str] = None,
                spot: Optional[bool] = None,
                spot_price: Optional[float] = None,
                ssh_private: Optional[str] = None,
                startup_script: Optional[str] = None,
                timeouts: Optional[MachineTimeoutsArgs] = None)
    func NewMachine(ctx *Context, name string, args *MachineArgs, opts ...ResourceOption) (*Machine, error)
    public Machine(string name, MachineArgs? args = null, CustomResourceOptions? opts = null)
    public Machine(String name, MachineArgs args)
    public Machine(String name, MachineArgs args, CustomResourceOptions options)
    
    type: iterative:Machine
    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 MachineArgs
    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 MachineArgs
    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 MachineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MachineArgs
    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 machineResource = new Iterative.Machine("machineResource", new()
    {
        AwsSecurityGroup = "string",
        AwsSubnetId = "string",
        Cloud = "string",
        Image = "string",
        InstanceGpu = "string",
        InstanceHddSize = 0,
        InstancePermissionSet = "string",
        InstanceType = "string",
        KubernetesNodeSelector = 
        {
            { "string", "string" },
        },
        MachineId = "string",
        Metadata = 
        {
            { "string", "string" },
        },
        Name = "string",
        Region = "string",
        Spot = false,
        SpotPrice = 0,
        SshPrivate = "string",
        StartupScript = "string",
        Timeouts = new Iterative.Inputs.MachineTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := iterative.NewMachine(ctx, "machineResource", &iterative.MachineArgs{
    	AwsSecurityGroup:      pulumi.String("string"),
    	AwsSubnetId:           pulumi.String("string"),
    	Cloud:                 pulumi.String("string"),
    	Image:                 pulumi.String("string"),
    	InstanceGpu:           pulumi.String("string"),
    	InstanceHddSize:       pulumi.Float64(0),
    	InstancePermissionSet: pulumi.String("string"),
    	InstanceType:          pulumi.String("string"),
    	KubernetesNodeSelector: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	MachineId: pulumi.String("string"),
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:          pulumi.String("string"),
    	Region:        pulumi.String("string"),
    	Spot:          pulumi.Bool(false),
    	SpotPrice:     pulumi.Float64(0),
    	SshPrivate:    pulumi.String("string"),
    	StartupScript: pulumi.String("string"),
    	Timeouts: &iterative.MachineTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var machineResource = new Machine("machineResource", MachineArgs.builder()
        .awsSecurityGroup("string")
        .awsSubnetId("string")
        .cloud("string")
        .image("string")
        .instanceGpu("string")
        .instanceHddSize(0)
        .instancePermissionSet("string")
        .instanceType("string")
        .kubernetesNodeSelector(Map.of("string", "string"))
        .machineId("string")
        .metadata(Map.of("string", "string"))
        .name("string")
        .region("string")
        .spot(false)
        .spotPrice(0)
        .sshPrivate("string")
        .startupScript("string")
        .timeouts(MachineTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    machine_resource = iterative.Machine("machineResource",
        aws_security_group="string",
        aws_subnet_id="string",
        cloud="string",
        image="string",
        instance_gpu="string",
        instance_hdd_size=0,
        instance_permission_set="string",
        instance_type="string",
        kubernetes_node_selector={
            "string": "string",
        },
        machine_id="string",
        metadata={
            "string": "string",
        },
        name="string",
        region="string",
        spot=False,
        spot_price=0,
        ssh_private="string",
        startup_script="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const machineResource = new iterative.Machine("machineResource", {
        awsSecurityGroup: "string",
        awsSubnetId: "string",
        cloud: "string",
        image: "string",
        instanceGpu: "string",
        instanceHddSize: 0,
        instancePermissionSet: "string",
        instanceType: "string",
        kubernetesNodeSelector: {
            string: "string",
        },
        machineId: "string",
        metadata: {
            string: "string",
        },
        name: "string",
        region: "string",
        spot: false,
        spotPrice: 0,
        sshPrivate: "string",
        startupScript: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: iterative:Machine
    properties:
        awsSecurityGroup: string
        awsSubnetId: string
        cloud: string
        image: string
        instanceGpu: string
        instanceHddSize: 0
        instancePermissionSet: string
        instanceType: string
        kubernetesNodeSelector:
            string: string
        machineId: string
        metadata:
            string: string
        name: string
        region: string
        spot: false
        spotPrice: 0
        sshPrivate: string
        startupScript: string
        timeouts:
            create: string
            delete: string
    

    Machine 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 Machine resource accepts the following input properties:

    AwsSecurityGroup string
    AwsSubnetId string
    Cloud string
    Image string
    InstanceGpu string
    InstanceHddSize double
    InstancePermissionSet string
    InstanceType string
    KubernetesNodeSelector Dictionary<string, string>
    MachineId string
    Metadata Dictionary<string, string>
    Name string
    Region string
    Spot bool
    SpotPrice double
    SshPrivate string
    StartupScript string
    Timeouts MachineTimeouts
    AwsSecurityGroup string
    AwsSubnetId string
    Cloud string
    Image string
    InstanceGpu string
    InstanceHddSize float64
    InstancePermissionSet string
    InstanceType string
    KubernetesNodeSelector map[string]string
    MachineId string
    Metadata map[string]string
    Name string
    Region string
    Spot bool
    SpotPrice float64
    SshPrivate string
    StartupScript string
    Timeouts MachineTimeoutsArgs
    awsSecurityGroup String
    awsSubnetId String
    cloud String
    image String
    instanceGpu String
    instanceHddSize Double
    instancePermissionSet String
    instanceType String
    kubernetesNodeSelector Map<String,String>
    machineId String
    metadata Map<String,String>
    name String
    region String
    spot Boolean
    spotPrice Double
    sshPrivate String
    startupScript String
    timeouts MachineTimeouts
    awsSecurityGroup string
    awsSubnetId string
    cloud string
    image string
    instanceGpu string
    instanceHddSize number
    instancePermissionSet string
    instanceType string
    kubernetesNodeSelector {[key: string]: string}
    machineId string
    metadata {[key: string]: string}
    name string
    region string
    spot boolean
    spotPrice number
    sshPrivate string
    startupScript string
    timeouts MachineTimeouts

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceIp string
    InstanceLaunchTime string
    SshName string
    SshPublic string
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceIp string
    InstanceLaunchTime string
    SshName string
    SshPublic string
    id String
    The provider-assigned unique ID for this managed resource.
    instanceIp String
    instanceLaunchTime String
    sshName String
    sshPublic String
    id string
    The provider-assigned unique ID for this managed resource.
    instanceIp string
    instanceLaunchTime string
    sshName string
    sshPublic string
    id str
    The provider-assigned unique ID for this managed resource.
    instance_ip str
    instance_launch_time str
    ssh_name str
    ssh_public str
    id String
    The provider-assigned unique ID for this managed resource.
    instanceIp String
    instanceLaunchTime String
    sshName String
    sshPublic String

    Look up Existing Machine Resource

    Get an existing Machine 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?: MachineState, opts?: CustomResourceOptions): Machine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_security_group: Optional[str] = None,
            aws_subnet_id: Optional[str] = None,
            cloud: Optional[str] = None,
            image: Optional[str] = None,
            instance_gpu: Optional[str] = None,
            instance_hdd_size: Optional[float] = None,
            instance_ip: Optional[str] = None,
            instance_launch_time: Optional[str] = None,
            instance_permission_set: Optional[str] = None,
            instance_type: Optional[str] = None,
            kubernetes_node_selector: Optional[Mapping[str, str]] = None,
            machine_id: Optional[str] = None,
            metadata: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            spot: Optional[bool] = None,
            spot_price: Optional[float] = None,
            ssh_name: Optional[str] = None,
            ssh_private: Optional[str] = None,
            ssh_public: Optional[str] = None,
            startup_script: Optional[str] = None,
            timeouts: Optional[MachineTimeoutsArgs] = None) -> Machine
    func GetMachine(ctx *Context, name string, id IDInput, state *MachineState, opts ...ResourceOption) (*Machine, error)
    public static Machine Get(string name, Input<string> id, MachineState? state, CustomResourceOptions? opts = null)
    public static Machine get(String name, Output<String> id, MachineState state, CustomResourceOptions options)
    resources:  _:    type: iterative:Machine    get:      id: ${id}
    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:
    AwsSecurityGroup string
    AwsSubnetId string
    Cloud string
    Image string
    InstanceGpu string
    InstanceHddSize double
    InstanceIp string
    InstanceLaunchTime string
    InstancePermissionSet string
    InstanceType string
    KubernetesNodeSelector Dictionary<string, string>
    MachineId string
    Metadata Dictionary<string, string>
    Name string
    Region string
    Spot bool
    SpotPrice double
    SshName string
    SshPrivate string
    SshPublic string
    StartupScript string
    Timeouts MachineTimeouts
    AwsSecurityGroup string
    AwsSubnetId string
    Cloud string
    Image string
    InstanceGpu string
    InstanceHddSize float64
    InstanceIp string
    InstanceLaunchTime string
    InstancePermissionSet string
    InstanceType string
    KubernetesNodeSelector map[string]string
    MachineId string
    Metadata map[string]string
    Name string
    Region string
    Spot bool
    SpotPrice float64
    SshName string
    SshPrivate string
    SshPublic string
    StartupScript string
    Timeouts MachineTimeoutsArgs
    awsSecurityGroup String
    awsSubnetId String
    cloud String
    image String
    instanceGpu String
    instanceHddSize Double
    instanceIp String
    instanceLaunchTime String
    instancePermissionSet String
    instanceType String
    kubernetesNodeSelector Map<String,String>
    machineId String
    metadata Map<String,String>
    name String
    region String
    spot Boolean
    spotPrice Double
    sshName String
    sshPrivate String
    sshPublic String
    startupScript String
    timeouts MachineTimeouts
    awsSecurityGroup string
    awsSubnetId string
    cloud string
    image string
    instanceGpu string
    instanceHddSize number
    instanceIp string
    instanceLaunchTime string
    instancePermissionSet string
    instanceType string
    kubernetesNodeSelector {[key: string]: string}
    machineId string
    metadata {[key: string]: string}
    name string
    region string
    spot boolean
    spotPrice number
    sshName string
    sshPrivate string
    sshPublic string
    startupScript string
    timeouts MachineTimeouts

    Supporting Types

    MachineTimeouts, MachineTimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Package Details

    Repository
    iterative iterative/terraform-provider-iterative
    License
    Notes
    This Pulumi package is based on the iterative Terraform Provider.
    iterative logo
    iterative 0.11.20 published on Monday, Apr 14, 2025 by iterative