Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit 2afa2f8

Browse files
authored
update readme (#1)
Signed-off-by: Carlos Santana <[email protected]>
1 parent ddb9109 commit 2afa2f8

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

README.md

+58
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,64 @@ It handles three aspect of ArgoCD bootstrap
88

99
To be use with [gitops-bridge](https://github.com/gitops-bridge-dev/) project, see example [here](https://github.com/gitops-bridge-dev/gitops-bridge/blob/main/argocd/iac/terraform/examples/eks/hello-world/main.tf)
1010

11+
## Usage
12+
13+
```hcl
14+
15+
locals {
16+
name = "ex-${replace(basename(path.cwd), "_", "-")}"
17+
environment = "dev"
18+
cluster_version = "1.27"
19+
gitops_addons_url = "https://github.com/gitops-bridge-devgitops-bridge-argocd-control-plane-template"
20+
gitops_addons_basepath = ""
21+
gitops_addons_path = "bootstrap/control-plane/addons"
22+
gitops_addons_revision = "HEAD"
23+
24+
oss_addons = {
25+
enable_argo_workflows = true
26+
enable_foo = true # you can add any addon here, make sure to update the gitops repo with the corresponding application set
27+
}
28+
addons = merge(local.oss_addons, { kubernetes_version = local.cluster_version })
29+
30+
addons_metadata = merge(
31+
{
32+
addons_repo_url = local.gitops_addons_url
33+
addons_repo_basepath = local.gitops_addons_basepath
34+
addons_repo_path = local.gitops_addons_path
35+
addons_repo_revision = local.gitops_addons_revision
36+
}
37+
)
38+
39+
argocd_bootstrap_app_of_apps = {
40+
addons = file("${path.module}/bootstrap/addons.yaml")
41+
}
42+
43+
}
44+
45+
###########################################################################
46+
# GitOps Bridge: Metadata
47+
###########################################################################
48+
module "gitops_bridge_metadata" {
49+
source = "github.com/gitops-bridge-dev/gitops-bridge-argocd-metadata-terraform?ref=v1.0.0"
50+
51+
cluster_name = local.name
52+
environment = local.environment
53+
metadata = local.addons_metadata
54+
addons = local.addons
55+
}
56+
57+
###########################################################################
58+
# GitOps Bridge: Bootstrap
59+
###########################################################################
60+
module "gitops_bridge_bootstrap" {
61+
source = "github.com/gitops-bridge-dev/gitops-bridge-argocd-bootstrap-terraform?ref=v1.0.0"
62+
63+
argocd_cluster = module.gitops_bridge_metadata.argocd
64+
argocd_bootstrap_app_of_apps = local.argocd_bootstrap_app_of_apps
65+
}
66+
67+
```
68+
1169
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
1270
## Requirements
1371

tests/complete/main.tf

-1
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,4 @@ module "gitops_bridge_bootstrap" {
7272

7373
argocd_cluster = module.gitops_bridge_metadata.argocd
7474
argocd_bootstrap_app_of_apps = local.argocd_bootstrap_app_of_apps
75-
7675
}

0 commit comments

Comments
 (0)