OpsLevel / terraform-provider-opslevel

Terraform provider for OpsLevel.com
https://registry.terraform.io/providers/OpsLevel/opslevel/latest/docs
MIT License
8 stars 5 forks source link

fix listing services, show empty list when no services exist #338

Closed davidbloss closed 4 months ago

davidbloss commented 4 months ago

Issues

nil pointer deference on plural service datasource

Changelog

Fix listing services, show empty list when no services exist.

Tophatting

Using this config:

data "opslevel_services" "all" {}

output "all_services" {
  value = data.opslevel_services.all.services
}

Run task plan against account with no services

data.opslevel_services.all: Reading...
data.opslevel_services.all: Read complete after 1s

Changes to Outputs:
  + all_services = []

You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.