CrowdStrike / terraform-provider-crowdstrike

https://registry.terraform.io/providers/CrowdStrike/crowdstrike/latest/docs
Mozilla Public License 2.0
10 stars 5 forks source link

Fix: Read provider clientId instead of clientSecret #23

Closed joaoubaldo closed 4 months ago

joaoubaldo commented 4 months ago

When configuring the provider via properties, as shown below, instead of environment variables, the local clientId is being incorrectly set with ClientSecret.

provider "crowdstrike" {
  cloud = "eu-1"
  client_id = var.falcon_client_id
  client_secret = var.falcon_client_secret
}

variable "falcon_client_id" {
  type = string
}
variable "falcon_client_secret" {
  type = string
}

This makes it impossible to configure the provider using configuration properties. The observed error:

│  "errors": [
│   {
│    "code": 403,
│    "message": "Failed to issue access token - Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)"
│   }
│  ]

This PR addresses the issue above.

ffalor commented 4 months ago

Good catch thank you!