Modernisation Platform feature policy
Feature policy
The feature policy provides a single place to identify which Modernisation Platform services an account is opted into or out of.
It allows us to quickly enable or disable services for specific accounts and makes it easier to debug issues or assess which accounts could be affected by a service.
Where the policy lives
The rules are defined in the feature policy JSON.
To override a feature for a specific environment, add feature_overrides to its environment definition. See the testing-test override example.
How it works
Terraform loads and evaluates the policy using the following priority:
- Environment feature override
- Workspace-specific rule
- Lifecycle and account type rules
The result is available through local.feature_flags.
Supported features
Controls whether the Instance Scheduler IAM role and policy are deployed to an account.
The lifecycle and account type rules determine which accounts have this feature enabled.
Controls whether the Instance Scheduler IAM role and policy are deployed specifically to the testing-test account.
This feature is enabled by the testing-test workspace rule.
Using a feature flag
Terraform resources use the evaluated feature flag instead of repeating account, lifecycle, or workspace conditions:
count = local.feature_flags.instance_scheduler ? 1 : 0
See the Instance Scheduler implementation.
The testing-test implementation uses instance_scheduler_testing to deploy the required role and policy specifically to that account.
Overriding a feature
To enable or disable a feature for a specific environment, add feature_overrides to its environment definition:
"feature_overrides": {
"instance_scheduler": false
}
Environment overrides take priority over the workspace, lifecycle, and account type rules.
Was this page useful?