Skip to content

Add include functionality #1478

@chrisferry

Description

@chrisferry

Would like to follow DRY principles with my TF templates.
I currently have:

resource "terraform_remote_state" "vpc" {
    backend = "consul"
    config {
        address = "consul.domain.com"
        path    = "us-east-1/vpc"
        scheme  = "https"
    }
}

resource "terraform_remote_state" "inf-sg" {
    backend = "consul"
    config {
        address = "consul.domain.com"
        path    = "us-east-1/inf-security-groups"
        scheme  = "https"
    }
}

----- at the top of all my templates

would prefer the ability to use:

include "../../common/tf_remotes.tf"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions