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

Feat: importing templateless environment causes the configuration to … #872

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

TomerHeber
Copy link
Collaborator

…be unplannable

Issue & Steps to Reproduce / Feature Request

resolves #865

Solution

  1. Added code to import the template information for templatless use-case.
  2. Added acceptance tests.
  3. Added integration test.

Comment on lines +443 to +444
// This is not true for imports - because the shcema is empty irrespective in that case.
if !isImport {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this condition necessary? If the schema is empty anyway
What would be the effect of removing this condition?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it will not import terraform_version properly.
If the schema is empty (which it is in import), it will remove these values from the struct, afterwards when updates the schema based on the steuct, terraform_version will not be set.

This occurred to me running the test. So I added this condition.

@github-actions github-actions bot added ready to merge PR approved - can be merged once the PR owner is ready and removed pending final review labels Jun 6, 2024
@TomerHeber TomerHeber merged commit e9840ae into main Jun 6, 2024
7 checks passed
@TomerHeber TomerHeber deleted the feat-import-templateless-#865 branch June 6, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-client feature provider ready to merge PR approved - can be merged once the PR owner is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Importing templateless environment causes the configuration to be unplannable
2 participants