What is a Terraform Child Module?

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 18

  • @Wahlnetwork
    @Wahlnetwork  4 роки тому +2

    Terraform outputs are critical to understand when creating child modules that must return data to the parent modules. In this quick tutorial, I show an easy example that should make it easy to start using outputs in your child modules!

  • @atexnik
    @atexnik Рік тому +1

    Can a child module call other child module, like so: root module -> child module -> child module? It this OK practice or something we should avoid doing?

  • @newallst
    @newallst 3 роки тому

    Nice one.. Got the concept on the first go watching this video! Cheers.

  • @edv6502
    @edv6502 2 роки тому

    Great clear cut info! Thanks!

  • @arifsultan2009
    @arifsultan2009 2 роки тому

    Great video. Thanks I was looking for this:)

  • @deborah_chrysoprase
    @deborah_chrysoprase 3 роки тому

    Thanks for this video! Most of these tutorials out there show us how to print output variables but not do anything useful with them.

  • @sureshainavilli3377
    @sureshainavilli3377 2 роки тому

    thanks for the useful information

  • @vishwasgupta3180
    @vishwasgupta3180 3 роки тому

    Do you have any video about sending input parameters to the module?

  • @gauravmanshani206
    @gauravmanshani206 2 роки тому

    Thanks for the video. If i have a for_each block how to take outputs from those and use them to create child resources.
    For example- i have to create folders and within that sub folders I have to create sub folders in some folders. How can i use known after apply values such as folder ids to create those sub folders.
    Thanks

  • @George-mk7lp
    @George-mk7lp 3 роки тому

    thanks for your videos.. this is a huge help for beginners.. believe or not

  • @joepinto5066
    @joepinto5066 2 роки тому

    great, q questoin imagien if yoou have 2 child modules, and yo want to send from child 1 to child 2 . Teorical will be like this Value= module.child1.child2.myoutpout, but of course child1.child2 does work, how can we do it , thanks

  • @lordcommander7551
    @lordcommander7551 4 роки тому

    Having an issue and wondering if you mind helping? I am running an aws cli command through local-exec to pull the name of a snapshot for a redshift cluster and put that into a file. I am then trying to call the contents of that file with a data local_file and then use the snapshot name in a cluster build. It seems the data local_file is running before the local-exec, any pointers on how to get around this?

    • @Wahlnetwork
      @Wahlnetwork  4 роки тому

      You could try making the data object dependent on the resource object by using 'depends_on'.

    • @lordcommander7551
      @lordcommander7551 4 роки тому

      @@Wahlnetwork i did that still does the same thing

    • @Wahlnetwork
      @Wahlnetwork  4 роки тому +1

      ☹ That is a bummer. I have not made much use of provisioners - sorry!

  • @vositislomov1404
    @vositislomov1404 3 роки тому

    I used to "terraform plan | terraform apply" commands. But you are using " tf plan | tf apply" how did you make short from "terraform" to "tf" ?

    • @George-mk7lp
      @George-mk7lp 3 роки тому

      You can use this alias to make shortcuts for your commands:
      alias tf='terraform'
      alias tfa='terraform apply'
      alias tfc='terraform console'
      alias tfd='terraform destroy'
      alias tff='terraform fmt'
      alias tfg='terraform graph'
      alias tfim='terraform import'
      alias tfin='terraform init'
      alias tfo='terraform output'
      alias tfp='terraform plan'
      alias tfpr='terraform providers'
      alias tfr='terraform refresh'
      alias tfsh='terraform show'
      alias tft='terraform taint'
      alias tfut='terraform untaint'
      alias tfv='terraform validate'
      alias tfw='terraform workspace'
      alias tfs='terraform state'
      alias tffu='terraform force-unlock'
      alias tfwst='terraform workspace select'
      alias tfwsw='terraform workspace show'
      alias tfssw='terraform state show'
      alias tfwde='terraform workspace delete'
      alias tfwls='terraform workspace list'
      alias tfsls='terraform state list'
      alias tfwnw='terraform workspace new'
      alias tfsmv='terraform state mv'
      alias tfspl='terraform state pull'
      alias tfsph='terraform state push'
      alias tfsrm='terraform state rm'
      alias tfay='terraform apply -auto-approve'
      alias tfdy='terraform destroy -auto-approve'
      alias tfinu='terraform init -upgrade'
      alias tfpde='terraform plan --destroy'
      you have to put them under code . ~/bashrc
      when you type on this on your terminal it will open bashrc file and you could copy paste the commands and exit from instance and start using or without exit also could use them

    • @danielciucur7100
      @danielciucur7100 2 роки тому

      alias tfplan='terraform plan'