Created
November 4, 2020 11:42
-
-
Save timarenz/23e54ee5964f88a9d5e5059cea932419 to your computer and use it in GitHub Desktop.
Run Terraform Cloud Agents as Kubernetes deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: terraform-cloud-agent-secret | |
type: Opaque | |
data: | |
tfc_agent_token: dGhpc25lZWRzdG9iZWNoYW5nZWQ= | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: terraform-cloud-agent | |
labels: | |
app: tfc-agent | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: tfc-agent | |
template: | |
metadata: | |
labels: | |
app: tfc-agent | |
spec: | |
containers: | |
- name: tfc-agent | |
image: hashicorp/tfc-agent:latest | |
env: | |
- name: TFC_AGENT_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: TFC_AGENT_TOKEN | |
valueFrom: | |
secretKeyRef: | |
name: terraform-cloud-agent-secret | |
key: tfc_agent_token |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you