Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the output instance_class #111

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ output "security_group_name" {
description = "Name of the DocumentDB cluster Security Group"
value = join("", aws_security_group.default[*].name)
}

output "instance_class" {
description = "The instance calss used by the DocumentDB Cluster. For more details, see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-classes.html#db-instance-class-specs"
value = distinct([for instance in aws_docdb_cluster_instance.default : instance.instance_class])[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Faris96Hub how is this different from var.instance_class? Or is not different and you're using the default of that value, so you need it as an output? If the latter... can we just output var.instance_class instead of adding this looping logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not using the default but using var.instance_class would be an option too, to avoid the loop. Ill change it

}
Gowiem marked this conversation as resolved.
Show resolved Hide resolved