terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Terraform OpsGenie Provider: opsgenie_integration_action bug with the description field
Hi there,
It seems that I've found a bug in the Terraform OpsGenie Provider, to be specific an "opsgenie_integration_action" resource. Here is the link to its documentation (https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs/resources/integration_action). In our environment, we use OpsGenie for all possible alerting mechanisms and quite often we supply quite wordy descriptions for our integration actions (such as create, delete, and so on). The problem comes with a multi-line description field, I simply cannot get it pass through the terraform plan command correctly. It always shows the differences between the state and the actual resource. In my coding, we use the Heredoc version of multi-line values for terraform, and even after an apply command, once some other parameters change, the difference related to the description field appears out of nowhere.
Terraform Version
1.2.8
Affected Resource(s)
opsgenie_integration_actions, description field
Terraform Configuration Files
The providers.tf has nothing special, in fact, I used the latest available version of the Opsgenie Provider. The configuration of the integration action: https://gist.github.com/michael-elumeev/d070556bcf8b98d5ffd7fd5ed96e8654
Debug Output
Please provide a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist. https://gist.github.com/michael-elumeev/9851e3b09e0dbb15c17dc16627902b62
Expected Behavior
What should have happened? The description field, in case it contains no changes, shall not be marked as the one, containing differences.
Actual Behavior
What actually happened? Even after applying the file and changing a different parameter (different from the description field), we encounter the same behavior during the terraform plan command. Output marks again the description field as the one containing the difference.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Import the resource (opsgenie integration action) from the OpsGenie using a TF file and import command
- Terraform plan (with -target option to specify only your file)
- terraform apply (with -target option to specify only your file)
- terraform plan (with -target option to specify only your file) - now will show that the configuration is up to date.
- Change something like the severity of alarm in the GUI, reflect the changes in your TF code
- terraform plan with -target option to specify only your file) - it will again show the differences in the description field.
Important Factoids
Everything is pretty standard, except for, as it was mentioned earlier, we have indeed, slightly longer descriptions than shown in the terraform examples.