Skip to content

Commit 0b83ba4

Browse files
committedDec 26, 2019
Update README file
1 parent f7845cb commit 0b83ba4

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed
 

‎README.md

+37-8
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,53 @@ You need to have `helm` version 3 binary installed locally
1212
## Sample usage
1313

1414
```hcl-terraform
15-
module "aks" {
16-
source = "jacops/aks-cluster/azurerm"
17-
version = "0.1.1"
15+
data "aws_eks_cluster" "cluster" {
16+
name = module.eks.cluster_id
17+
}
18+
19+
data "aws_eks_cluster_auth" "cluster" {
20+
name = module.eks.cluster_id
21+
}
22+
23+
provider "kubernetes" {
24+
host = data.aws_eks_cluster.cluster.endpoint
25+
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority.0.data)
26+
token = data.aws_eks_cluster_auth.cluster.token
27+
load_config_file = false
28+
version = "~> 1.9"
29+
}
30+
31+
module "my-cluster" {
32+
source = "terraform-aws-modules/eks/aws"
33+
cluster_name = "my-cluster"
34+
cluster_version = "1.14"
35+
subnets = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"]
36+
vpc_id = "vpc-1234556abcdef"
1837
19-
location = "uksouth"
38+
worker_groups = [
39+
{
40+
instance_type = "m4.large"
41+
asg_max_size = 5
42+
}
43+
]
2044
}
2145
2246
module "fluxcd" {
2347
source = "jacops/fluxcd/kubernetes"
24-
version = "0.1.0"
48+
version = "0.2.0"
2549
26-
kube_config_raw = module.aks.cluster.kube_config_raw
27-
git_url = "git@github.com:jacops/cicd-cluster-state.git"
50+
kubeconfig_filename = module.eks.kubeconfig_filename
51+
generate_ssh_key = true
52+
flux_values = {
53+
git = {
54+
pollInterval: "1m"
55+
}
56+
}
2857
}
2958
3059
resource "github_repository_deploy_key" "aks_cluster_state" {
3160
key = module.fluxcd.git_ssh_public_key
3261
repository = "cicd-cluster-state"
33-
title = "aks_cluster_state"
62+
title = "eks_cluster_state"
3463
}
3564
```

0 commit comments

Comments
 (0)