Slackbot
10/19/2023, 8:28 AMGabriel Martinez
10/19/2023, 9:17 AMBruno Schaatsbergen
10/19/2023, 9:20 AMBruno Schaatsbergen
10/19/2023, 9:20 AMBruno Schaatsbergen
10/19/2023, 9:21 AMBruno Schaatsbergen
10/19/2023, 9:21 AMBruno Schaatsbergen
10/19/2023, 9:22 AMatlantis unlockBruno Schaatsbergen
10/19/2023, 9:22 AMBruno Schaatsbergen
10/19/2023, 9:22 AMGabriel Martinez
10/19/2023, 9:24 AMBruno Schaatsbergen
10/19/2023, 9:25 AMBruno Schaatsbergen
10/19/2023, 9:25 AMBruno Schaatsbergen
10/19/2023, 9:26 AMBruno Schaatsbergen
10/19/2023, 9:26 AMBruno Schaatsbergen
10/19/2023, 9:27 AMBruno Schaatsbergen
10/19/2023, 9:28 AMGabriel Martinez
10/19/2023, 9:31 AMGabriel Martinez
10/19/2023, 9:35 AMGabriel Martinez
10/19/2023, 9:39 AMBruno Schaatsbergen
10/19/2023, 10:09 AMBruno Schaatsbergen
10/19/2023, 10:09 AM-out beforeBruno Schaatsbergen
10/19/2023, 10:09 AMBruno Schaatsbergen
10/19/2023, 10:10 AMversion: 3
automerge: true
abort_on_execution_order_fail: true
parallel_plan: true
parallel_apply: true
projects:
- name: gcp-tf-xxxxx-dev
dir: .
workflow: gcp-tf-xxxxx-dev
autoplan:
enabled: true
terraform_version: 1.5.0
execution_order_group: 1
- name: gcp-tf-xxxxx-test
dir: .
workflow: gcp-tf-xxxxx-test
autoplan:
enabled: true
terraform_version: 1.5.0
execution_order_group: 2
- name: gcp-tf-xxxxx-acc
dir: .
workflow: gcp-tf-xxxxx-acc
autoplan:
enabled: true
terraform_version: 1.5.0
execution_order_group: 3
- name: gcp-tf-xxxxx-prod
dir: .
workflow: gcp-tf-xxxxx-prod
autoplan:
enabled: true
terraform_version: 1.5.0
execution_order_group: 4Bruno Schaatsbergen
10/19/2023, 10:10 AMBruno Schaatsbergen
10/19/2023, 10:11 AMBruno Schaatsbergen
10/19/2023, 10:11 AMBruno Schaatsbergen
10/19/2023, 10:11 AMgcp-tf-xxxxx-dev:
plan:
steps:
- env:
name: GOOGLE_IMPERSONATE_SERVICE_ACCOUNT
value: <mailto:xxxxx@xxxxx.com|xxxxx@xxxxx.com>
- run: rm -rf .terraform
- init:
extra_args:
[
"-lock=false",
"-backend-config=env/dev/vars/backend-config.tfvars",
]
- plan:
extra_args: ["-lock=false", "-var-file=env/dev/vars/vars.tfvars"]Gabriel Martinez
10/19/2023, 11:14 AMBruno Schaatsbergen
10/19/2023, 11:14 AMGabriel Martinez
10/19/2023, 11:15 AMGabriel Martinez
10/19/2023, 11:15 AM// The locks controller currently has no implementation of Atlantis project names, so this is hardcoded to an empty string.
projectName := ""Gabriel Martinez
10/19/2023, 11:16 AMremoveErr := l.WorkingDir.DeletePlan(lock.Pull.BaseRepo, lock.Pull, lock.Workspace, lock.Project.Path, projectName)Gabriel Martinez
10/19/2023, 11:17 AMGabriel Martinez
10/19/2023, 11:17 AM// GetPlanFilename returns the filename (not the path) of the generated tf plan
// given a workspace and project name.
func GetPlanFilename(workspace string, projName string) string {
if projName == "" {
return fmt.Sprintf("%s.tfplan", workspace)
}
projName = strings.Replace(projName, "/", planfileSlashReplace, -1)
return fmt.Sprintf("%s-%s.tfplan", projName, workspace)
}Gabriel Martinez
10/19/2023, 11:19 AMprojName is empty, so the filename will always be %s.tfplan, but in your case it should’ve been %s-%s.tfplan like you show on you plan commandGabriel Martinez
10/19/2023, 11:20 AMBruno Schaatsbergen
10/19/2023, 11:23 AMBruno Schaatsbergen
10/19/2023, 11:23 AMBruno Schaatsbergen
10/19/2023, 11:24 AMGabriel Martinez
10/19/2023, 11:25 AMGabriel Martinez
10/19/2023, 11:27 AMl.Locker.Unlock(id), that runs before deletePlan still succeeds and the plan file is left behind. Eventually if you plan, the old plan file gets overridden. Could you confirm that with a test?oponomarov-tu
10/19/2023, 12:51 PMAmina
10/19/2023, 2:29 PMBruno Schaatsbergen
10/20/2023, 12:55 AMRB
10/20/2023, 4:45 AM