FalcoSuessgott / terraform-provider-dotfiles

A terraform provider for linking and copying files across the filesystem, useful as a dotfile manager

Home Page:https://registry.terraform.io/providers/FalcoSuessgott/dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraform-provider-dotfiles

still work in progress

An experimental terraform provider for linking and copying files across the filesystem, aimed to be used as a dotfile manager

Why

  • terraform comes with a clean and flexible HCL syntax including lots in integrations like vscode-plugins, linter etc.
  • rich featureset of predefined functions useful for customizing and automating your dotfile setup
  • can be combined with more than 1000 other useful provider, such as docker, restapi and many other
  • state based, which can be used to deploy your dotfiles across many machines and reset them to a certain state

Example

terraform {
  required_providers {
    dotfiles = {
      source  = "FalcoSuessgott/dotfiles"
      version = "0.0.1"
    }
  }
}

provider "dotfiles" {}

resource "dotfiles_link_file" "bashrc" {
  src  = abspath("configs/bashrc")
  dest = pathexpand("~/.bashrc")
}

resource "dotfiles_copy_file" "zshrc" {
  src  = abspath("configs/zshrc")
  dest = pathexpand("~/.zshrc")
}

resource "dotfiles_copy_file" "aliases" {
  content = <<EOT
alias ll="ls -la"
EOT

  dest = pathexpand("~/.bash_aliases")
}

About

A terraform provider for linking and copying files across the filesystem, useful as a dotfile manager

https://registry.terraform.io/providers/FalcoSuessgott/dotfiles

License:GNU General Public License v3.0


Languages

Language:Go 83.6%Language:Makefile 10.4%Language:HCL 6.1%