Open
Description
Version information
- terraform: 1.9.8
- terraform provider: 0.21.0
Describe the bug
the lifecycle.ignore_changes argument is not working for the metadata attribute on the payment_method
resource
To Reproduce
- Provision a payment method resource with the ignore_changes argument set to ignore changes to the metadata attribute:
resource "commercelayer_payment_method" "example_1" {
attributes {
name = "example-payment-method-name-1"
payment_source_type = "wire_transfers"
currency_code = "EUR"
price_amount_cents = 4
moto = false
reference = "example-payment-method-ref-1"
}
relationships {
payment_gateway_id = "WxQGrsBGJj"
# market_id is optional
# market_id = "your-market-id"
}
lifecycle {
ignore_changes = [
attributes[0].metadata
]
}
}
- Modify the metadata outside of Terraform
- Update the name of the resource with Terraform
- The metadata field is cleared by Terraform
Expected behavior
Terraform should preserve the metadata set outside of Terraform