我正在使用下面的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地址,字符串文件名)
知道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" } }
是的,问题是git正在强制执行tls 1.2,而扩展不喜欢这样,您的解决方法是将文件放在扩展不需要干预就能下载的地方。azure存储。