Justin S
04/17/2023, 3:20 PMError: initializing server: writing generated .git-credentials file with user, token and hostname to /nonexistent/.git-credentials: open /nonexistent/.git-credentials: no such file or directory
PePe Amengual
04/17/2023, 3:27 PMJustin S
04/17/2023, 3:27 PMPePe Amengual
04/17/2023, 3:27 PMJustin S
04/17/2023, 3:27 PMPePe Amengual
04/17/2023, 3:28 PMJustin S
04/17/2023, 3:28 PMPePe Amengual
04/17/2023, 3:29 PMJustin S
04/17/2023, 3:29 PMPePe Amengual
04/17/2023, 3:29 PMJustin S
04/17/2023, 3:29 PMstatefulSet:
securityContext:
fsGroup: 1000
runAsUser: 100
fsGroupChangePolicy: "OnRootMismatch"
PePe Amengual
04/17/2023, 3:31 PMJustin S
04/17/2023, 3:31 PMPePe Amengual
04/17/2023, 3:31 PMJustin S
04/17/2023, 3:31 PM❯ kubectl logs pod/atlantis-0 -n atlantis
{"level":"info","ts":"2023-04-17T15:32:41.901Z","caller":"vcs/gitlab_client.go:110","msg":"determined GitLab is running version 15.10.0","json":{}}
Error: initializing server: writing generated .git-credentials file with user, token and hostname to /nonexistent/.git-credentials: open /nonexistent/.git-credentials: no such file or directory
PePe Amengual
04/17/2023, 3:48 PMJustin S
04/17/2023, 3:49 PMPePe Amengual
04/17/2023, 3:49 PMJustin S
04/17/2023, 3:49 PMPePe Amengual
04/17/2023, 3:49 PMJustin S
04/17/2023, 3:49 PM# Add atlantis user to Debian as well
RUN useradd --create-home --user-group --shell /bin/bash atlantis && \
adduser atlantis root && \
chown atlantis:root /home/atlantis/ && \
chmod g=u /home/atlantis/ && \
chmod g=u /etc/passwd
PePe Amengual
04/17/2023, 3:59 PMJustin S
04/17/2023, 4:00 PMdrwxrwxr-x 5 1001 1001 6.0K Apr 17 15:55 atlantis-data
PePe Amengual
04/17/2023, 4:01 PMJustin S
04/17/2023, 4:05 PMDigest: sha256:5389ae79b49230b8e4c6a305230f69e43f65c0cd4312f3822684880e39fdb47c
Status: Downloaded newer image for <http://ghcr.io/runatlantis/atlantis:v0.23.4-debian|ghcr.io/runatlantis/atlantis:v0.23.4-debian>
error: failed switching to "atlantis": unable to find user atlantis: no matching entries in passwd file
PePe Amengual
04/17/2023, 4:15 PMJustin S
04/17/2023, 4:16 PMDylan Page
04/17/2023, 4:16 PMJustin S
04/17/2023, 4:17 PMPePe Amengual
04/17/2023, 4:27 PMJustin S
04/17/2023, 4:28 PMPePe Amengual
04/17/2023, 4:28 PMJustin S
04/17/2023, 4:28 PMPePe Amengual
04/17/2023, 4:31 PMJustin S
04/17/2023, 4:31 PMPePe Amengual
04/17/2023, 4:31 PMJustin S
04/17/2023, 5:07 PMdrwxrwxr-x 4 atlantis atlantis 6.0K Apr 17 17:07 atlantis-data
PePe Amengual
04/17/2023, 5:12 PMJustin S
04/17/2023, 5:12 PMPePe Amengual
04/17/2023, 5:14 PMJustin S
04/17/2023, 5:15 PM{
"level": "info",
"ts": "2023-04-17T17:10:47.192Z",
"caller": "terraform/terraform_client.go:361",
"msg": "Detected module requires version: 1.4.5",
"json": {
"repo": "sphinx/terraform-aws-infra",
"pull": "75"
}
}
ATLANTIS_DEFAULT_TF_VERSION=v1.3.7
DEFAULT_TERRAFORM_VERSION=1.4.2
PePe Amengual
04/17/2023, 5:17 PMrequired_version
? that version will be usedJustin S
04/17/2023, 5:18 PMrequired_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
required_version = "~> 1.3"
}
environment:
ATLANTIS_DEFAULT_TF_VERSION: v1.3.7
DEFAULT_TERRAFORM_VERSION
even defined in the chartPePe Amengual
04/17/2023, 5:23 PMJustin S
04/17/2023, 5:25 PMrequired_version = "~> 1.3"
should not resolve to 1.4.5NOTE
The Atlantis latest docker imageopen in new window
tends to have recent versions of Terraform, but there may be a delay as new versions are released. The highest version of Terraform allowed in your code is the version specified byin the image your server is running.DEFAULT_TERRAFORM_VERSION
DEFAULT_TERRAFORM_VERSION=1.4.2
required_version = "~> 1.3"
PePe Amengual
04/17/2023, 5:28 PMJustin S
04/17/2023, 5:29 PMDEFAULT_TERRAFORM_VERSION=1.4.2
{
"level": "info",
"ts": "2023-04-17T17:13:23.792Z",
"caller": "models/shell_command_runner.go:156",
"msg": "successfully ran \"/atlantis-data/bin/terraform1.4.5 plan -input=false -refresh -out \\\"/atlantis-data/repos/sphinx/terraform-aws-infra/75/default/us-gov-west-1/qa/network/default.tfplan\\\"\" in \"/atlantis-data/repos/sphinx/terraform-aws-infra/75/default/us-gov-west-1/qa/network\"",
"json": {
"repo": "sphinx/terraform-aws-infra",
"pull": "75"
}
}
❯ cat us-gov-west-1/qa/network/provider.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
required_version = "~> 1.3"
}
The patch is relevant into ensure it matches on only~> 1.3.0
whereas1.3.x
may match to~> 1.3
1.4
PePe Amengual
04/17/2023, 5:35 PMJustin S
04/17/2023, 5:35 PM"terraform_version": "1.3.9",
PePe Amengual
04/17/2023, 5:42 PMDylan Page
04/17/2023, 6:21 PM