I have a outputs.tf
file under my module directory. And I have a Main.tf
file. When I create a resource and Terraform Apply, the outputs does not display. However, if I don't use modules and create my resources strictly from the Main.tf
file, the outputs shows fine. Is there any different I need to do for my outputs to display when using modules and a separate outputs.tf
file?
Terraform v0.11.14
+ provider.aws v2.19.0
However, if I don't use modules and create my resources strictly from the Main.tf
file, the outputs shows fine.
main.tf
module "identity-provider" {
source = "./modules/identity-provider"
}
module "saml-role1" {
source = "./modules/saml-roles/"
}
===============
module file
resource "aws_iam_role" "role1" {
name = "saml-role1"
description = "Blah Blah"
path = "/"
assume_role_policy = "${data.aws_iam_policy_document.assume_role.json}"
permissions_boundary = ""
max_session_duration = 43200
resource "aws_iam_role_policy_attachment" "Read-Only" {
role = "${aws_iam_role.role1.name}"
policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
}
=================
outputs.tf
output "Role1-ARN" {
value = "${module.saml-role1.arn}"
}