Skip to content

Commit 228ccb3

Browse files
author
Victor Getz
committed
Add auto generated password for basic auth
1 parent f882f9d commit 228ccb3

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ source shell-helper.sh
116116
argo
117117
```
118118

119+
After some minutes argocd is also available over your domain like this: https://admin.${TF_VAR_context}.iits.tech
120+
121+
## Save the basic auth credentials
122+
123+
Inside otc-cloud/dev/kubernetes you see there is now a new file which is called *basic-auth-password.txt*
124+
Inside this file you will find the credentials to be able to access your page.
125+
119126
## Go over to Argo and deploy some services
120127

121128
We are finished with the terraform part and will switch now over to this repository: https://github.com/iits-consulting/otc-infrastructure-charts-template

otc-cloud/dev/kubernetes/argo.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ resource "kubernetes_namespace" "argocd" {
1010
}
1111
}
1212

13+
resource "random_password" "basic_auth_password" {
14+
length = 32
15+
special = true
16+
}
17+
1318
resource "helm_release" "argocd" {
1419
depends_on = [
1520
helm_release.custom_resource_definitions, helm_release.otc_storage_classes, helm_release.iits_kyverno_policies
@@ -35,6 +40,7 @@ resource "helm_release" "argocd" {
3540
stage = var.stage
3641
traefikElbId = module.terraform_secrets_from_encrypted_s3_bucket.secrets["elb_id"]
3742
rootDomain = var.domain_name
43+
basicAuthPassword = random_password.basic_auth_password.result
3844
}
3945
git = {
4046
password = var.git_token
@@ -45,4 +51,9 @@ resource "helm_release" "argocd" {
4551
}
4652
)
4753
]
54+
}
55+
56+
resource "local_file" "basic_auth_password" {
57+
filename = "basic-auth-password.txt"
58+
content = "The basic auth credentials for the admin domain are username=admin and password=${random_password.basic_auth_password.result}"
4859
}

0 commit comments

Comments
 (0)