Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
elasticstack_kibana_action_connector.observability_gemini_connector: Creating...
╷
│ Error: unknown connector type [.gemini]
│
│ with elasticstack_kibana_action_connector.observability_gemini_connector,
│ on observability_elastic_ai_assistant.tf line 18, in resource "elasticstack_kibana_action_connector" "observability_gemini_connector":
│ 18: resource "elasticstack_kibana_action_connector" "observability_gemini_connector" {
│
╵
**Expected behavior**
I would expect the connector to be created. I was able to make it work when I created it from UI
When I created connected in UI, I exported it as saved object and matched the config to Terraform. Thats how I find the `.gemini` as connector_type_id.
Describe the bug Terraform can't spin up Gemini Connector for Elastic AI Assistant using
elasticstack_kibana_action_connector
resource.To Reproduce Steps to reproduce the behavior: Assume that elastic connection is already set up and working
resource "google_service_account_key" "observability_gemini" { service_account_id = google_service_account.gemini_sa.id }
resource "google_project_iam_member" "observability_gemini" { member = google_service_account.gemini_sa.member project = ""
role = "roles/aiplatform.user"
}
resource "elasticstack_kibana_action_connector" "observability_gemini_connector" { provider = elasticstack.observability connector_type_id = ".gemini" name = "gemini-playground" config = jsonencode({ apiUrl = "https://europe-west3-aiplatform.googleapis.com" defaultModel = "gemini-1.5-pro-001" gcpProjectID = ""
gcpRegion = "europe-west3"
})
secrets = base64decode(google_service_account_key.gemini_sa.private_key)
}
elasticstack_kibana_action_connector.observability_gemini_connector will be created
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.
Enter a value: yes
elasticstack_kibana_action_connector.observability_gemini_connector: Creating... ╷ │ Error: unknown connector type [.gemini] │ │ with elasticstack_kibana_action_connector.observability_gemini_connector, │ on observability_elastic_ai_assistant.tf line 18, in resource "elasticstack_kibana_action_connector" "observability_gemini_connector": │ 18: resource "elasticstack_kibana_action_connector" "observability_gemini_connector" { │ ╵
{ "attributes": { "actionTypeId": ".gemini", "config": { "apiUrl": "https://europe-west3-aiplatform.googleapis.com", "defaultModel": "gemini-1.5-pro-001", "gcpProjectID": "",
"gcpRegion": "europe-west3"
},
"isMissingSecrets": true,
"name": "gemini-playground",
"secrets": {}
},
"coreMigrationVersion": "8.8.0",
"created_at": "2024-08-23T08:22:53.546Z",
"id": "dddd16c7-859e-49cf-903f-9305f82c660b",
"managed": false,
"references": [],
"sort": [
1724401373546,
4294967344
],
"type": "action",
"typeMigrationVersion": "10.1.0",
"updated_at": "2024-08-23T08:22:53.546Z",
"version": "WzIwOTAwOTUsNDdd"
}