@@ -18,18 +18,6 @@ provider "helm" {
18
18
}
19
19
}
20
20
21
- provider "kubectl" {
22
- host = module. eks . cluster_endpoint
23
- cluster_ca_certificate = base64decode (module. eks . cluster_certificate_authority_data )
24
- exec {
25
- api_version = " client.authentication.k8s.io/v1beta1"
26
- args = [" eks" , " get-token" , " --cluster-name" , module . eks . cluster_name , " --region" , local . region ]
27
- command = " aws"
28
- }
29
- load_config_file = false
30
- apply_retry_count = 15
31
- }
32
-
33
21
provider "kubernetes" {
34
22
host = module. eks . cluster_endpoint
35
23
cluster_ca_certificate = base64decode (module. eks . cluster_certificate_authority_data )
@@ -111,7 +99,7 @@ locals {
111
99
velero_backup_s3_bucket_name = try (local. velero_backup_s3_bucket_name , " " ) } : {} # Required when enabling addon velero
112
100
)
113
101
114
- argocd_bootstrap_app_of_apps = {
102
+ argocd_apps = {
115
103
addons = file (" ${ path . module } /bootstrap/addons.yaml" )
116
104
workloads = file (" ${ path . module } /bootstrap/workloads.yaml" )
117
105
}
@@ -129,26 +117,19 @@ locals {
129
117
velero_backup_s3_bucket_prefix = " backups"
130
118
}
131
119
132
- # ###############################################################################
133
- # GitOps Bridge: Metadata
134
- # ###############################################################################
135
- module "gitops_bridge_metadata" {
136
- source = " github.com/gitops-bridge-dev/gitops-bridge-argocd-metadata-terraform?ref=v1.0.0"
137
-
138
- cluster_name = module. eks . cluster_name
139
- environment = local. environment
140
- metadata = local. addons_metadata
141
- addons = local. addons
142
- }
143
-
144
120
# ###############################################################################
145
121
# GitOps Bridge: Bootstrap
146
122
# ###############################################################################
147
123
module "gitops_bridge_bootstrap" {
148
- source = " github.com/gitops-bridge-dev/gitops-bridge-argocd-bootstrap-terraform?ref=v1 .0.0"
124
+ source = " github.com/gitops-bridge-dev/gitops-bridge-argocd-bootstrap-terraform?ref=v2 .0.0"
149
125
150
- argocd_cluster = module. gitops_bridge_metadata . argocd
151
- argocd_bootstrap_app_of_apps = local. argocd_bootstrap_app_of_apps
126
+ cluster = {
127
+ cluster_name = module.eks.cluster_name
128
+ environment = local.environment
129
+ metadata = local.addons_metadata
130
+ addons = local.addons
131
+ }
132
+ apps = local. argocd_apps
152
133
}
153
134
154
135
@@ -198,29 +179,6 @@ module "eks_blueprints_addons" {
198
179
s3_backup_location = " ${ try (module. velero_backup_s3_bucket . s3_bucket_arn , " " )} /${ local . velero_backup_s3_bucket_prefix } "
199
180
}
200
181
201
- eks_addons = {
202
- aws-ebs-csi-driver = {
203
- most_recent = true
204
- service_account_role_arn = module.ebs_csi_driver_irsa.iam_role_arn
205
- }
206
- coredns = {
207
- most_recent = true
208
-
209
- timeouts = {
210
- create = " 25m"
211
- delete = " 10m"
212
- }
213
- }
214
- kube-proxy = {}
215
- /* adot needs to be installed after cert-manager is installed with gitops, uncomment once cluster addons are deployed
216
- adot = {
217
- most_recent = true
218
- service_account_role_arn = module.adot_irsa.iam_role_arn
219
- }
220
- */
221
- aws-guardduty-agent = {}
222
- }
223
-
224
182
tags = local. tags
225
183
}
226
184
@@ -285,6 +243,26 @@ module "eks" {
285
243
}
286
244
})
287
245
}
246
+ aws-ebs-csi-driver = {
247
+ most_recent = true
248
+ service_account_role_arn = module.ebs_csi_driver_irsa.iam_role_arn
249
+ }
250
+ coredns = {
251
+ most_recent = true
252
+
253
+ timeouts = {
254
+ create = " 25m"
255
+ delete = " 10m"
256
+ }
257
+ }
258
+ kube-proxy = {}
259
+ /* adot needs to be installed after cert-manager is installed with gitops, uncomment once cluster addons are deployed
260
+ adot = {
261
+ most_recent = true
262
+ service_account_role_arn = module.adot_irsa.iam_role_arn
263
+ }
264
+ */
265
+ aws-guardduty-agent = {}
288
266
}
289
267
tags = local. tags
290
268
}
0 commit comments