如果配置了多种身份方式的话有时候比较难找自己在terraform 中使用的身份是什么
可以使用这个tf 来输出
data "aws_caller_identity" "current" {}
output "account_id" {
value = data.aws_caller_identity.current.account_id
}
output "caller_arn" {
value = data.aws_caller_identity.current.arn
}
output "caller_user" {
value = data.aws_caller_identity.current.user_id
}
之后可以在state list 中看到这个信息
state show 就能查