Replies: 4 comments 5 replies
-
not the same limitation, since you are doing this in one workflow.
you will need to run `atlantis plan` after push to get a new plan,
otherwise the old plan will not be discarded unless you have autoplan
enabled.
…On Tue, Jan 31, 2023 at 1:17 PM Andy Shinn ***@***.***> wrote:
This might be similar to #2690
<#2690>. I am trying
to use https://github.com/bridgecrewio/yor to tag resources before the
plan. But the plan only picks up the initial changes. If I push again, yor
runs as desired, but the changes of the second plan are not shown (only the
first initial changes show).
My config looks like:
default-tf-version: v1.2.3
repos:
- id: /.*/
allowed_overrides:
- apply_requirements
- workflow
apply_requirements:
- undiverged
workflows:
yor:
plan:
steps:
- init
- env:
name: YOR_SIMPLE_TAGS
command: >
echo "'{\"pull_num\": \"$PULL_NUM\", \"pull_author\": \"$PULL_AUTHOR\", \"terraform_workspace\": \"$WORKSPACE\"}'"
- run: yor tag --tag-groups git,simple -d $DIR
- plan
Is this the same limitation or am I missing something for the plan to pick
up the changes to the files?
—
Reply to this email directly, view it on GitHub
<#3088>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERCYPCCYGBLHJKW32EDWVF6NBANCNFSM6AAAAAAUM5VQHM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
do you have a custom workflow? can you paste it?
…On Thu, Feb 2, 2023 at 10:04 AM Andy Shinn ***@***.***> wrote:
I am running a new plan. The issue is that it doesn't pick up changes to
the files the second time the custom command runs. I can see it tags all
the files. But the plan shows old values like it is not using the updated
files for some reason.
—
Reply to this email directly, view it on GitHub
<#3088 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3EREPPX4VGPNR24QOW63WVPZJLANCNFSM6AAAAAAUM5VQHM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
yor is not deleting files or anything like that?
if for some reason the PLANFILE is modified then it could lead to the
problem you are having
…On Thu, Feb 2, 2023 at 1:50 PM Andy Shinn ***@***.***> wrote:
Yes, my configuration looks like:
default-tf-version: v1.2.3
repos:
- id: /.*/
allowed_overrides:
- apply_requirements
- workflow
apply_requirements:
- undiverged
workflows:
yor:
plan:
steps:
- init
- env:
name: YOR_SIMPLE_TAGS
command: >
echo "'{\"pull_num\": \"$PULL_NUM\", \"pull_author\": \"$PULL_AUTHOR\", \"terraform_workspace\": \"$WORKSPACE\"}'"
- run: yor tag --tag-groups git,simple -d $DIR
- plan
And local repo config is:
version: 3
parallel_plan: true
parallel_apply: true
projects:
- name: myproj
dir: terraform/myproj
workflow: yor
autoplan:
when_modified: ["*.tf", "../modules/**/*.tf", "modules/**/*.tf"]
enabled: true
—
Reply to this email directly, view it on GitHub
<#3088 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERDX7ATWF6GYUYYUVMDWVQTZRANCNFSM6AAAAAAUM5VQHM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
-
are you running thins in pre_workflow_hooks?
…On Fri, Feb 3, 2023 at 3:33 PM Andy Shinn ***@***.***> wrote:
Is it possible the environment variables for tasks are not getting set
when manually running a plan? I am now noticing it seems to work when I
push to the branch and the output is as expected:
~ resource "aws_s3_bucket" "terraform_backend_s3_bucket" {
id = "gov-terraform-state-backend"
~ tags = {
+ "pull_author" = "andyshinn"
+ "pull_num" = "413"
+ "terraform_workspace" = "default"
# (2 unchanged elements hidden)
}
But if I do a atlantis plan I get:
~ resource "aws_s3_bucket" "terraform_backend_s3_bucket" {
id = "gov-terraform-state-backend"
~ tags = {
+ "pull_author" = "$PULL_AUTHOR"
+ "pull_num" = "$PULL_NUM"
+ "terraform_workspace" = "$WORKSPACE"
# (2 unchanged elements hidden)
}
—
Reply to this email directly, view it on GitHub
<#3088 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERD5DLI6TJ4HQ675SETWVWIVJANCNFSM6AAAAAAUM5VQHM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This might be similar to #2690. I am trying to use https://github.com/bridgecrewio/yor to tag resources before the plan. But the plan only picks up the initial changes. If I push again, yor runs as desired, but the changes of the second plan are not shown (only the first initial changes show).
My config looks like:
Is this the same limitation or am I missing something for the plan to pick up the changes to the files?
Beta Was this translation helpful? Give feedback.
All reactions