- ovc_machine
- ovc_cloudspace
- ovc_disk
- ovc_sizes
- ovc_machines
- ovc_cloudspaces
- ovc_image
- ovc_images
Use this data source to get the ID of a machine in a cloudspace by name
data "ovc_machine" "machine" {
cloudspace_id = "${var.cloudspace_id}"
name = "${var.name}"
}
- name - (Required) name of machine to look up
- cloudspace_id - (Required) ID of the cloudspace where the machine is located
Use this data source to get the ID of a cloudspace in a location by name
data "ovc_cloudspace" "cloudspace" {
account = "${var.accountname}"
name = "${var.name}"
}
- name - (Required) name of cloudspace to look up
- account - (Required) name of the account where the cloudspace is located
Use this data source to get ID of sizes given vcpus and memory
data "ovc_sizes" "size" {
cloudspace_id = 225
vcpus = 2
memory = 4096
}
- cloudspace_id - (Required) cloudspace ID where the size is located
- memory - (Required) memory of the size
- vcpus - (Required) vcpus of the size
Use this data source to get the ID of a disk in a cloudspace by name
data "ovc_disk" "disk" {
account_id = 4
name = "${var.name}"
}
- account_id - (Required) ID of the account where the disk is located
- name - (Required) name of the disk to look up
Use this data source to retrieve information about all machines in a given cloudspace
data "ovc_machines" "machines" {
cloudspace_id = "${var.cloudspace_id}"
}
- cloudspace_id - (Required) ID of the cloudspace where the machines are located
Use this data source to retrieve information about all cloudspaces in a given location
data "ovc_cloudspaces" "cloudspaces" {
}
- No arguments needed for this data source
Use this data source to retrieve image by name. If more that single image matches the query, Terraform will fail.
To return the list of images use the data source ovc_images
.
data "ovc_image" "im"{
account = "<Account Name>"
name_regex = "<ImageName>"
most_recent = true
}
account
- (Optional) name of the account to retrieve images from. If set to 0, only system images will be looked up.name_regex
- (Optional) full name or name pattern for regex search. If set to "" all available images will be looked upmost_recent
- (Optional) If set totrue
will search for the latest crated image within the scope (image with the largest ID)
Use this data source to retrieve list of images by name
data "ovc_image" "im"{
account = "<Account Name>"
name_regex = "<ImageName>"
}
account
- (Optional) name of the account to retrieve images from. If set to 0, only system images will be looked up.name_regex
- (Optional) full name or name pattern for regex search. If set to "" all available images will be looked up