Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- updated upload and download artifacts actions to v4

### Fixed
- fixed how terraform state is accessed before it the initial synchronization
- links to supported resources in HOWTOs
- posting PR comments when terraform plan output is very long
- PR parsing in the update workflow
Expand Down
2 changes: 2 additions & 0 deletions docs/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
- [ ] Rename the `$GITHUB_ORGANIZATION_NAME.yml` in `github` to the name of the GitHub organization
- [ ] Push the changes to `$GITHUB_MGMT_REPOSITORY_DEFAULT_BRANCH`

> [!WARNING] Please note that until you [synchronize GitHub Management with GitHub](#github-management-sync-flow) for the first time, the workflows that depend on Terraform state, like `Fix`, `Plan` or `Apply`, will fail. This is because the state is not yet initialized.

## GitHub Management Sync Flow

- [ ] Follow [How to synchronize GitHub Management with GitHub?](HOWTOS.md#synchronize-github-management-with-github) to commit the terraform lock and initialize terraform state
Expand Down
8 changes: 4 additions & 4 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ locals {
}
}
}
"state" = {
"state" = lookup({
for mode, item in {
for item in local.state.values.root_module.resources : item.mode => item...
} : mode => {
for item in try(local.state.values.root_module.resources, []) : item.mode => item...
} : mode => {
for type, item in {
for item in item : item.type => item...
} : type => {
Expand All @@ -152,7 +152,7 @@ locals {
}
}
}
}.managed
}, "managed", {})
}
resources = {
"github_membership" = {
Expand Down