gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
7.83k stars 962 forks source link

Calling module and resource #2065

Open stuartm21 opened 2 years ago

stuartm21 commented 2 years ago

Hi Team,

We have a terraform code block like below, how can we add this in our terragrunt.hcl file? Due to the module name, we got confused with this:

resource "civo_firewall_rule" "http_ingress" {
  firewall_id = module.k3s_test_dev_fra1.firewall_id
  action      = "allow"
  protocol    = "tcp"
  start_port  = "80"
  end_port    = "80"
  cidr        = var.allowed_http_ips
  direction   = "ingress"
  label       = "Web Ingress - HTTP"
}
denis256 commented 2 years ago

Hello, values can be passed through inputs attributes(passed value can be read from dependencies outputs)

https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#inputs

https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#dependencies