-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tf
44 lines (35 loc) · 1.09 KB
/
outputs.tf
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
output "base_url" {
value = "http://${aws_instance.gitea.public_ip}:${var.external_port}/"
}
output "empty_repo_url" {
value = "http://${aws_instance.gitea.public_ip}:${var.external_port}/${var.username}/${var.empty_repo_name}.git"
}
output "login_url" {
value = "http://${aws_instance.gitea.public_ip}:${var.external_port}/user/login"
}
output "git_credentials_command" {
value = <<EOF
git config --global user.email ${var.email}
git config --global user.name ${var.username}
git config --global credential.helper store
echo "http://${var.username}:${var.password}@${aws_instance.gitea.public_ip}:${var.external_port}" > ~/.git-credentials
EOF
}
output "username" {
value = var.username
}
output "password" {
value = var.password
}
output "server_ip" {
value = aws_instance.gitea.public_ip
}
output "role_arn" {
value = aws_iam_role.gitea.arn
}
output "cloned_repo_url" {
value = "http://${aws_instance.gitea.public_ip}:${var.external_port}/${var.username}/${basename(var.cloned_repo_source)}.git"
}
output "cloned_repo_name" {
value = trimsuffix(basename(var.cloned_repo_source), ".git")
}