Skip to content

todo files created at top#1191

Draft
eschultink wants to merge 6 commits into
rc-v0.6.8from
s224-todos-to-top
Draft

todo files created at top#1191
eschultink wants to merge 6 commits into
rc-v0.6.8from
s224-todos-to-top

Conversation

@eschultink

@eschultink eschultink commented May 5, 2026

Copy link
Copy Markdown
Member

ON HOLD - moving all the way to top main.tf is potentially breaking change for those who forked/cloned examples earlier; needs to go to next major release.

Features

  • move all local_file resources to top/root - improves compatibility with Terraform Cloud and the like; as well as avoids some customers static analyzers complaining about the local_file stuff, even when it's disabled
  • limit potential of cycles with todo_step/next_todo_step being computed internally in modules
  • structure/refactor in a way that will be more future-proof for module distribution

Change implications

  • dependencies added/changed? no
  • something important to note in future release notes? yes, see CHANGELOG

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes Terraform-generated TODO/test artifacts at the example root modules by replacing many submodule local_file resources with structured todo_content outputs. In the broader Terraform module tree, this refactors how deployment/setup guidance is produced and reduces the need for cross-module todo_step sequencing.

Changes:

  • Added todo_content outputs across proxy, connector, and auth modules while deprecating legacy todo, next_todo_step, todos_as_local_files, and related outputs.
  • Added root-level local_file writers in infra/examples-dev/aws and infra/examples-dev/gcp to materialize markdown TODOs and executable scripts from aggregated stage data.
  • Updated host modules and changelog to support the new aggregation model and document the deprecation path.

Reviewed changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
infra/modules/worklytics-proxy-connection/main.tf Deprecated legacy outputs on the REST wrapper module.
infra/modules/worklytics-proxy-connection-generic/variables.tf Marked legacy todo controls as deprecated.
infra/modules/worklytics-proxy-connection-generic/main.tf Removed module-local file writing; added structured todo_content.
infra/modules/worklytics-proxy-connection-aws/main.tf Re-exported deprecated outputs and new todo_content.
infra/modules/worklytics-connectors/outputs.tf Added aggregated connector-level todo_content.
infra/modules/worklytics-connectors-msft-365/outputs.tf Added M365 aggregated todo_content output.
infra/modules/worklytics-connectors-msft-365/main.tf Reworked M365 todo assembly after removing local file generation.
infra/modules/worklytics-connectors-google-workspace/outputs.tf Added Google Workspace aggregated todo_content.
infra/modules/worklytics-connectors-google-workspace/main.tf Removed module-local key TODO files.
infra/modules/source-token-external-todo/variables.tf Deprecated legacy todo control variables.
infra/modules/source-token-external-todo/main.tf Replaced file generation with structured todo_content.
infra/modules/google-workspace-dwd-connection/variables.tf Deprecated legacy todo control variables.
infra/modules/google-workspace-dwd-connection/output.tf Added structured DWD todo output.
infra/modules/google-workspace-dwd-connection/main.tf Removed local TODO file generation.
infra/modules/gcp-webhook-collector/variables.tf Deprecated legacy todo control variable.
infra/modules/gcp-webhook-collector/main.tf Replaced local files with exported todo/script content.
infra/modules/gcp-secret-to-cloud-function/main.tf Converted generated instructions into exported todo_content.
infra/modules/gcp-sa-auth-key-user-managed/main.tf Replaced local TODO file with exported todo_content.
infra/modules/gcp-proxy-bulk/variables.tf Deprecated legacy todo control variables.
infra/modules/gcp-proxy-bulk/main.tf Removed local files; exported bulk setup/test content.
infra/modules/gcp-proxy-api/variables.tf Deprecated legacy todo control variables.
infra/modules/gcp-proxy-api/main.tf Removed local files; exported API test content.
infra/modules/gcp-host/output.tf Marked host next_todo_step as deprecated.
infra/modules/gcp-host/main.tf Added host-level aggregated todo_content and test-all script content.
infra/modules/entra-grant-all-users/variables.tf Deprecated legacy todo control variables.
infra/modules/entra-grant-all-users/main.tf Replaced local TODO file with exported structured content.
infra/modules/aws-webhook-collector/variables.tf Deprecated legacy todo control variable.
infra/modules/aws-webhook-collector/main.tf Removed local files; exported webhook test content.
infra/modules/aws-proxy-bulk/variables.tf Deprecated legacy todo control variables.
infra/modules/aws-proxy-bulk/main.tf Removed local files; exported bulk setup/test content.
infra/modules/aws-proxy-bulk-existing/main.tf Marked legacy next_todo_step output as deprecated.
infra/modules/aws-proxy-api/variables.tf Deprecated legacy todo control variables.
infra/modules/aws-proxy-api/main.tf Removed local files; exported API test content.
infra/modules/aws-host/output.tf Marked host next_todo_step as deprecated.
infra/modules/aws-host/main.tf Added host-level aggregated todo_content and test-all script content.
infra/examples-dev/gcp/main.tf Added root-level TODO/script file writers for GCP example deployments.
infra/examples-dev/aws/main.tf Added root-level TODO/script file writers for AWS example deployments.
CHANGELOG.md Documented planned deprecations and centralized todo generation changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 24 to +26
output "todo" {
value = module.generic.todo
value = module.generic.todo
description = "[DEPRECATED - use todo_content output instead. TODO: remove in 0.7]"
Comment on lines +110 to +111
todo_content_by_connector = { for k, v in module.msft_365_grants :
k => try(module.worklytics_connector_specs.enabled_msft_365_connectors[k].external_token_todo, null) == null ? v.todo_content : [[
Comment thread infra/modules/aws-host/main.tf Outdated
%{for test_script in values(module.webhook_collectors)[*].test_script~}
%{if test_script != null}./${test_script}%{endif}
%{for instance_id, connector in local.webhook_collector_instances~}
%{if try(connector.test_script_content, null) != null}./test-${trimprefix(instance_id, var.environment_name)}.sh%{endif}
Comment thread infra/modules/gcp-proxy-bulk/main.tf Outdated
Comment thread infra/modules/gcp-secret-to-cloud-function/main.tf Outdated
Comment thread CHANGELOG.md
Comment on lines +39 to +43
As of 0.6.0, all `local_file` resource generation has been moved out of sub-modules and centralized
in the root example modules (`examples-dev/aws`, `examples-dev/gcp`). Sub-modules now expose a
structured `todo_content` output that root modules aggregate and use to write both markdown TODO
files (`TODO N - {name}.md`) and executable test scripts. The legacy variables/outputs above were
retained for backward compatibility through 0.6.x but will be removed in 0.6.1.
Base automatically changed from rc-v0.6.0 to main May 8, 2026 16:00
An error occurred while trying to automatically change base from rc-v0.6.0 to main May 8, 2026 16:00
@eschultink eschultink changed the base branch from main to rc-v0.6.1 May 8, 2026 19:14
Base automatically changed from rc-v0.6.1 to main May 27, 2026 10:15
@eschultink eschultink changed the base branch from main to rc-v0.6.2 May 27, 2026 15:28
Base automatically changed from rc-v0.6.2 to main May 29, 2026 21:22
@eschultink eschultink changed the base branch from main to rc-v0.6.3 May 29, 2026 22:04
Base automatically changed from rc-v0.6.3 to main June 8, 2026 17:34
An error occurred while trying to automatically change base from rc-v0.6.3 to main June 8, 2026 17:34
@eschultink eschultink changed the base branch from main to rc-v0.6.4 June 8, 2026 20:24
Base automatically changed from rc-v0.6.4 to main June 11, 2026 17:37
@eschultink eschultink changed the base branch from main to rc-v0.6.5 June 11, 2026 20:53
Base automatically changed from rc-v0.6.5 to main June 17, 2026 16:19
@eschultink eschultink changed the base branch from main to rc-v0.6.6 June 17, 2026 16:30
Base automatically changed from rc-v0.6.6 to main June 18, 2026 20:25
@eschultink eschultink changed the base branch from main to rc-v0.6.7 June 18, 2026 20:34
Base automatically changed from rc-v0.6.7 to main July 1, 2026 18:07
@eschultink eschultink changed the base branch from main to rc-v0.6.8 July 1, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants