diff --git a/outputs.tf b/outputs.tf index 7e4c4b2..938e908 100644 --- a/outputs.tf +++ b/outputs.tf @@ -16,10 +16,10 @@ output "ldap_dn" { output "instance_profile_arn" { description = "Created instance profile ARN, if enabled" - value = var.enable_instance_profile ? aws_iam_instance_profile.role[0].arn : "" + value = var.create && var.enable_instance_profile ? aws_iam_instance_profile.role[0].arn : "" } output "instance_profile_name" { description = "Created instance profile name, if enabled" - value = var.enable_instance_profile ? aws_iam_instance_profile.role[0].name : "" + value = var.create && var.enable_instance_profile ? aws_iam_instance_profile.role[0].name : "" }