Gabor Maghera
04/21/2023, 1:44 AMoponomarov-tu
04/21/2023, 7:53 AMatlantis apply -p production -- -target='module.infra.module.mssql-1.aws_ebs_volume.disks["xvdi"]'
The reason why I'm asking is because once we commented this on a PR, — Atlantis ran a full apply for the project.
Atlantis version: "version": "v0.23.5 (commit: 9119089) (build date: 2023-04-17T21:36:27.834Z)"
Terraform version: v1.3.7
Atlantis server logs:
{
"@timestamp": "2023-04-21T07:04:12.316Z",
"level": "info",
"ts": "2023-04-21T07:04:12.316Z",
"caller": "events/events_controller.go:545",
"msg": "parsed comment as command=\"apply\" verbose=false dir=\"\" workspace=\"\" project=\"production\" flags=\"-target=module.infra.module.mssql-1.aws_ebs_volume.disks[\\\"xvdi\\\"]\"",
"json": {
"gh-request-id": "X-Github-Delivery=<redacted>"
},
"container_name": "atlantis",
"source": "stderr",
"container_id": "<redacted>",
"ecs_cluster": "atlantis",
"ecs_task_arn": "<redacted>",
"ecs_task_definition": "atlantis:64"
}
Running same targetting without Atlantis works fine.Victor Chan
04/21/2023, 3:38 PMAndrew Dionisio
04/21/2023, 4:23 PMDylan Page
04/21/2023, 7:12 PMstreets
04/23/2023, 9:34 AMoponomarov-tu
04/24/2023, 8:07 AMatlantis apply -- -target='module.infra.aws_security_group_rule.sql-cluster-1433'
) — the PR is closed and merged. When running target for single project — it's all good. Shall I report a bug?Geert Massa
04/24/2023, 12:15 PMversion: 3
automerge: true
delete_source_branch_on_merge: true
parallel_plan: true
parallel_apply: true
projects:
- name: my-project-name
branch: /main/
dir: .
workspace: default
terraform_version: v0.11.0
delete_source_branch_on_merge: true
repo_locking: true
autoplan:
when_modified: ["*.tf", "../modules/**/*.tf"]
enabled: true
plan_requirements: [mergeable, approved, undiverged]
apply_requirements: [mergeable, approved, undiverged]
import_requirements: [mergeable, approved, undiverged]
workflow: myworkflow
workflows:
myworkflow:
plan:
steps:
- run: my-custom-command arg1 arg2
- init
- plan:
extra_args: ["-lock", "false"]
- run: my-custom-command arg1 arg2
apply:
steps:
- run: echo hi
- apply
allowed_regexp_prefixes:
- dev/
- staging/
I'm wondering how i can pass the arg1 and arg2 to Atlantis by running the atlantis plan commandCarlo Schizzo
04/25/2023, 9:53 AM├── prod
│ ├── bucket
│ │ └── terragrunt.hcl
│ ├── common_vars.yaml
│ └── terragrunt.hcl
└── stage
├── bucket
│ └── terragrunt.hcl
├── common_vars.yaml
└── terragrunt.hcl
my `repo_config.json`:
{
"repos": [
{
"id": "<http://bitbucket.workday.com/Build|bitbucket.workday.com/Build> Engineering/terraform-gcp",
"branch": "/master/",
"allowed_overrides": [
"workflow"
],
"allow_custom_workflows": true,
"apply_requirements": [
"approved",
"mergeable"
],
"pre_workflow_hooks": [
{
"run": "cp atlantis/config/atlantis-dev.yaml ./atlantis.yaml",
"description": "getting atlantis configuration for terraform-gcp project"
}
]
}
]
}
finally my atlantis.yaml
version: 3
automerge: false
parallel_apply: false
parallel_plan: false
projects:
- dir: test-atlantis/prod/bucket
workflow: terragrunt
- dir: test-atlantis/stage/bucket
workflow: terragrunt
workflows:
terragrunt:
plan:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: printenv
- run: terragrunt plan -out $PLANFILE
apply:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: terragrunt apply $PLANFILE
Andrew Dionisio
04/25/2023, 1:00 PMvcsSecretName
to use, but I was wondering if there was anything for the githubApp.key in values.yaml?Seth Floyd
04/26/2023, 3:20 PMSeth Floyd
04/27/2023, 5:15 PM# To reference an already existing Secret object with AWS credentials
# awsSecretName: 'mysecretwithawscreds'
Ben Parafina (grimaldi)
04/27/2023, 5:16 PMBen Parafina (grimaldi)
04/27/2023, 5:16 PMSeth Floyd
04/27/2023, 5:17 PMBen Parafina (grimaldi)
04/27/2023, 5:17 PMenvironmentSecrets:
- name: ATLANTIS_GH_APP_KEY
secretKeyRef:
name: atlantis-github-config
key: ATLANTIS_GH_APP_KEY
- name: ATLANTIS_GH_TOKEN
secretKeyRef:
name: atlantis-github-config
key: ATLANTIS_GH_TOKEN
- name: ATLANTIS_GH_WEBHOOK_SECRET
secretKeyRef:
name: atlantis-github-config
key: ATLANTIS_GH_WEBHOOK_SECRET
from the atlantis helm chartBen Parafina (grimaldi)
04/27/2023, 5:18 PMapiVersion: <http://external-secrets.io/v1beta1|external-secrets.io/v1beta1>
kind: ExternalSecret
metadata:
name: atlantis-github-config
spec:
secretStoreRef:
name: secrets
kind: ClusterSecretStore
target:
deletionPolicy: "Retain"
template:
engineVersion: v2
type: Opaque
data:
ATLANTIS_GH_APP_KEY: '{{ .ghe_app_key }}'
ATLANTIS_GH_WEBHOOK_SECRET: '{{ .ghe_webhook_secret }}'
ATLANTIS_GH_TOKEN: '{{ .ghe_token }}'
data:
- secretKey: ghe_webhook_secret
remoteRef:
key: atlantis
property: ghe_webhook_secret
- secretKey: ghe_app_key
remoteRef:
key: atlantis
property: ghe_app_key
- secretKey: ghe_token
remoteRef:
key: atlantis
property: ghe_token
Ben Parafina (grimaldi)
04/27/2023, 5:18 PMBen Parafina (grimaldi)
04/27/2023, 5:18 PMBen Parafina (grimaldi)
04/27/2023, 5:18 PMSeth Floyd
04/27/2023, 5:19 PMBen Parafina (grimaldi)
04/27/2023, 5:20 PMBen Parafina (grimaldi)
04/27/2023, 5:20 PMBen Parafina (grimaldi)
04/27/2023, 5:21 PMBen Parafina (grimaldi)
04/27/2023, 5:21 PMBen Parafina (grimaldi)
04/27/2023, 5:22 PMPePe Amengual
04/27/2023, 5:24 PMVictor Chan
04/27/2023, 10:46 PMVictor Chan
04/27/2023, 10:46 PMVictor Chan
04/27/2023, 10:47 PM{"level":"info","ts":"2023-04-27T22:33:17.984Z","caller":"events/project_command_builder.go:243","msg":"3 projects are to be planned based on their when_modified config","json":{"repo":"REPONAME","pull":"479"}}
{"level":"info","ts":"2023-04-27T223317.984Z","caller":"events/plan_command_runner.go:84","msg":"determined there was no project to run plan in","json":{"repo":"REPONAME","pull":"479"}}