-
Notifications
You must be signed in to change notification settings - Fork 1
/
providers.tf
55 lines (48 loc) · 1.32 KB
/
providers.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.53.1"
}
talos = {
source = "siderolabs/talos"
version = "0.5.0"
}
unifi = {
source = "paultyng/unifi"
version = "0.41.0"
}
sops = {
source = "carlpett/sops"
version = "1.0.0"
}
}
backend "s3" {
bucket = "sobrien-home"
key = "infrastructure"
region = "us-east-1"
# To authenticate access to state (does not authenticate the actual terraform commands).
# These credentials also need to have access to the KMS key used to decrypt the keys in ./secrets.sops.yaml.
shared_credentials_file = "./aws-credentials"
}
}
data "sops_file" "provider_credentials" {
source_file = "secrets.sops.yaml"
}
provider "proxmox" {
endpoint = "https://192.168.1.64:8006/api2/json"
api_token = data.sops_file.provider_credentials.data["secrets.proxmox.token"]
insecure = true
ssh {
agent = true
username = "root"
}
}
provider "talos" {}
provider "unifi" {
username = data.sops_file.provider_credentials.data["secrets.unifi.username"]
password = data.sops_file.provider_credentials.data["secrets.unifi.password"]
api_url = "https://192.168.1.1/network/default"
# I don't have certs setup on my unifi controller
allow_insecure = true
}