mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-19 21:52:27 +00:00
OTC: Retrieve Debian Image ID from Terraform Data Source
This commit is contained in:
parent
b214bed014
commit
98c7dd17d7
3 changed files with 5 additions and 7 deletions
|
@ -93,7 +93,6 @@ In `otc/variables.tf`, you can change the additional variables:
|
|||
* `availability_zone`
|
||||
* `flavor`
|
||||
* `key_pair` - Specify an existing SSH key pair
|
||||
* `image_id`
|
||||
* `volume_size`
|
||||
Furthermore you can configure the naming of the created infrastructure (per default everything gets prefixed with "tpot-", e.g. "tpot-router").
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
data "opentelekomcloud_images_image_v2" "debian" {
|
||||
name = "Standard_Debian_10_latest"
|
||||
}
|
||||
|
||||
resource "opentelekomcloud_networking_secgroup_v2" "secgroup_1" {
|
||||
name = var.secgroup_name
|
||||
description = var.secgroup_desc
|
||||
|
@ -48,7 +52,7 @@ resource "opentelekomcloud_compute_instance_v2" "ecs_1" {
|
|||
}
|
||||
|
||||
block_device {
|
||||
uuid = var.image_id
|
||||
uuid = data.opentelekomcloud_images_image_v2.debian.id
|
||||
source_type = "image"
|
||||
volume_size = var.volume_size
|
||||
destination_type = "volume"
|
||||
|
|
|
@ -49,11 +49,6 @@ variable "key_pair" {
|
|||
description = "Specify your SSH key pair"
|
||||
}
|
||||
|
||||
variable "image_id" {
|
||||
default = "cf471250-a755-4df8-8c42-6faa5a224ea0"
|
||||
description = "Select a Debian 10 base image id"
|
||||
}
|
||||
|
||||
variable "volume_size" {
|
||||
default = "128"
|
||||
description = "Set the volume size"
|
||||
|
|
Loading…
Reference in a new issue