-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclusterprofile.tf
More file actions
145 lines (117 loc) · 3.99 KB
/
clusterprofile.tf
File metadata and controls
145 lines (117 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# If looking up a cluster profile instead of creating a new one
# data "spectrocloud_cluster_profile" "profile" {
# # id = <uid>
# name = "eks-basic"
# }
#
# locals {
# profile_ids = {
# ProdEKS-1 = spectrocloud_cluster_profile.this.id
# # for k, v in spectrocloud_cluster_profile.this :
# # v.name => v.id
# }
# }
data "spectrocloud_pack" "argo-cd" {
name = "argo-cd"
version = "3.3.5"
}
data "spectrocloud_pack" "aws-ssm-agent" {
name = "aws-ssm-agent"
version = "1.0.0"
}
# data "spectrocloud_pack" "spectro-rbac" {
# name = "spectro-rbac"
# version = "1.0.0"
# }
data "spectrocloud_pack" "csi" {
name = "csi-aws"
version = "1.0.0"
}
data "spectrocloud_pack" "cni" {
name = "cni-aws-vpc-eks"
version = "1.0"
}
data "spectrocloud_pack" "k8s" {
name = "kubernetes-eks"
version = "1.19"
}
data "spectrocloud_pack" "ubuntu" {
name = "amazon-linux-eks"
version = "1.0.0"
}
resource "spectrocloud_cluster_profile" "this" {
name = "ProdEKS-1"
description = "basic eks cp"
cloud = "eks"
type = "cluster"
pack {
name = data.spectrocloud_pack.ubuntu.name
tag = data.spectrocloud_pack.ubuntu.version
uid = data.spectrocloud_pack.ubuntu.id
values = data.spectrocloud_pack.ubuntu.values
}
pack {
name = data.spectrocloud_pack.k8s.name
tag = data.spectrocloud_pack.k8s.version
uid = data.spectrocloud_pack.k8s.id
values = <<-EOT
#EKS settings
managedControlPlane:
#Controlplane Logging
logging:
# Setting to toggle Kubernetes API Server logging (kube-apiserver)
apiServer: false
# Setting to toggle the Kubernetes API audit logging
audit: false
# Setting to toggle the cluster authentication logging
authenticator: false
# Setting to toggle the controller manager (kube-controller-manager) logging
controllerManager: false
# Setting to toggle the Kubernetes scheduler (kube-scheduler) logging
scheduler: false
# OIDC related config
# Uncomment below section when the EKS cluster has to be setup with OIDC authentication.
# Note : Leave the param values in this config as is, so that validation for these params will happen during cluster provisioning
oidcIdentityProvider:
#The name of the OIDC provider configuration
identityProviderConfigName: oidc1
# The ID for the client application that makes authentication requests to the OpenID identity provider
clientId: 5ajs8pq0gatbgpjejld96fldrn
#The URL of the OpenID identity provider that allows the API server to discover public signing keys for verifying tokens
issuerUrl: https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ajvPoziaS
usernamePrefix: "-"
usernameClaim: email
groupsClaim: cognito:groups
EOT
}
pack {
name = data.spectrocloud_pack.cni.name
tag = data.spectrocloud_pack.cni.version
uid = data.spectrocloud_pack.cni.id
values = data.spectrocloud_pack.cni.values
}
pack {
name = data.spectrocloud_pack.csi.name
tag = data.spectrocloud_pack.csi.version
uid = data.spectrocloud_pack.csi.id
values = data.spectrocloud_pack.csi.values
}
pack {
name = data.spectrocloud_pack.aws-ssm-agent.name
tag = data.spectrocloud_pack.aws-ssm-agent.version
uid = data.spectrocloud_pack.aws-ssm-agent.id
values = data.spectrocloud_pack.aws-ssm-agent.values
}
# pack {
# name = data.spectrocloud_pack.spectro-rbac.name
# tag = data.spectrocloud_pack.spectro-rbac.version
# uid = data.spectrocloud_pack.spectro-rbac.id
# values = "# RBAC Permissions specified at the cluster level"
# }
pack {
name = data.spectrocloud_pack.argo-cd.name
tag = data.spectrocloud_pack.argo-cd.version
uid = data.spectrocloud_pack.argo-cd.id
values = data.spectrocloud_pack.argo-cd.values
}
}