I deployed (via terraform) an IAM user and associated access key, but my attempt at getting the secret key to output is giving me "The state file either has no outputs defined, or all the defined
outputs are empty." The deploy was successful and I can see my keys in the AWS console. What am I doing wrong with the secret key output?
resource "aws_iam_user" "jwr" {
name = "jwr"
}
resource "aws_iam_access_key" "jwr" {
}
output "secret" {
value = "${aws_iam_access_key.jwr.encrypted_secret}"
}
$ terraform output
The state file either has no outputs defined, or all the defined
outputs are empty. Please define an output in your configuration
with the `output` keyword and run `terraform refresh` for it to
become available. If you are using interpolation, please verify
the interpolated value is not empty. You can use the
`terraform console` command to assist.
$ terraform -v
Terraform v0.9.5