From 14637fbf0235f3dfe50026dafd6d4917a7462a15 Mon Sep 17 00:00:00 2001 From: Tim Tkachev Date: Thu, 18 May 2023 13:04:42 +0300 Subject: [PATCH] fixed ids in 02.example --- 02.-Пример-работы.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/02.-Пример-работы.md b/02.-Пример-работы.md index 39c3638..f58d80c 100644 --- a/02.-Пример-работы.md +++ b/02.-Пример-работы.md @@ -21,15 +21,6 @@ # the TF file, however, this may not be secure if you plan to share this TF # file with others. -terraform { - required_providers { - decort = { - version = "4.0.0" - source = "basis/decort/decort" - } - } -} - provider "decort" { authenticator = "oauth2" controller_url = "<>" # specify correct DECORT controller URL, e.g. "https://ds1.digitalenergy.online" @@ -50,7 +41,7 @@ data "decort_image" "os_image" { # 4. Create new Resource Group in the selected account, new VM will be created in this RG resource "decort_resgroup" "my_rg" { name = "NewRgByTF" - account_id = data.decort_account.my_account.id + account_id = data.decort_account.my_account.account_id gid = # Grid (platform) ID # if you want to set resource quota on this Resource Group, uncomment # the following code fragment @@ -66,7 +57,7 @@ resource "decort_resgroup" "my_rg" { # and comment out extra_disks parameter when creating VM below. resource "decort_disk" "extra_disk" { disk_name = "extra-disk-for-vm" - account_id = data.decort_account.my_account.id + account_id = data.decort_account.my_account.account_id gid = # Grid (platform) ID size_max = 5 # disk size in GB type = "D" # disk type, always use "D" for extra disks @@ -81,12 +72,12 @@ resource "decort_disk" "extra_disk" { # specified size and one extra disk attached. resource "decort_kvmvm" "my_new_vm" { name = "tf-managed-vm" + driver = "KVM_X86" # Compute virtualization driver rg_id = decort_resgroup.my_rg.id - arch = "KVM_X86" # "KVM_PPC" for IBM Power or "KVM_X86" for Intel cpu = 1 # CPU count ram = 1024 # RAM size in MB, must be even number, ideally a power of 2 boot_disk_size = 10 # Boot disk size in GB - image_id = data.decort_image.os_image.id + image_id = data.decort_image.os_image.image_id description = "Test KVM VM Compute managed by Terraform" extra_disks = [ decort_disk.extra_disk.id ]