File tree 2 files changed +36
-0
lines changed
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
13
13
## Example Usage
14
14
15
15
``` terraform
16
+ # Configure the OpenAI provider
16
17
provider "openai" {
17
18
admin_key = "sk-admin-0000000000000000000000000000000000000000"
18
19
}
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
+ }
19
37
```
20
38
21
39
<!-- schema generated by tfplugindocs -->
Original file line number Diff line number Diff line change
1
+ # Configure the OpenAI provider
1
2
provider "openai" {
2
3
admin_key = " sk-admin-0000000000000000000000000000000000000000"
3
4
}
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