Comments (11)
@adikus works like a charm, thanks!
from terraform-provider-better-uptime.
This was added in ce3496b
However if configured, terraform wants to update in-place the resource each time it's run even if there is no change.
from terraform-provider-better-uptime.
Closing this, as the issues with expected_status_code
should be now fixed on the API side.
from terraform-provider-better-uptime.
@adikus, just tested and still the same issue.
from terraform-provider-better-uptime.
@hydrapolic which version of the plugin are you using? I just tested this with the latest one, and creating / updating a monitor with an expected_status_code
worked as I would expect.
If you're on the latest version (0.3.8), could you please share your terraform config at [email protected] so that we can have a look?
from terraform-provider-better-uptime.
@adikus I'm using version 0.3.8.
When issuing terraform plan
, it's stated that the monitors will be updated in place. Of course there's nothing wrong with it, but in fact the value of expected_status_codes
haven't changed at all so it should state "no change".
from terraform-provider-better-uptime.
Just checked the output again. It seems like it only happens for monitors that had expected_status_codes
defined previously but then we turned it off (for example we started monitoring a service that returned 404 for url /
, but later it was changed to 200 so expected_status_codes
was unnecessary).
from terraform-provider-better-uptime.
How to reproduce:
- set up a monitor with
monitor_type = expected_status_code
and fill inexpected_status_codes
(for example 200/404) - change
monitor_type
tostatus
# terraform apply
# monitor will be updated in-place
~ resource "betteruptime_monitor" "monitor" {
~ expected_status_codes = [
- 200,
- 404,
]
~ monitor_type = "expected_status_code" -> "status"
terraform apply
# monitor.monitor will be updated in-place
~ resource "betteruptime_monitor" "monitor" {
~ expected_status_codes = [
- 200,
- 404,
]
# (21 unchanged attributes hidden)
}
from terraform-provider-better-uptime.
@hydrapolic Thanks for the instructions on how to reproduce. Looks like we're not allowing for the expected status codes to be unset once they've been set. I'll have a look into that.
In the meantime it sounds like the workaround, if I can call it that, is to keep some status code in there (e.g. [200]
), even if it's not going to be used.
from terraform-provider-better-uptime.
An alternative to that is to ignore changes in expected_status_codes
once they are applied:
lifecycle {
ignore_changes = [
expected_status_codes
]
}
from terraform-provider-better-uptime.
@hydrapolic We rolled out a change to the API, so when you completely remove expected_status_codes
it will get correctly propagated.
from terraform-provider-better-uptime.
Related Issues (20)
- betteruptime_status_page does not support history parameter HOT 2
- Terraform provider does not update monitor paused status HOT 3
- Missing ability to show history graphs HOT 2
- Field history updates all the time HOT 3
- Auth values always shows up as a change HOT 3
- resource_status_page is missing custom_js
- resource_status_page is missing automatic_reports HOT 1
- Status Page Resource missing `widget_type` attribute HOT 10
- Monitor_type not accepting values in Terraform HOT 2
- Invalid region sent when state mismatch HOT 2
- multiple betteruptime_monitor fields do not specify unit of time
- betteruptime_monitor: variable verify_ssl = false should disable ssl_expiration variable HOT 2
- logo_url drift HOT 1
- GCP monitoring webhook HOT 2
- Unable to add resource to status page HOT 4
- Feature: add data blocks for ip ranges HOT 3
- Correct type of policy_id in email integration HOT 3
- PATCH request for email integration returning 422 HOT 5
- Email integrations `match_between` has `content_after` and `content_before` mapped out of order? HOT 5
- Impossible to disable domain_expiration check after being set HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-better-uptime.