-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Atlantis support. Add atmos terraform generate varfiles
and atmos atlantis generate repo-config
CLI commands
#189
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nitrocode
reviewed
Sep 6, 2022
nitrocode
reviewed
Sep 6, 2022
nitrocode
reviewed
Sep 6, 2022
nitrocode
reviewed
Sep 7, 2022
nitrocode
reviewed
Sep 7, 2022
nitrocode
reviewed
Sep 7, 2022
jamengual
approved these changes
Sep 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
nitrocode
approved these changes
Sep 7, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @aknysh. Looks good to me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
atmos.yaml
atmos terraform generate varfiles
andatmos atlantis generate repo-config
CLI commandswhy
atlantis.yaml
. Using the config, project and workflow templates,atmos
generatesatlantis
projects which corresponds to anatmos
components in all stacksBoth
atmos terraform generate varfiles
andatmos atlantis generate repo-config
commands supportsstacks
andcomponents
parameters to generate Atlantis project configs for only specific stacks and/or components:For each Atlantis project in
atlantis.yaml
,atmos
automatically generates the correct values for these settings:references
notes
atmos
supports generating Repo Level atlantis.yaml Config foratmos
componentsand stacks.
The following
atmos
commands will first generate the varfiles for all components in all stacks,then generate the
atlantis.yaml
repo config file:NOTE: All paths,
--file-template
in theatmos terraform generate varfiles
command, and in theatlantis
config inatmos.yaml
, should be relative to the root of the repo.Supported context tokens:
{namespace}
,{tenant}
,{environment}
,{region}
,{stage}
,{component}
,{component-path}
.You can run these commands manually and commit the generated varfiles and
atlantis.yaml
repo config.If you want to generate
atlantis.yaml
on the server dynamically,you can add the following run commands to pre_workflow_hooks.
The
atlantis.yaml
repo config file will be generated right before Atlantis parses it.Note that the
-file-template
parameter in theatmos terraform generate varfiles
command must match the following two settings inatmos.yaml
:when_modified
must use the same template with the context tokens - this will allow Atlantis to check if any of the generated variables weremodified
extra_args
must use the same template with the context tokens - this will allow Atlantis to run Terraform commands with thecorrect
-var-file
parametersUsing the config, project and workflow templates,
atmos
generates a separateatlantis
project for eachatmos
component in every stack: