mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-20 06:02:24 +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`
|
* `availability_zone`
|
||||||
* `flavor`
|
* `flavor`
|
||||||
* `key_pair` - Specify an existing SSH key pair
|
* `key_pair` - Specify an existing SSH key pair
|
||||||
* `image_id`
|
|
||||||
* `volume_size`
|
* `volume_size`
|
||||||
Furthermore you can configure the naming of the created infrastructure (per default everything gets prefixed with "tpot-", e.g. "tpot-router").
|
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" {
|
resource "opentelekomcloud_networking_secgroup_v2" "secgroup_1" {
|
||||||
name = var.secgroup_name
|
name = var.secgroup_name
|
||||||
description = var.secgroup_desc
|
description = var.secgroup_desc
|
||||||
|
@ -48,7 +52,7 @@ resource "opentelekomcloud_compute_instance_v2" "ecs_1" {
|
||||||
}
|
}
|
||||||
|
|
||||||
block_device {
|
block_device {
|
||||||
uuid = var.image_id
|
uuid = data.opentelekomcloud_images_image_v2.debian.id
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
volume_size = var.volume_size
|
volume_size = var.volume_size
|
||||||
destination_type = "volume"
|
destination_type = "volume"
|
||||||
|
|
|
@ -49,11 +49,6 @@ variable "key_pair" {
|
||||||
description = "Specify your SSH 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" {
|
variable "volume_size" {
|
||||||
default = "128"
|
default = "128"
|
||||||
description = "Set the volume size"
|
description = "Set the volume size"
|
||||||
|
|
Loading…
Reference in a new issue