Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, adheres to Semantic Versioning, and is generated by Changie.
v2.12.4 (2023-11-14)¶
Fixed¶
- Updated release pipelines
v2.12.3 (2023-10-25)¶
Updated¶
- Updated dependencies and added support for go 1.21.x
Fixed¶
- Fix resolving plugin executables on Windows
v2.12.2 (2023-09-29)¶
Fixed¶
- Fixed usage of root directory when loading referenced files
- Fix for variables_file containing a directory
v2.12.1 (2023-09-28)¶
Fixed¶
- Added gcp docker container
- Fixed iterating until beginning if commit not found in paths.
v2.12.0 (2023-09-28)¶
Added¶
- Added git tags to update output
Fixed¶
- Fixed lockfile interpolation of $LATEST
- Fixed tag interpolation during update check
- reworked ref resolution to also deal with include
v2.11.0 (2023-09-07)¶
Added¶
- Add state generation directly into CLI
Fixed¶
- Fixed handling of mach-composer update
v2.10.1 (2023-08-25)¶
Fixed¶
- Fixed issue with unknown paths field
v2.10.0 (2023-08-25)¶
Added¶
- Added filtering on file paths to determine updates in update functionality
Updated¶
- Removed built in plugins
Fixed¶
- Fixed race condition in git repo downloads
v2.9.8 (2023-08-24)¶
Updated¶
- Added deprecation warning for endpoints
v2.9.7 (2023-08-24)¶
Fixed¶
- Fixed slice interpolation in variable processing
- Fixed goreleaser config to point to correct domains
v2.9.6 (2023-07-17)¶
Fixed¶
- Allow running mach-composer update with referenced components file
v2.9.5 (2023-06-27)¶
Updated¶
- updated version of commercetools plugin
v2.9.4 (2023-04-26)¶
Fixed¶
- Don't render empty depends_on or providers block in modules
v2.9.3 (2023-03-17)¶
Fixed¶
- Refactor matching if commits are relevant for path filter
v2.9.2 (2023-03-17)¶
Fixed¶
- Improve the component version registration flow
v2.9.1 (2023-03-16)¶
Fixed¶
- Don't error when a previous version is not found in the git repository
v2.9.0 (2023-03-15)¶
Added¶
- Add
--dry-runand--git-filter-pathstocloud register-component-versioncommand. The--git-filter-pathsargument can be used to limit the scope of the changes when working within monorepo's
Updated¶
- Update commercetools plugin to latest version
- Updated dependencies
v2.8.0 (2023-03-08)¶
Added¶
- Improve the auto-completion with support for the config files, sites and components (#139)
- Add support for resolving a component version $LATEST. When the version is defined as $LATEST resolve the version by querying mach composer cloud. This is only enabled when the config file has cloud support enabled by defining the organization/project
2.7.2 (2023-03-03)¶
- Remove the
-lockfile=readonlyargument to terraform apply. This was introduced in 2.7.0 but didn't work correctly. - Add fallback to check in git when using
mach-composer update --cloudwhen a component isn't found.
2.7.1 (2023-03-01)¶
- Default to branch
mainwhen no branch is defined for a component when retrieving the last version.
2.7.0 (2023-03-01)¶
- Add
--cloudargument to themach-composer updatecommand to fetch the latest version registered instead of retrieving the latest commit from the Git repository. - Add
mach-composer cloud update-componentto update an existing component to for example rename the key. - Update built-in plugins to the following versions: mach-composer-plugin-commercetools v0.1.7 mach-composer-plugin-sentry v0.1.3
2.6.6 (2023-02-14)¶
- Revert the
depends_onchange since it causes data sources to be read too late resulting in unexpected changes. See https://itnext.io/beware-of-depends-on-for-modules-it-might-bite-you-da4741caac70
2.6.5 (2023-02-14)¶
- Set
depends_onon components (modules) when output variables are used. This turned out to be neccessary when the variables were used in data sources.
2.6.4 (2023-02-01)¶
- Update both built-in plugins to the following versions: mach-composer-plugin-aws v0.1.0 mach-composer-plugin-azure v0.1.0 mach-composer-plugin-commercetools v0.1.5 mach-composer-plugin-contentful v0.1.0 mach-composer-plugin-sdk v0.0.6 mach-composer-plugin-sentry v0.1.2
2.6.2 (2023-01-31)¶
- Update the commercetools built-in plugin to v0.1.1.
- Fix invalid rendering of store variables in the generated terraform files.
- Fix explicitly disabling the creation of frontend credentials.
- Fix setting store_secrets and store_variablds in the commercetools block
2.6.1 (2023-01-25)¶
- Fix authentication flow with Mach Composer Cloud and store the refreshed tokens correctly.
2.6.0 (2023-01-20)¶
-
Add optional support to automatically download MACH composer plugins when defined in the config file. For example::
mach_composer: version: 1 plugins: aws: source: mach-composer/aws version: 0.1.0 sentry: source: mach-composer/sentry version: 0.1.2
Will download the plugins to your local plugin directory if these are not found.
2.5.7 (2023-01-18)¶
- Update the Commercetools plugin to version 0.1.0. This version is compatible with more recent commercetools terraform providers.
2.5.6 (2023-01-17)¶
- Update the Sentry plugin to version 0.1.1. This allows using encrypted secrets for the auth token
2.5.5 (2023-01-17)¶
- Update the Sentry plugin to version 0.1.0
- Properly close plugins when mach-composer is terminated (e.g. via ctrl-c)
- Only load built-in plugins when they are not found on the $PATH
2.5.4 (2023-01-12)¶
- Add
--no-colorflag tomach-composer show-planto use in GitHub actions
2.5.3 (2023-01-12)¶
- Print a deprecation warning when using
mach-composer init. This command is replaced bymach-composer terraform init. - Generate a mach-composer lock file in the output directory to optimize rebuilds and prevent unnecessary terraform actions.
- Add a new command
mach-composer show-planwhich shows the generated plans by terraform.
2.5.2 (2022-12-20)¶
Disable automatic distribution to chocolatey, it seems to not work together properly with automated releases.
2.5.1 (2022-12-19)¶
Patch release to fix windows distribution via chocolatey
2.5.0 (2022-12-19)¶
This release introduces support for plugins in mach-composer. All previous supported plugins (also called integrations) are still bundled with the exectutable but will in the future be distributed separately.
With this release it is also possible to use build custom plugins. A plugin
should be created with the mach-composer-plugin-sdk and the resulting executable
should be available on your $PATH as mach-composer-plugin-<plugin>
Other changes include:
- New schema subcommand which outputs a json schema based on the given
config file (to know which plugins to use).
- Improved error and warning output (inspired by Terraform)
- Improved variable handling, only allow SOPS for encrypted variables when the
variables are used.
- Fix issue with parsing aws_account_id by required it to be a string, fixes
invalid yaml guessing when the account_id starts with a zero.
2.4.6 (2022-12-02)¶
- Interpolate variable references in the global config block
2.4.5 (2022-12-02)¶
- Fix an encoding bug when passing sops encrypted variables to the generated terraform file.
2.4.4 (2022-11-29)¶
- Fix another config inheritance issue in the sentry plugin
2.4.3 (2022-11-29)¶
- Fix serialization issue for variables when the key was not a string. We now force keys of maps to be strings.
- Fix config inheritance issue in the sentry plugin (global -> component)
2.4.2 (2022-11-29)¶
- Validate the AWS Account ID as a string, fixes an issue if the account starts with 0.
- Set default sentry terraform provider version
2.4.1 (2022-11-29)¶
- Update build process to include arm docker images
2.4.0 (2022-11-29)¶
- Major rewrite to move to a plugin based system. The plugins are for now all built-in and part of the mach composer release but will in the future be moved to external plugins.
- Use
go-gitto retrieve the git log instead of executinggitdirectly. This fixes (#188) - Remove panic() calls in the codebase and handle errors properly by printing them to stdout and setting correct exit code
- Re-implement the
$(include())syntax for include a separate components file for the 2.0 versione (#115) - Fix rendering of variables in the generated terraform output (#194)
- Fix a yaml parsing bug which resulted in not being able to disable management of commercetools stores. (#193)
- Escape backslashes for strings in HCL (#133)
2.3.0 (2022-10-01)¶
- Fix windows version due to wrong handling of the path separator (#182)
- Restore the
sitessubcommand to output the sites in the config (#178) - Restore the
componentssubcommand to output the components in the config (#179) - Support only passing one config file and use
main.ymlas default for now (#177)
2.2.1 (2022-06-10)¶
- Fixed inconsistencies between 1.2 and 2.x:
- Add
branchoption to component definitions to be able to perform amach-composer updateand stay within a certain branch (during development) - Fixed commercetools
storesdefinitions - Fixed bug where custom AWS and Azure provider version definitions weren't picked up
2.2 (2022-06-10)¶
- Fixed inconsistencies between 1.2 and 2.x:
- Upgrade Terraform providers in golang version of the MACH composer to match the 1.2 release:
- Upgraded commercetools provider to 0.30.0
- Upgraded Amplience provider to 0.3.7
- Upgraded Azure provider to 2.99.0
- Add
variables_fileoption to themach_composerconfiguration block to define a variable file - Fix auto add cloud integration (aws or azure) when
integrationlist is left empty - Add ability to define a custom provider version including the version operator
- Deprecate
commercetools.frontendblock, will be removed in a later release.
2.1.1 (2022-04-22)¶
- Don't crash when running
mach-composer applywithout--auto-approve
2.1.0 (2022-04-22)¶
- Add back support to update sops encrypted config files
- Properly implement the
--checkflag onupdatecommand
2.0.2 (2022-04-05)¶
- Pass environment variables to terraform command
2.0.1 (2022-04-05)¶
- Add aws-cli to the Docker container
2.0.0 (2022-04-05)¶
Rewrite of the Python codebase to Go. Goal is to make it easier to distribute mach-composer in a cross-platform way.
A number of features which were minimal used are removed.
- The mach bootstrap command is no longer present. It was a simple wrapper
around Python cookiecutter. This can still be used separately
- The mach sites and mach components commands since they were unused.
- The --with-sp-login is removed. This flags used to run az login. If this
is needed it needs to be run before mach-composer is run.
- The --ignore-version flag is removed. The version in the config file now
indicates a schema version. Only version 1 is supported and updates within
this schema version should always be backwards compatible.
1.2 (2022-04-11)¶
general
- Add mach init command
- Skip non-MACH configuration files when processing all yaml files in a directory.
This allows you to run things like mach apply or mach update without having to specify the -f main.yml option if you only have one valid MACH configuration file in your directory. Fixes #150
- Ignore missing variables when running mach sites and mach components
- Add --destroy flag to the plan and apply commands
- Add variables_file option to the mach_composer configuration block to define a variable file
- Show commit author in mach update output
- Upgraded commercetools provider to 0.30.0
- Upgraded Amplience provider to 0.3.7
- Upgraded Azure provider to 2.99.0
AWS
- Upgraded Terraform AWS provider to 3.74.1
- Add support for default tags on provider level
aws:
account_id: 123456789
region: eu-central-1
default_tags:
environment: test
owner: john
1.1 (2021-11-25)¶
General
- Variable support:
${var.}to be used with the--var-filecommand line option${component.}to use component output values${env.}to include environment variables in the configuration file
AWS
- Upgraded Terraform AWS provider to 3.66.0
- Add AWS specific endpoint options;
- enable_cdn creates a CDN in front of an endpoint
- throttling_burst_limit and throttling_rate_limit controls throttling on the API gateway
Azure
- Upgraded Terraform Azure provider to
2.86.0 - Add extra Frontdoor frontend_endpoint options:
- session affinity
- waf policy support
- Add extra Frontdoor routing options to components such as:
- Custom routing paths
- Health probe settings
- Custom host address and ports
- Caching options
- Include
frontend_endpointin ignore list whensuppress_changesis used - Add Frontdoor
ssl_key_vaultoption to supply your own SSL certificate for your endpoints - Add Azure specific endpoint options:
internal_nameOverwrites the frontend endpoint namewaf_policy_idDefines the Web Application Firewall policy ID for the endpointsession_affinity_enabledWhether to allow session affinitysession_affinity_ttl_secondsThe TTL to use in seconds for session affinity- Add new
service_plansoptionper_site_scaling - Fix: set correct root-level DNS record (
@) when endpoint URL is the same as the zone
Commercetools
- Upgraded Terraform commercetools provider to
0.25.3 - Add
tax_categoriesto allow more complex tax setups. Does not work in conjunction withtaxes
Upgrade notes¶
For Azure
- Each component that has an
endpointdefined needs to have an Terraform output defined for that endpoint. For example:
Read more about the configuration options.output "azure_endpoint_main" { value = { address = azurerm_function_app.main.default_hostname } } - Remove endpoints restrictions: Azure components can now use multiple endpoints.
- Changes have been made in the Frontdoor configuration in the underlying Terraform Azure provider.
If you are using endpoints with a custom domain, you'll need to import the newazurerm_frontdoor_custom_https_configurationinto your Terraform state.
More on how to work with the Terraform state in our troubleshooting guide.
1.0 (2021-05-10)¶
New platforms
- Add Amplience support
- Add Apollo Federation support
- Add Sentry DSN management options
General
- Add
mach_composerconfiguration block to configure required MACH composer version - SOPS support: SOPS-encrypted configuration files will get decrypted before being parsed further
- Add
--ignore-versionto disable the MACH composer version check - Improved development workflow:
- Improved git log parsing
- Add
mach bootstrapcommands:mach bootstrap configfor creating a new MACH configurationmach bootstrap componentfor creating a new MACH component
- Add
--siteoption to thegenerate,planandapplycommands - Add
--componentoption to theplanandapplycommands - Add
--reuseflag to theplanandapplycommands to suppress aterraform initcall - Add support for relative paths to components
- Add extra component definition settings
artifactsto facilitate local deployments - Improved dependencies between components and MACH-managed commercetools configurations
- Add option to override Terraform provider versions
- Add support for multiple API endpoints:
base_urlreplaced withendpointshas_public_apireplaced withendpoints- Supports a
defaultendpoint that doesn't require custom domain settings
- Add support for including yaml files using the
${include(...)}components: ${include(components.yml)} components: ${include(git::https://github.com/labd/mach-configs.git@9f42fe2//components.yml)}
commercetools
- Move
currencies,languages,countries,messages_enabledtoproject_settingsconfiguration block - Add support for commercetools Store-specific variables and secrets on
components included in new variable:
ct_stores - Add
managedsetting to commercetools store. Set to false it will indicate the store should not be managed by MACH composer - Add support for commercetools shipping zones
- Make commercetools frontend API client scopes configurable with new
frontendconfiguration block
AWS
- AWS: Set
auto-deployon API gateway stage - AWS: Add new component variable
tags
Azure
- Add configuration options for Azure service plans
- Upgraded Terraform to
0.14.5 - Upgraded Terraform commercetools provider to
0.25.3 - Upgraded Terraform AWS provider to
3.28.0 - Upgraded Terraform Azure provider to
2.47.0 - Azure: Remove
project_keyfromvar.tagsand addEnvironmentandSite - Azure: Add
--with-sp-loginoption tomach plancommand - Azure: Remove function app sync bash command: this is now the responsibility of the component
Breaking changes¶
Generic
- config: Rename
general_configtoglobal - config:
base_urlhas been replaced by theendpointssettings:
becomessites: - identifier: mach-site-eu base_url: https://api.eu-tst.mach-example.netWhen you name the endpoint that replacessites: - identifier: mach-site-eu endpoints: main: https://api.eu-tst.mach-example.netbase_url"main", it will have the least effect on your existing Terraform state.
When endpoints are defined on a component, the component needs to define endpoint Terraform variables (AWS and Azure) - config: commercetools
create_frontend_credentialsis replaced with newfrontendblock:default is stillcommercetools: frontend: create_credentials: falsetrue - config Default scopes for commercetools frontend API client changed:
- If you want to maintain previous scope set, define the following in the
frontendblock:commercetools: frontend: permission_scopes: [manage_my_profile, manage_my_orders, view_states, manage_my_shopping_lists, view_products, manage_my_payments, create_anonymous_token, view_project_settings] - Old scope set didn't include store-specific
manage_my_profile:project:storescope. If you're using the old set as described above, MACH will need to re-create the store-specific API clients in order to add the extra scope. For migration options, see next point - In case the scope needs to be updated but (production) frontend implementations are already using the current API client credentials, a way to migrate is to;
- Remove the old API client resource with
terraform state rm commercetools_api_client.frontend_credentials - Repeat step for the store-specific API clients in your Terraform state
- Perform
mach applyto create the new API clients with updated scope - Your commercetools project will now contain API clients with the same name. Once the frontend implementation is migrated, the older one can safely be removed.
- If you want to maintain previous scope set, define the following in the
- component: Components with a
commercetoolsintegration require a new variablect_stores:variable "ct_stores" { type = map(object({ key = string variables = any secrets = any })) default = {} } - component: The folowing deprecated values in the
var.variablesare removed:See 0.5.0 release notesvar.variables["CT_PROJECT_KEY"] var.variables["CT_API_URL"] var.variables["CT_AUTH_URL"] - component: The
var.environment_variableswon't be set by MACH anymore. Usevar.variablesfor this
AWS
- config: The AWS
route53_zone_namesetting has been removed in favour of multiple endpoint support - config: The
deploy_rolesetting has been renamed todeploy_role_name - component: Introduced new variable
tags:variable "tags" { type = map(string) description = "Tags to be used on resources." } - component: Add
aws_endpoint_*variable when theendpointsconfiguration option is used. More information on defining and using endpoints in AWS.
Azure
- config: The
front_doorconfiguration block has been renamed tofrontdoor - config: The Azure frontdoor settings
dns_zoneandssl_key_*settings have been removed;
Certificates are now managed by Frontdoor and dns_zone is auto-detected. - config: The Azure frontdoor settings
resource_grouphas been renamed todns_resource_group - config: Moved component
short_nameto newazureconfiguration block - state: The Terraform
azurerm_dns_cname_recordresources have been renamed; they now take the name of the associated endpoint key. For the smoothest transition, rename them in your Terraform state:
terraform state mv azurerm_dns_cname_record.<project-key> azurerm_dns_cname_record.<endpoint-key> - component: Prefixed all Azure-specific variables with
azure_ - component: The
FRONTDOOR_IDvalue is removed from thevar.variablesof a component. Replaced withvar.azure_endpoint_*. More information on defining and using endpoints in Azure. - component:
app_service_plan_idhas been replaced withazure_app_service_plancontaining both anidandnameso the azurerm_app_service_plan data source can be used in a component.
It will only be set when service_plan is configured in the component
definition
or site configuration
variable "azure_app_service_plan" {
type = object({
id = string
name = string
resource_group_name = string
})
}
resource_group_name and resource_group_location with azure_resource_group:
variable "azure_resource_group" {
type = object({
name = string
location = string
})
}
0.5.1 (2020-11-10)¶
- Removed
awsblock in general_config - Add
branchoption to component definitions to be able to perform amach updateand stay within a certain branch (during development)
0.5.0 (2020-11-09)¶
- Add new CLI options:
mach-composer componentsto list all componentsmach-composer sitesto list all sites
- Improved
updatecommand:- Supports updating (or checking for updates) on all components based on their git history
- This can now also be used to manually update a single component;
mach-composer update my-component v1.0.4 - Add
--commitargument to automatically create a git commit message
- Add new AWS configuration option
route53_zone_name - Remove unused
api_gatewayattribute on AWS config - Remove restriction from
environmentvalue; can now be any. Fixes #9
Breaking changes¶
- Require
ct_api_urlandct_auth_urlfor components withcommercetoolsintegration
Deprecations¶
In a component, the use of the following variables have been deprecated;
var.variables["CT_PROJECT_KEY"]
var.variables["CT_API_URL"]
var.variables["CT_AUTH_URL"]
Instead you should use:
var.ct_project_key
var.ct_api_url
var.ct_auth_url
0.4.3 (2020-11-04)¶
- Make AWS role definitions optional so MACH can run without an 'assume role' context
0.4.2 (2020-11-02)¶
- Add 'encrypt' option to AWS state backend
- Correctly depend component modules to the commercetools project settings resource
- Extend Azure regions mapping
0.4.1 (2020-10-27)¶
- Fixed TypeError when using
resource_groupon site Azure configuration
0.4.0 (2020-10-27)¶
- Add Contentful support
Breaking changes¶
is_software_componenthas been replaced by theintegrationssettings
components:
- name: my-product-types
source: git::ssh://git@github.com/example/product-types/my-product-types.git
version: 81cd828
is_software_component: false
becomes
components:
- name: my-product-types
source: git::ssh://git@github.com/example/product-types/my-product-types.git
version: 81cd828
integrations: ["commercetools"]
or integrations: [] if no integrations are needed at all.
0.3.0 (2020-10-21)¶
- Add option to specify custom resource group per site
Breaking changes¶
- All
resource_group_nameattributes is renamed toresource_group - The
storage_account_nameattribute is renamed tostorage_account
0.2.2 (2020-10-15)¶
- Fixed Azure config merge: not all generic settings where merged with site-specific ones
- Only validate short_name length check for Azure implementations
- Setup Frontdoor per 'public api' component regardless of global Frontdoor settings
0.2.1 (2020-10-06)¶
- Fixed rendering of STORE environment variables in components
- Updated Terraform version to 0.13.4
- Fix
--auto-approveoption onmach applycommand
0.2.0 (2020-10-06)¶
- Add AWS support
- Add new required attribute
cloudin general config
0.1.0 (2020-10-01)¶
- Initial release of rewrite to Python (previously Go)
0.0.1 (2018-08-20)¶
Initial version