This module is used to create an Instance
data "ibm_is_vpc" "vpc" {
name = var.vpc
}
data "ibm_resource_group" "resource_group" {
name = (var.resource_group != null ? var.resource_group : "default")
}
module "instance" {
source = "terraform-ibm-modules/vpc/ibm//modules/instance"
number_of_instances = var.number_of_instances
name = var.name
vpc_id = data.ibm_is_vpc.vpc.id
resource_group_id = data.ibm_resource_group.resource_group.id
location = var.location
image = var.image
profile = var.profile
ssh_keys = var.ssh_keys
primary_network_interface = var.primary_network_interface
user_data = var.user_data
boot_volume = var.boot_volume
network_interfaces = var.network_interfaces
data_volumes = var.data_volumes
tags = var.tags
}
Name | Version |
---|---|
terraform | >= 1.9.0 |
ibm | >= 1.64.0, <2.0.0 |
No modules.
Name | Type |
---|---|
ibm_is_instance.instances | resource |
ibm_is_virtual_network_interface.additional_vnis | resource |
ibm_is_virtual_network_interface.primary_vni | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
boot_volume | List of boot volume that are to be attached to the instance | list(object({ |
[] |
no |
data_volumes | List of volume ids that are to be attached to the instance | list(string) |
[] |
no |
image | Image ID for the instance | string |
n/a | yes |
location | Instance zone | string |
n/a | yes |
name | Name of the Instance | string |
n/a | yes |
network_interfaces | List of network_interfaces that are to be attached to the instance | list(object({ |
[] |
no |
number_of_instances | number of Instances | number |
1 |
no |
primary_network_interface | List of primary_network_interface that are to be attached to the instance | list(object({ |
n/a | yes |
profile | Profile type for the Instance | string |
n/a | yes |
resource_group_id | Resource group ID | string |
null |
no |
ssh_keys | List of ssh key IDs the instance | list(string) |
n/a | yes |
tags | List of Tags for the Instance | list(string) |
null |
no |
use_legacy_network_interface | Set this to true to use legacy network interface for the created instances. | bool |
false |
no |
user_data | User Data for the instance | string |
null |
no |
vpc_id | VPC ID | string |
n/a | yes |
Name | Description |
---|---|
instance_data | Data of all the instances created. |
instance_ids | The ID of the Instances |