Skip to content
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

Stack: ignore state files #691

Merged
merged 1 commit into from
May 10, 2021
Merged

Stack: ignore state files #691

merged 1 commit into from
May 10, 2021

Conversation

DanielMSchmidt
Copy link
Contributor

Previously the files were not successfully ignored

@danieldreier
Copy link
Contributor

When I tested this (just by coping the gitignore line into a local one, my tfstate files were not ignored:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        terraform.tfstate
        terraform.tfstate.backup

@DanielMSchmidt
Copy link
Contributor Author

Great catch, was your local project initialised with an older version or what is the reason your terraform state has no stack name in the state?

Copy link
Member

@ansgarm ansgarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested it successfully with a project that was initialized with cdktf 0.3 (supporting multiple stacks).
As these are the templates for initializing new projects, this PR won't affect existing projects such as that from @danieldreier.

@ansgarm ansgarm merged commit d8589b8 into main May 10, 2021
@ansgarm ansgarm deleted the fix-init-git-ignore branch May 10, 2021 09:48
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants