You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a fastly_service_vcl resource including a logging_syslog with tls_ca_cert enabled. Now by making any changes to service, even if it's not related to logging_syslog, I get to see logging_syslog block diff by executing terraform plan.
Digging deeper into the problem, showed it's caused by commiting tls_ca_cert string with a trailing \n (how I passed to it initially) into tfstate. So after each read, terraform compares cert with trailing \n in tfstate with the one without whitespace fetched from fastly-api.
I'm a new comer in GO world and wanted to contribute to your project, but couldn't find a proper way to solve the problem to submit a PR.
Terraform Version
Terraform v1.2.3
on linux_amd64
Affected Resource(s)
fastly_service_vcl
Terraform Configuration Files
resource"fastly_service_vcl""test_service" {
name="test_service"comment="comment"domain {
name="domain.io"comment="domain comment"
}
condition {
name="Response from the Edge"priority=10statement="fastly.ff.visits_this_service == 0"type="RESPONSE"
}
logging_syslog {
name="rsyslog"response_condition="Response from the Edge"address="rsyslog-nlb-7538ba8d23954192.elb.us-east-2.amazonaws.com"port=6514use_tls=truetls_ca_cert=<<-EOF -----BEGIN CERTIFICATE----- XXXX -----END CERTIFICATE----- EOFtls_hostname="tlshostname.host"format="%h %l %u %t \"%r\" %\u003es %b"format_version=2message_type="loggly"placement="none"
}
}
Expected Behavior
Changing service comment must be the only modified line in terraform plan
Actual Behavior
Redundant diff on logging_syslog block.
Steps to Reproduce
terraform apply
make change to any field (image above is a result of changing test_service.comment)
terraform plan
The text was updated successfully, but these errors were encountered:
@Integralist Thanks for your respond. Yes, using trimspace() would do the trick too. However, I was trying to fix this on provider side.
More details on my digging:
I tried using DiffSuppressFunc and StateFunc but them both didn't work (in case of doing such, we receive a newVal here with 2 elements which the second one is not filled with data and causes erorr). I think the reason for that is SetType is not supported by terraform any more.
Hi team
I have a
fastly_service_vcl
resource including alogging_syslog
withtls_ca_cert
enabled. Now by making any changes to service, even if it's not related tologging_syslog
, I get to seelogging_syslog
block diff by executingterraform plan
.Digging deeper into the problem, showed it's caused by commiting
tls_ca_cert
string with a trailing\n
(how I passed to it initially) into tfstate. So after each read, terraform compares cert with trailing\n
in tfstate with the one without whitespace fetched from fastly-api.I'm a new comer in GO world and wanted to contribute to your project, but couldn't find a proper way to solve the problem to submit a PR.
Terraform Version
Affected Resource(s)
fastly_service_vcl
Terraform Configuration Files
Expected Behavior
Changing service comment must be the only modified line in
terraform plan
Actual Behavior
Redundant diff on
logging_syslog
block.Steps to Reproduce
terraform apply
test_service.comment
)terraform plan
The text was updated successfully, but these errors were encountered: