Hello! I am working (with <@U07CNGVPMSS> ) on addi...
# contributors
a
Hello! I am working (with @wooden-mechanic-96546 ) on adding the EMR service for a Terraform aws_emr_cluster. In Terraform the aws_emr_instance_group seems like it should become a sub resource (or cost component) of the cluster. Should the related group become a sub resource or should it remain a distinct resource with its own cost? If it should be a sub resource, can someone point me to a best practice/example of that? Thanks!
b
Hello! I've never worked with EMR myself, so I'm not aware of pricing details, sorry. But usually if a resource incurs costs, we make it a separate resource with its own cost components. Subresources are usually those that are declared as a block within the parent resource. An example could be
aws_instance
with
ebs_block_device
blocks.
In case it or the cluster resource need info from each other, it is possible to setup references. Here's an example: https://github.com/infracost/infracost/blob/master/contributing/add_new_resource_guide.md#references-to-other-resources
Hope this helps
a
Thanks, I will take a look.