Skip to content

Conversation

@AnshitAgrawal
Copy link
Contributor

@AnshitAgrawal AnshitAgrawal commented Aug 18, 2025


Before the change?

In one of our example, instead of using api..signalfx.com we are making use of external-api..signalfx.com api URL. So in order to achieve it, following support is added in which if apiUrl is passed in providers.tf, it will take precedence otherwise default one will be used.
In order to make that work in synthetics teraform provider, it is required to update the synthetics client code as well so that the non exportable variables can be set from Upstream.

After the change?

This is totally a new function in client code, so it will not affect the existing functionality in any way.

Pull request checklist

  • Acceptance Tests have been updated, run (make testacc), and pasted in this PR (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Acceptance Test Output


Does this introduce a breaking change?

  • Yes
  • No

@github-actions
Copy link

github-actions bot commented Aug 18, 2025

CLA Assistant Lite bot CLA Assistant Lite bot All contributors have signed the COC ✍️ ✅

@AnshitAgrawal
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

srv-gh-tools added a commit to splunk/cla-agreement that referenced this pull request Aug 18, 2025
@AnshitAgrawal
Copy link
Contributor Author

Testing results along with changes in splunk/terraform-provider-synthetics#78.

1. Failure logs with worng custom URL -

2025-08-18T19:58:54.916+0530 [ERROR] vertex "synthetics_create_browser_check_v2.browser_v2_foo_check" error: Post "https://api.lab.signalfx.com/v2/synthetics/tests/browser": dial tcp: lookup api.lab.signalfx.com: no such host


│ Error: Post "https://api.lab.signalfx.com/v2/synthetics/tests/browser": dial tcp: lookup api.lab.signalfx.com: no such host

│ with synthetics_create_browser_check_v2.browser_v2_foo_check,
│ on a.tf line 17, in resource "synthetics_create_browser_check_v2" "browser_v2_foo_check":
│ 17: resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" {


2025-08-18T19:58:54.919+0530 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-08-18T19:58:54.920+0530 [DEBUG] provider: plugin process exited: path=/Users/anshiagr/tf-provider/new/terraform-provider-synthetics pid=39882
2025-08-18T19:58:54.921+0530 [DEBUG] provider: plugin exited

2. Logs with no custom URL field [ I abrupty failed as I dont want to apply]

2025-08-18T20:00:25.741+0530 [ERROR] vertex "synthetics_create_browser_check_v2.browser_v2_foo_check" error: Post "https://api.lab0.signalfx.com/v2/synthetics/tests/browser": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

│ Error: Post "https://api.lab0.signalfx.com/v2/synthetics/tests/browser": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

│ with synthetics_create_browser_check_v2.browser_v2_foo_check,
│ on a.tf line 16, in resource "synthetics_create_browser_check_v2" "browser_v2_foo_check":
│ 16: resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" {


2025-08-18T20:00:25.751+0530 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-08-18T20:00:25.760+0530 [DEBUG] provider: plugin process exited: path=/Users/anshiagr/tf-provider/new/terraform-provider-synthetics pid=40106

3. Logs with custom URL and working [ 403 because of VPN issue]

2025-08-18T20:01:20.248+0530 [ERROR] vertex "synthetics_create_browser_check_v2.browser_v2_foo_check" error: unknown error, status code: 403

│ Error: unknown error, status code: 403

│ with synthetics_create_browser_check_v2.browser_v2_foo_check,
│ on a.tf line 17, in resource "synthetics_create_browser_check_v2" "browser_v2_foo_check":
│ 17: resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" {


2025-08-18T20:01:20.255+0530 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-08-18T20:01:20.257+0530 [DEBUG] provider: plugin process exited: path=/Users/anshiagr/tf-provider/new/terraform-provider-synthetics pid=40256
2025-08-18T20:01:20.257+0530 [DEBUG] provider: plugin exited

@AnshitAgrawal
Copy link
Contributor Author

I have read the Code of Conduct and I hereby accept the Terms

@Pajk Pajk merged commit 5e132bd into splunk:v2 Sep 4, 2025
4 of 7 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants