目标:我想打印出 的敏感值foo_resource.name.sensitive_field。
最初我尝试创建一个输出:
\noutput "password" {\n value = foo_resource.name.sensitive_field\n}\nRun Code Online (Sandbox Code Playgroud)\n我得到了
\n Error: Output refers to sensitive values\n\xe2\x94\x82 \n\xe2\x94\x82 on main.tf line 186:\n\xe2\x94\x82 186: output "password" {\n\xe2\x94\x82 \n\xe2\x94\x82 To reduce the risk of accidentally exporting sensitive data that was intended to be only internal, Terraform requires that any root module output containing sensitive data be\n\xe2\x94\x82 explicitly marked as sensitive, to confirm your intent.\n\xe2\x94\x82 \n\xe2\x94\x82 If you do intend to export this data, annotate the …Run Code Online (Sandbox Code Playgroud) terraform ×1