Как мне обратиться к файлу .zip в блоке настроек Terraform локально, вместо использования URL - PullRequest
0 голосов
/ 07 февраля 2020

У меня есть блок настроек в terraform, сейчас он ссылается на файл .zip и использует поле URL для ссылки на него. Как я могу сослаться на файл .zip локально?

PS модуль находится в GitHub и также доступен локально

Спасибо

пример кода: (Блок настроек от terraform azure расширение vm)

settings = <<SETTINGS
{
  "Wmfversion": "latest",
  "Configuration":
        {
           "url": "https://....github/CreateADRootDC1.ps1.zip"
        "script": "CreateADRootDC1.ps1",
      "function": "CreateADRootDC1"   
               },
  }

can I refer to the file with this syntax "source:" = "./modules/addsvms/DSC/CreateADRootDC1.ps1.zip",

1 Ответ

0 голосов
/ 13 февраля 2020

Я использовал хранилище BLOB-объектов для достижения этой цели:

"url" = "https://foo.blob.core.windows.net/dsc.zip" <<< get zip from this url and unzip it to a special folder on the vm
"script" = "configure.ps1" <<< load this file into memory
"function" = "AzureDscDemo" <<< call this function from inside the file
...