Hi @jbardin, this was turned out to be very old and seem to be a feature of Terraform, modules and the depends_on Meta-Argument.
Terraform document on feature
The code that was causing the issue was some code that called this child module and that it had a depends on another module. The reason for the other depends was due that resources needed to be created first before the other module ran.
It seems the depends for the other module was causing this one to think it needed to reapplied and recheck the values for the current subscription.
Simple fix for us was to depend on the resource in the other child which was required to be build first and not the whole module.
Section of code causing issue
module "backup_share" {
source = "./modules/backup_share"
backup_resource_type = "fs"
backup_tier_letter = "a"
sa_id = azurerm_storage_account.softwaredeployment_sa.id
fs_name = azurerm_storage_share.softwaredeployment.name
depends_on = [module.join_sa_to_rsv] #here is the issue causing the bad plan
}
module "join_sa_to_rsv" {
depends_on = [azurerm_backup_policy_file_share.policy1]
source = "./modules/join_sa_to_rsv"
sa_id = azurerm_storage_account.softwaredeployment_sa.id
}
We changed it to
module "backup_share" {
source = "./modules/backup_share"
backup_resource_type = "fs"
backup_tier_letter = "a"
sa_id = azurerm_storage_account.softwaredeployment_sa.id
fs_name = azurerm_storage_share.softwaredeployment.name
depends_on = [module.join_sa_to_rsv.protect_container_sa] #replaced with the resource we needed built
}
module "join_sa_to_rsv" {
depends_on = [azurerm_backup_policy_file_share.policy1]
source = "./modules/join_sa_to_rsv"
sa_id = azurerm_storage_account.softwaredeployment_sa.id
}
Hope this helps someone else.