Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 1.37 KB

resources.md

File metadata and controls

70 lines (52 loc) · 1.37 KB

Resources

File

template

Rather than building our own implementation, use Terraform's templatefile function.

locals {
  content = templatefile("${path.module}/policy.tpl", {
    name = "foo"
  })
}

resource "local_file" "policy" {
  content  = local.content
  filename = "${path.module}/policy.ini"
}

System

Group

provider "terrable" {}

resource "terrable_group" "sudo" {
  name  = "sudo"
}

Arguments

  • name - The name of the group (string)
  • gid (Optional) - Use GID for the new group (string)

User

provider "terrable" {}

resource "terrable_user" "tomcat" {
  name  = "tomcat"
  shell = "/bin/zsh"
}

Arguments

  • name - The name of the user (string)
  • shell - Login shell of the new account (string)
  • directory (Optional) - Home directory of the new account (string)
  • groups (Optional) - List of supplementary groups of the new account (list)
  • system (Optional) - Create a system account (bool)
  • uid (Optional) - User ID of the new account (string)
  • gid (Optional) - Name or ID of the primary group of the new account (string)