mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:34:33 +07:00
refactor(external): just use nvim to edit tfvars
The previous setup using Ansible is kinda unessesary since it just edit the same tfvars file.
This commit is contained in:
parent
6def3d1ea7
commit
5915ebb9d1
@ -6,11 +6,12 @@ default: apply
|
||||
terraform login
|
||||
|
||||
terraform.tfvars:
|
||||
ansible-playbook tfvars.yml
|
||||
cp terraform.tfvars.example ${@}
|
||||
nvim ${@}
|
||||
|
||||
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
|
||||
terraform init
|
||||
touch .terraform.lock.hcl
|
||||
touch ${@}
|
||||
|
||||
namespaces:
|
||||
ansible-playbook namespaces.yml
|
||||
|
9
external/terraform.tfvars.example
Normal file
9
external/terraform.tfvars.example
Normal file
@ -0,0 +1,9 @@
|
||||
# https://dash.cloudflare.com/profile
|
||||
cloudflare_email = "myaccount@example.com"
|
||||
# https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids
|
||||
cloudflare_account_id = "foobarid"
|
||||
# https://dash.cloudflare.com/profile/api-tokens
|
||||
cloudflare_api_key = "foobarkey"
|
||||
|
||||
# https://my.zerotier.com/account
|
||||
zerotier_central_token = "foobartoken"
|
@ -1,4 +0,0 @@
|
||||
cloudflare_email = "{{ cloudflare_email }}"
|
||||
cloudflare_api_key = "{{ cloudflare_api_key }}"
|
||||
cloudflare_account_id = "{{ cloudflare_account_id }}"
|
||||
zerotier_central_token = "{{ zerotier_central_token }}"
|
@ -1,18 +0,0 @@
|
||||
- name: Bootstrap external secrets
|
||||
hosts: localhost
|
||||
vars_prompt:
|
||||
- name: cloudflare_email
|
||||
prompt: Enter Cloudflare email
|
||||
private: false
|
||||
- name: cloudflare_api_key
|
||||
prompt: Enter Cloudflare API Key (sensitive)
|
||||
- name: cloudflare_account_id
|
||||
prompt: Enter Cloudflare account ID
|
||||
private: false
|
||||
- name: zerotier_central_token
|
||||
prompt: Enter ZeroTier Central API Token
|
||||
tasks:
|
||||
- name: Render environment file
|
||||
template:
|
||||
src: ./terraform.tfvars.j2
|
||||
dest: ./terraform.tfvars
|
Loading…
Reference in New Issue
Block a user