I'm configuring a physical interface with a comment which contains a space (eg. "P2P Link")
I'm applying the change, then re-applying or running terraform plan
I'm getting this output:
# module.cpgw01.checkpoint_physical_interface.physical_eth2 will be updated in-place
~ resource "checkpoint_physical_interface" "physical_eth2" {
~ comments = "{P2P Link}" -> "P2P Link"
id = "eth2"
name = "eth2"
# (12 unchanged attributes hidden)
}
Trying to dig into it, I found that the terraform.tfstate file is storing the comments which contains a space within the braces. Comments which do not contains a space are stored as-is.
E.g.:
{
"module": "module.cpgw01",
"mode": "managed",
"type": "checkpoint_physical_interface",
"name": "physical_eth2",
"provider": "provider[\"registry.terraform.io/checkpointsw/checkpoint\"].alias_cpgw01",
"instances": [
{
"schema_version": 0,
"attributes": {
"auto_negotiation": "true",
"comments": "{P2P Link}", <-- note here
"duplex": "Not-Configured",
<snip>
{
"module": "module.cpgw01",
"mode": "managed",
"type": "checkpoint_physical_interface",
"name": "physical_eth3",
"provider": "provider[\"registry.terraform.io/checkpointsw/checkpoint\"].alias_cpgw01",
"instances": [
{
"schema_version": 0,
"attributes": {
"auto_negotiation": "true",
"comments": "Users", <-- note here
"duplex": "Not-Configured",
"enabled": true,
<snip>
Is this done on purpose, to prevent a different issue? Or can it be fixed, and clean up a bit the output?
I'm configuring a physical interface with a comment which contains a space (eg. "P2P Link")
I'm applying the change, then re-applying or running
terraform planI'm getting this output:
Trying to dig into it, I found that the terraform.tfstate file is storing the comments which contains a space within the braces. Comments which do not contains a space are stored as-is.
E.g.:
{ "module": "module.cpgw01", "mode": "managed", "type": "checkpoint_physical_interface", "name": "physical_eth2", "provider": "provider[\"registry.terraform.io/checkpointsw/checkpoint\"].alias_cpgw01", "instances": [ { "schema_version": 0, "attributes": { "auto_negotiation": "true", "comments": "{P2P Link}", <-- note here "duplex": "Not-Configured", <snip> { "module": "module.cpgw01", "mode": "managed", "type": "checkpoint_physical_interface", "name": "physical_eth3", "provider": "provider[\"registry.terraform.io/checkpointsw/checkpoint\"].alias_cpgw01", "instances": [ { "schema_version": 0, "attributes": { "auto_negotiation": "true", "comments": "Users", <-- note here "duplex": "Not-Configured", "enabled": true, <snip>Is this done on purpose, to prevent a different issue? Or can it be fixed, and clean up a bit the output?