https://github.com/redhat-developer/argocd-terraform-controller
Argo CD Terraform Controller
https://github.com/redhat-developer/argocd-terraform-controller
Last synced: 7 months ago
JSON representation
Argo CD Terraform Controller
- Host: GitHub
- URL: https://github.com/redhat-developer/argocd-terraform-controller
- Owner: redhat-developer
- Created: 2022-04-02T21:04:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-13T19:23:15.000Z (over 2 years ago)
- Last Synced: 2025-06-20T04:38:31.554Z (7 months ago)
- Language: Go
- Size: 123 KB
- Stars: 27
- Watchers: 7
- Forks: 7
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# argocd-terraform-controller
Argo CD Terraform Controller
Start by creating an argocd cluster with the terraform-generate plugin
installed.
```
kubectl create ns argocd
kubectl apply -k terraform-generate/kustomize-core-install -n argocd
kubectl config set-context --current --namespace=argocd
```
Create the ArgoCD Terraform controller from the yaml:
```
kubectl apply -f controller.yaml
```
Now, create an ArgoCD app that uses the terraform-generate plugin, the repository should contain
the terraform manifests you want to track:
```
argocd app create terraform-test --repo --path --dest-server https://kubernetes.default.svc --dest-namespace argocd --config-management-plugin argocd-terraform-generator
```
Sync the application to run the plugin and update the local terraform manifests
```
argocd app sync terraform-test
```
### Dev
To generate controller.yaml:
```
# install controller-gen and kustomize
make controller-gen
make kustomize
mkdir bin
cp ~/path/to/controller-gen bin/
cp ~/path/to/kustomize bin/
IMG= make deploy-file
```
To build controller and worker images and push them:
```
IMG=quay.io/jsawaya/argocd-tf-controller:latest make podman-build-no-test
IMG=quay.io/jsawaya/argocd-tf-controller:latest make podman-push
IMG=quay.io/jsawaya/terraform-controller-worker:latest make podman-build-worker-no-test
IMG=quay.io/jsawaya/terraform-controller-worker:latest make podman-push
```