I’ve added the public ssh keys via the console to instance metadata on a GCE instance. But I want to ignore this change in terraform (don’t want to add ssh keys in code) by using lifecycle ignore_changes. I’ve tried using the following but it doesn’t work:
lifecycle {
ignore_changes = [
metadata.ssh-keys
]
}
I know you can ignore ALL metadata but I don’t want to do that. Just want to ignore ssh keys. What is the exact name I need to use as metadata.ssh-keys doesn’t work? The plan runs as normal but still includes changes to the ssh keys when it should be ignoring them.