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

feat(terraform): add update howto #33

Merged
merged 4 commits into from
Jan 15, 2025
Merged
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
61 changes: 61 additions & 0 deletions docs/content/terraform/howtos/update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Updating the module and library version
weight: 30
---

The [avm-ptn-alz](https://aka.ms/alz/module) Terraform module, and its associated [provider](https://aka.ms/alz/provider) will be updated from time to time.
Similarly, the policy library will also be updated with new features and bug fixes.
Unlike previously, the module and the policy library are now decoupled, and can be updated independently.

## Updating the policy library

To update the policy library, you must set the [`library_references`](https://registry.terraform.io/providers/Azure/alz/latest/docs#library_references-1) configuration in the provider.
Each provider release will have a default value, which will be the latest version of the ALZ policy library at the time of the release.
matt-FFFFFF marked this conversation as resolved.
Show resolved Hide resolved
To find the default value, you can check the [provider documentation](https://registry.terraform.io/providers/Azure/alz/latest/docs#library_references-1).

To update the policy library, you can set the `library_references` configuration to the desired version:

```hcl
provider "alz" {
library_references = [
{
path = "platform/alz",
tag = "2025.01.0"
}
]
}
```

Then run a terraform plan to see the changes that will be applied.

### Local library

If you have a local library, you may have a [`alz_library_metadata.json`](https://azure.github.io/Azure-Landing-Zones-Library/assets/metadata/) file in the root.
If this file contains dependencies, you should update any dependent libraries here.

###  Breaking changes

In line with the library [versioning](https://azure.github.io/Azure-Landing-Zones-Library/versioning/) approach, there may be breaking changes on any year or month change.
Patch releases will not contain breaking changes.
We try to ensure that the changes are apply-able with Terraform, without manual intervention required.

## Updating the module

Over time, the module will be updated with additional features and bug fixes.
If you wish to update the module, you can simply update the version in the module source:

```hcl
module "alz" {
source = "Azure/avm-prn-alz/azurerm"
version = "0.10.0"

# ... other configuration
}
```

Then run a terraform plan to see the changes that will be applied.

{{< hint type="warning" >}}
The module may require an update to the provider.
Ensure that the default value for [`library_references`](https://registry.terraform.io/providers/Azure/alz/latest/docs#library_references-1) hasn't changed and update it if necessary.
{{< /hint >}}
Loading