Open powellquiring opened 1 year ago
If you have have problems reproducing this please reach out.
Just ran into this again.
Wrote a simple test to reproduce and could not reproduce.
variable "region" {}
variable "prefix" {}
variable "resource_group" {}
/////////////////////////////////////////
provider "ibm" {
region = var.region
}
/////////////////////////////////////////
data "ibm_resource_group" "group" {
name = var.resource_group
}
/////////////////////////////////////////
locals {
settings = {
basename = var.prefix
region = var.region
resource_group_id = data.ibm_resource_group.group.id
tags = [
"basename:tvpc",
"dir:_Users_pquiring_github.ibm.com_portfolio-solutions_transit_vpc_config_tf",
]
}
}
resource "ibm_tg_gateway" "tgw" {
name = "${local.settings.basename}-tgw-link"
location = local.settings.region
global = false
resource_group = local.settings.resource_group_id
tags = local.settings.tags
}
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
This is in the context of a large configuration. Here is the relevant section. The debug output below demonstrates that the only perceived change was the tags. There was no change in the tags. Maybe this is another bug that the tags were not initially added to the state?
Debug Output
Panic Output
Expected Behavior
It took two applies to demonstrate the bug. The first apply must not have persisted the tags in the state. The second apply demonstrated the bug. A third apply reported no changes (so the apply2 must have changed the tags?).
apply3:
Actual Behavior
Steps to Reproduce
A cut down is not currently available. Let me know if you have a problem reproducing this and I can work on a cutdown. I'm currently working in this repo: https://github.ibm.com/portfolio-solutions/transit_vpc
The bug is in https://github.ibm.com/portfolio-solutions/transit_vpc/tree/master/enterprise_link_tf
Important Factoids
References
0000