Terraform snippets

    The code defines a data block with the name "terraform_remote_state" and assigns it to the variable "${myBackend}" . The contents of the block are specific to the backend "etcd" . The block configures the path to the terraform.tfstate file and the two endpoints to which the terraform.tfstate file should be accessible.

    Shortcut: tf_etcd_backend

    data "terraform_remote_state" "${myBackend}" {
       backend = "etcd"
       config {
           path = "path/to/terraform.tfstate"
           endpoints = "http://one:4001 http://two:4001"
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.