Skip to content

Notes on Organization Terraform Script

Richard Hightower edited this page Nov 28, 2017 · 2 revisions

Initial plan for terraform.

tf-organization/outputs.tf

output "tags" {
  description = "Tags used to tag resources like EC2 instances, ELBs, etc."
  value = {
    CostCenter = "${var.cost-center}",
    CIG = "${var.ci-group}",
    OwnerContact = "${var.owner_contact}"

  }
}

output owner_contact {
  description = "Team contact"
  value = "${var.owner_contact}"
}

output ci-group {
  description = "CIG CI for the stack"
  value = "${var.ci-group}"
}

output cost-center {
  description = "CostCenter tag"
  value = "${var.cost-center}"
}

tf-organization/variables.tf

variable "owner_contact" {
  description = "Team contact"
}

variable "ci-group" {
  description = "CIG CI for the stack"
}

variable "cost-center" {
  description = "CostCenter tag"
}


tf-organization/test/main.tf

module "organization" {
  //source = "git::https://github.shc.cloudurable.com/jpAzar/tf-organization"
  source = "../"
  cost-center = "ENVNPShoppingCart"
  ci-group = "CIGShoppingCart"
  owner_contact = "[email protected]"
}

output "tags" {
  value = "${module.organization.tags}"
}
Clone this wiki locally