Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[datadog_synthetics_test] Handle secure config_variables on import #2653

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

skarimo
Copy link
Member

@skarimo skarimo commented Nov 8, 2024

On import, previous state does not exist so we cannot rely on the previous state to set the old values in state for example and pattern.

Stack trace:

➜  ~/Documents/terraform terraform plan -generate-config-out=generated3.tf
datadog_synthetics_test.test_integration_installation: Preparing import... [id=123]
datadog_synthetics_test.test_integration_installation: Refreshing state... [id=123]

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-datadog_v3.46.0 plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 134 [running]:
github.com/terraform-providers/terraform-provider-datadog/datadog.buildTerraformConfigVariables({0x14000b3e140, 0x2, 0x9?}, {0x105113b40, 0x0, 0x0?})
        github.com/terraform-providers/terraform-provider-datadog/datadog/resource_datadog_synthetics_test_.go:2939 +0x5f0

Copy link
Contributor

@Drarig29 Drarig29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to an issue or add the error message and stack trace to the PR's description?

@jack-edmonds-dd jack-edmonds-dd merged commit b27579d into master Nov 8, 2024
13 checks passed
@jack-edmonds-dd jack-edmonds-dd deleted the sherz/fix-synthetics-panic branch November 8, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants