From 73fa7e062f1ed6d5119400b2ea776943f5fb1167 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Fri, 4 Jun 2021 17:48:28 +0000 Subject: [PATCH] default if empty for compute_interconnect_attachment encryption (#4841) Signed-off-by: Modular Magician --- .changelog/4841.txt | 3 +++ google/resource_compute_interconnect_attachment.go | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 .changelog/4841.txt diff --git a/.changelog/4841.txt b/.changelog/4841.txt new file mode 100644 index 00000000000..ebae1cb2d7b --- /dev/null +++ b/.changelog/4841.txt @@ -0,0 +1,3 @@ +```release-note:bug +compute: fixed bug where `encryption` showed a perma-diff on resources created prior to the feature being released. +``` diff --git a/google/resource_compute_interconnect_attachment.go b/google/resource_compute_interconnect_attachment.go index 9fed8ea12f6..7bf30baa5e8 100644 --- a/google/resource_compute_interconnect_attachment.go +++ b/google/resource_compute_interconnect_attachment.go @@ -817,6 +817,10 @@ func flattenComputeInterconnectAttachmentIpsecInternalAddresses(v interface{}, d } func flattenComputeInterconnectAttachmentEncryption(v interface{}, d *schema.ResourceData, config *Config) interface{} { + if v == nil || isEmptyValue(reflect.ValueOf(v)) { + return "NONE" + } + return v }