Terraform CLI 登录时出现令牌抛出错误

时间:2021-06-22 14:29:10

标签: terraform

按照登录 Terraform CLI here 的教程进行操作,每次运行 import SwiftUI struct LabelWithColoredIcon: View { enum LabelType { case glyph case systemImage case image } let title: String let icon: String let color: Color let type: LabelType init(title: String, icon: String, color: Color, type: LabelType) { self.title = title self.icon = icon self.color = color self.type = type } var body: some View { Label(title: { Text(title) }, icon: { switch type { case .glyph: Text(icon) .foregroundColor(color) case .systemImage: Image(systemName: icon) .foregroundColor(color) case .image: Image(icon) .foregroundColor(color) } }) } } struct LabelWithColoredIcon_Previews: PreviewProvider { static var previews: some View { LabelWithColoredIcon( title: "Contact Groups", icon: "?", color: .purple, type: .glyph) } } 命令并将生成的 API 密钥粘贴到我的终端时都会收到以下错误:

terraform login

我在这里错过了什么?我还没有在任何地方看到明确的指南来显示此类错误的解决方案,因此我认为在这里提供一个对社区有帮助。 Terraform 版本是 1.0.0。在此先感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我尝试了几种不同的复制方式,但都无法做到。除了可能很愚蠢的事情之外,例如重新启动终端会话,您可能会选择使用 .terraformrc(假设 Linux/MacOS,Windows 上的 terraform.rc)文件通过 credentials 块分配凭据。

有关设置 Terraform 配置文件的详细信息是:here