【问题标题】:Azure VM Customscript not DownloadingAzure VM 自定义脚本未下载
【发布时间】:2018-07-13 02:17:38
【问题描述】:

我正在使用下面的 terraform .tf 文件。它总是将错误显示为

DownloadFileAsync:从下载文件时出错 https://github.dxc.com/raw/gist/jmathews4/2095e2436571715f94e05e5ac5400a67/raw/f554d018ae4fee12979b2ee6f5ac4abb3ff509aa/Terraform.ps1?token=AAAMrnoBPpBc7C8kN2_haQueWaqDhth-ks5bUGqhwA%3D%3D, 重试计数 25,异常:System.Net.WebException:请求是 中止:无法创建 SSL/TLS 安全通道。在 System.Net.WebClient.DownloadFile(Uri address, String fileName)

知道 GIT 会出现什么问题吗?

provider "azurerm" {
   
}

variable "location" { default = "Southeast Asia" }
variable "resourceGroup" { default = "TerraformResearchResourceGroup" }
variable "virtualMachine" { default = "terraformrvm" }

resource "azurerm_virtual_machine_extension" "ext" {
  name                 = "eagpocvmexxt"
  location             = "Southeast Asia"
  resource_group_name  = "terraformrg"
  virtual_machine_name = "terraformvm"
  publisher            = "Microsoft.Compute"
  type                 = "CustomScriptExtension"
  type_handler_version = "1.8"

  settings = <<SETTINGS
    {
        "fileUris": ["https://github.dxc.com/raw/gist/jmathews4/2095e2436571715f94e05e5ac5400a67/raw/f554d018ae4fee12979b2ee6f5ac4abb3ff509aa/Terraform.ps1?token=AAAMrnoBPpBc7C8kN2_haQueWaqDhth-ks5bUGqhwA%3D%3D"],
        "commandToExecute": "powershell.exe -ExecutionPolicy unrestricted -NoProfile -NonInteractive -File Terraform.ps1"
    }
	SETTINGS

  tags {
    environment = "Production"
  }
}

【问题讨论】:

    标签: azure terraform


    【解决方案1】:

    是的,问题是 Git 正在强制执行 TLS 1.2,而扩展程序不喜欢这样,您的解决方法是将文件放在扩展程序可以在无需干预的情况下下载它的地方。 Azure 存储。

    【讨论】:

    • 好的。任何关于包含此 TLS1.2 的扩展更新路线图的链接?
    • 不是我知道的,而是查看它使用 system.web 的错误,所以它要么需要修改它的使用方式,要么等待它升级,这可能不会很快发生跨度>
    猜你喜欢
    • 2021-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多