Skip to content

ignore_changes_to does not handle fields with . in their names #323

@hutchy2570

Description

@hutchy2570

I am using this provider to create and manage some microsoft azure resources which don't yet have support within Azure Resource Manager. The returned JSON body from the API has a server generated field @odata.etag which I want to ignore changes to.

example response:

{
  "@odata.etag": "\"some server generated value\"",
  "name": "my-resource-name"
}

I've tried:

ignore_changes_to = ["@odata.etag"]
ignore_changes_to = ["@odata\\.etag"]

However I've not been able to find a way to make this work, as this provider treats this as being a json path, not a full field name.

Based on how the ignore fields are being split, I don't think there is a way currently for me to ignore a field with a . in it's name.

Where the field splitting is being performed: https://github.com/Mastercard/terraform-provider-restapi/blob/master/restapi/delta_checker.go#L103

Please let me know if I've missed something and there is already a way to escape the . character in the field name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions