ok, so we are testing and now we get the `deleted:...
# atmos
p
ok, so we are testing and now we get the
deleted:true
but how do we delete the component? because in
apply-after-merge
the tfvar file wll not be created by atmos because the yaml is not there anymore
so it looks like this is going to be a two step process no matter what
a
@PePe Amengual if you come up with a good solution for that, let us know (e.g., in GH action, we can try to use the stacks from the main branch for the deleted components, or we can enhance atmos to provide them, e.g. in a separate attribute in the output of
describe affected
)
p
if we want to do this in one go, then we will need atmos terraform commands to somehow still create the tfvar file for the deleted component
e
This isn’t unique to Atmos. The same is true when deleting a Terraform root module from a repository. You must destroy the infrastructure before removing the code. The simplest way to do that is to check out the most recent commit prior to deletion and run
terraform plan -destroy
, followed by terraform apply.
p
or that
a
when you find and test a good solution, we'd appreciate if you opened a PR for Atmos and updated this doc https://atmos.tools/cli/commands/describe/affected#detecting-deleted-components-in-affected-stacks
e
So in your GitHub Action workflow, you're presumably running this in a matrix.
The matrix calls presumably a reusable workflow or GitHub action for each component.
Prior to calling that action, you already know if it's a destructive operation.
When it's a destructive operation, then you pass the previous commit that was used in the comparisons.
Otherwise default to the current commit.
p
yes
ok, but then the plan action will need to be updated to run
-destroy
with the previous sha
e
(also, just a heads up, we're actively working on native CI in atmos, so these GHA will no longer be needed)
@Igor Rodionov is gave us a demo on Friday
@Igor Rodionov one more edge case we should consider is handling the destroy
p
Igor did a demo or is going to?
I will like to see it
I still do not understand how this will work
e
The demo was of the upcoming native CI support, not specifically around deletion
If you book a call with me I can walk you through how you could approach the deletion thing
p
I know. I want to see that
The deletion thing I got it, we are working on the workflow already
🎉 1
e
Aha, yes, we can arrange that too to get your feedback
i
@PePe Amengual native CI still in work. I will message you when we would be ready for public demo
❤️ 1
p
@Andriy Knysh (Cloud Posse) when is this coming out? We tested it with @Girish Maddineni and it does work well
e
We made a lot more progress in the past day. Igor was telling us he has achieved parity with the current job summary reports. GitHub status checks are working, so it’s possible to get Atlantis style GitHub status. We have some more work to do on getting plan files to work with artifact Storage. And then I think we should be ready. At the current rate, it’s looking like we might have something towards the end of next week.
👍🏽 1
a
@PePe Amengual you mean the change to add deleted components to
describe affected
?
or the Atmos native CI integration?
p
the delete on describe affected
a
(note that the latest release is 1.207.0 now)