Terraform Provider for (Operating) System
Releases: registry.terraform.io
Documentation: registry.terraform.io
Discuss: github.com/discussions
The Terraform Provider for (Linux Operating) System allows managing files, directories, users, groups, packages, and services on remote servers on operating system level agent-less via SSH.
Even in a cloud-native heaven
☁️ , there will still be use cases for pets🐈
Highlights
- Manage files, directories, users, groups, packages, and services on remote servers
- Connect to and authenticate with remote servers via SSH
- No agent on remote server required
- Seamless integration with Terraform providers of all major IaaS cloud providers
- Support for Debian, Alpine, and Fedora Linux confirmed via acceptance test suite
Quick Starts
Use Cases
The provider aims to allow configuring individual remote servers according to mutable infrastructure approach. You might find your use case in the following non-exhaustive list:
- Individual servers or virtual machines which are not recreated when configuration changes
- Share or distribute server or virtual machine configuration as using Terraform modules
The provider is not suitable for immutable infrastructure approaches such as fleets of homogeneous virtual machines. In this case, you may consider a more suitable configuration mechanism.
User documentation
Refer to the comprehensive user documentation of the provider in the Terraform Registry.
Frequently Asked Questions
Responses to the most frequently asked questions can be found in the FAQ.
Requirements
- Terraform 0.12+
Add data source system file
I added a data_source system_file.
I like the approach of the terraform provider system, since it has the potential to replace the need of cloud-init and ansible. I started documenting the possibilities for replacing ansible with terraform on https://wikijs.with.de/de/Computing/Terraform-Ansible#terraform-equivalents-to-ansible-modules.
Reading the stats of files is often part of configurations with ansible for ensuring idempotence für shell command.