Repository navigation
feat(observability): add http check resource - #1830
Open
ibrahimyesilay wants to merge 2 commits into
Open
ibrahimyesilay wants to merge 2 commits into
ibrahimyesilay wants to merge 2 commits into
Conversation
Add `stackit_observability_http_check`, backed by the HTTP check endpoints of the Observability API (create, list, delete). The API has no update or single-get operation, so all attributes force a replacement and Read looks the check up by ID in the list response. relates to stackitcloud#1829
The API returns the existing check when a check for the same URL is created again, so two resources with the same url manage the same check. relates to stackitcloud#1829
8 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
relates to #1829
Adds
stackit_observability_http_check, based on the HTTP check endpoints of the Observability API (CreateHttpCheck,ListHttpChecks,DeleteHttpCheck).url,project_idandinstance_idforce a replacement, andReadlooks the check up by ID in the list response (removed from state if the check or the instance is gone).httpCheckin the response. If that field is missing, the check is looked up by URL inhttpChecks(create fails if it cannot be found unambiguously).urlwould therefore manage the same check, so this is stated in the resource description.project_id,instance_id,http_check_id.The certificate check from #1829 will follow in a separate PR.
Testing
mapFields,toCreatePayload, the ID lookup on create and the lookup on read.TestAccResourceMin(observability) extended with the HTTP check: create, import, and update (URL change → replacement). Run against a STACKIT project: PASS.make fmt,make lint,make test,make generate-docspass locally.Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)