Discover Packages
github.com/finarfin/terraform-provisioner-salt-highstate
command
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Feb 8, 2020
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
salt-highstate
is a Terraform 0.12 provisioner that waits for a minion to connect to the master and applies highstate then reports whether it completed successfully.
The intended use-case is to integrate Terraform and SaltStack:
Create minion keys on master using terraform-provider-salt
Configure and initialize Salt Minion using cloud-init .
Add salt-highstate provisioner to your manifests.
Terraform will create the machines, execute the provisioner and will only complete when the highstate is successfully applied.
terraform-provisioner-salt-highstate requires Go version 1.13 or greater.
Usage
Installation
Download the binary for your platform to Terraform plugins path .
Windows: %AppData%\terraform.d\plugins
Linux: ~/.terraform.d/plugins
Configure CherryPy NetAPI module on SaltStack master. See setup section of Saltstack documentation for instructions.
Add the provisioner to one of your resources. See the example manifest
Configuration
Name
Type
Required
Remarks
address
String
Required
URL to the CherryPy NetAPI endpoint (e.g.: https://saltmaster:8000 )
password
String
Required
Password
backend
String
Required
External authentincation backend (eauth) (e.g.: pam)
minion_id
String
Required
Minion ID
skip_verify
Bool
Optional
Skip TLS/SSL verifications (Default: false)
timeout_minutes
Int
Optional
No of minutes to wait for minion to become available (Default: 30 mins)
interval_secs
Int
Optional
Interval in seconds to poll minion status from master (Default: 10 secs)
Example
resource "null_resource" "test" {
triggers = {
hostname = "minion${count.index+1}"
}
provisioner "salt-highstate" {
address = "https://salt-master:8000"
username = "test"
password = "test"
backend = "pam"
minion_id = self.triggers.hostname
}
count = 2
}
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.