Azure / terraform-azurerm-avm-ptn-alz

Terraform module to deploy Azure Landing Zones
https://registry.terraform.io/modules/Azure/avm-ptn-alz/azurerm
MIT License
55 stars 11 forks source link

[AVM Module Issue]: Unable to find archetype #65

Open WayneBellows opened 3 weeks ago

WayneBellows commented 3 weeks ago

Check for previous/existing GitHub issues

Issue Type?

Bug

(Optional) Module Version

0.6.0

(Optional) Correlation Id

No response

Description

When you deploy this AVM module the Terraform Plan fails with the below errors. The archetype type in the error changes depending on which archetype you're deploying. I've tested all of them and they all have the same error message. The error below is for the root archetype.

Error: Archetype not found │ │ with module.alz_archetype_root.data.alz_archetype_keys.this, │ on .terraform/modules/alz_archetype_root/main.tf line 1, in data "alz_archetype_keys" "this": │ 1: data "alz_archetype_keys" "this" { │ │ Unable to find archetype root ╵ ╷ │ Error: Archetype not found │ │ with module.alz_archetype_root.data.alz_archetype.this, │ on .terraform/modules/alz_archetype_root/main.tf line 5, in data "alz_archetype" "this": │ 5: data "alz_archetype" "this" { │ │ Unable to find archetype root

I have been using this AVM module for the last month or so without this error but today this error suddenly started to happen so it looks like something has changed. I haven't changed my code and I'm using the same version. I even tried a new deployment and I had the same error message.

ptwisterling commented 3 weeks ago

I am experiencing the same problem since last sunday. I started to question if it was me or not....

matt-FFFFFF commented 3 weeks ago

Hi,

Apologies - we are making some breaking changes in the provider and alzlib code which caused this issue:

I have pushed another tag to the Library repo. In order to fix the current module please add the following to you root module:

https://registry.terraform.io/providers/Azure/alz/latest/docs#alz_lib_ref

provider "alz" {
  alz_lib_ref = "platform/alz/2024.03.01-legacy"
}

Please note that we will be making more breaking changes before v1.0, as this provider is undergoing active development.

Thanks

rick-pb commented 1 week ago

not sure if this actually fixed anything? I've added:

provider "alz" {
  #currently a breaking change in the module, this should  be reverted once it's fixed
  alz_lib_ref = "platform/alz/2024.03.01-legacy"
}

to my terraform providers in the workspace calling the module but I'm still receiving the following error: │ Error: Archetype not found │ │ with module.alz_archetype_root.data.alz_archetype_keys.this, │ on .terraform/modules/alz_archetype_root/main.tf line 1, in data "alz_archetype_keys" "this": │ 1: data "alz_archetype_keys" "this" { │ │ Unable to find archetype root

I can see the root definition created under the .azlib/0 folder in my workspace locally.

microsoft-github-policy-service[bot] commented 1 week ago

[!NOTE] The "Needs: Author Feedback :ear:" label was removed and the "Needs: Attention :wave:" label was added as per ITA11.

matt-FFFFFF commented 1 week ago

See this workaround:

https://github.com/Azure/Azure-Landing-Zones-Library/issues/12#issuecomment-2200731543

microsoft-github-policy-service[bot] commented 2 days ago
microsoft-github-policy-service[bot] commented 2 days ago

[!IMPORTANT] @WayneBellows, this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

[!TIP] To prevent further actions to take effect, one of the following conditions must be met:

  • The author must respond in a comment within 3 days of this comment.
  • The "Status: No Recent Activity :zzz:" label must be removed.
  • If applicable, the "Status: Long Term :hourglass_flowing_sand:" or the "Needs: Module Owner :mega:" label must be added.

[!NOTE] This message was posted as per ITA04.