File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,27 @@ The OpenAI provider enables you to configure resources and data sources for your
1313## Example Usage
1414
1515``` terraform
16+ # Configure the OpenAI provider
1617provider "openai" {
1718 admin_key = "sk-admin-0000000000000000000000000000000000000000"
1819}
20+
21+ # Create a project
22+ resource "openai_project" "example" {
23+ name = "Example Project"
24+ }
25+
26+ # Create a service account for the project
27+ resource "openai_project_service_account" "example" {
28+ project_id = openai_project.example.id
29+ name = "my-service-account"
30+ }
31+
32+ # Output the API key for the service account
33+ output "service_account_api_key" {
34+ sensitive = true
35+ value = openai_project_service_account.example.api_key
36+ }
1937```
2038
2139<!-- schema generated by tfplugindocs -->
Original file line number Diff line number Diff line change 1+ # Configure the OpenAI provider
12provider "openai" {
23 admin_key = " sk-admin-0000000000000000000000000000000000000000"
34}
5+
6+ # Create a project
7+ resource "openai_project" "example" {
8+ name = " Example Project"
9+ }
10+
11+ # Create a service account for the project
12+ resource "openai_project_service_account" "example" {
13+ project_id = openai_project. example . id
14+ name = " my-service-account"
15+ }
16+
17+ # Output the API key for the service account
18+ output "service_account_api_key" {
19+ sensitive = true
20+ value = openai_project_service_account. example . api_key
21+ }
You can’t perform that action at this time.
0 commit comments