Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkpoint_physical_interface with space in comment is stored in state file within braces #125

Open
ctssultana opened this issue Aug 13, 2022 · 1 comment

Comments

@ctssultana
Copy link

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?

@chkp-edenbr
Copy link

Thanks for notifying us, forwarded to GAIA owners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants