Terraform 在云教程中使用变量的问题

Terraform 在云教程中使用变量的问题,terraform,terraform-provider-aws,terraform-cloud,Terraform,Terraform Provider Aws,Terraform Cloud,我正在学习本教程,并成功地将所有内容设置为ok 在对计划进行排队时,我得到了以下与变量相关的错误,并且无法找到它的底部 有人对如何推进这项工作有什么想法吗?谢谢 我希望这将是一个很好的容易起来运行 Configuring remote state backend... Initializing Terraform configuration... Warning: Value for undeclared variable The root module does not declare

我正在学习本教程,并成功地将所有内容设置为ok

在对计划进行排队时,我得到了以下与变量相关的错误,并且无法找到它的底部

有人对如何推进这项工作有什么想法吗?谢谢

我希望这将是一个很好的容易起来运行

Configuring remote state backend...
Initializing Terraform configuration...

Warning: Value for undeclared variable

The root module does not declare a variable named "tag_user_name" but a value
was found in file "/terraform/terraform.tfvars". To use this value, add a
"variable" block to the configuration.

Using a variables file to set an undeclared variable is deprecated and will
become an error in a future release. If you wish to provide certain "global"
settings to all configurations in your organization, use TF_VAR_...
environment variables to set these instead.


Error: No value for required variable

  on variables.tf line 6:
   6: variable "aws_access_key_id" {

The root module input variable "aws_access_key_id" is not set, and has no
default value. Use a -var or -var-file command line argument to provide a
value for this variable.


Error: No value for required variable

  on variables.tf line 10:
  10: variable "aws_secret_access_key" {

The root module input variable "aws_secret_access_key" is not set, and has no
default value. Use a -var or -var-file command line argument to provide a
value for this variable.

似乎您忘记了“配置工作区变量”这一步骤,您需要设置两个环境变量(AWS_SECRET_ACCESS_KEY,AWS_ACCESS_KEY_ID),然后,所有这些都应该按预期工作。

我想我发现了问题-问题出现在示例代码中,此提交应该可以解决:您可以更新GitHub fork,一切都应该按预期进行。