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

(TFECO-7366) Stacks: parse terraform-sources.json to support remote component sources #1836

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ansgarm
Copy link
Member

@ansgarm ansgarm commented Sep 25, 2024

needs hashicorp/terraform-schema#406

Open tasks

  • Tests!

@ansgarm ansgarm changed the title wip stacks: parse terraform-sources.json to support remote component sources Sep 25, 2024
internal/features/rootmodules/state/installed_modules.go Outdated Show resolved Hide resolved
@@ -350,6 +401,8 @@ func (s *RootStore) CallersOfModule(path string) ([]string, error) {
if record.ModManifest.ContainsLocalModule(path) {
callers = append(callers, record.path)
}

// TODO: support TerraformSources as well here
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need to?

@@ -375,10 +428,28 @@ func (s *RootStore) InstalledModuleCalls(path string) (map[string]tfmod.Installe
}
}
}
// TODO: support TerraformSources as well here
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need to?


fi, err := fs.Stat(terraformSourcesPath)
if err == nil && fi.Mode().IsRegular() {
return terraformSourcesDirPath, true // TODO: this is a bit weird and misleading, maybe we should just use the bundle thing reading the dir and catch the proper error or sth like that
Copy link
Member Author

Choose a reason for hiding this comment

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

Unsure whether we need this method at all since the go-slug parser for this file also handles it not existing

@ansgarm ansgarm changed the title stacks: parse terraform-sources.json to support remote component sources (TFECO-7366) Stacks: parse terraform-sources.json to support remote component sources Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant