Skip to content

Commit 4b97119

Browse files
authored
docs(account_project): add example with provider configuration (#2333)
1 parent 3faa9be commit 4b97119

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

docs/resources/account_project.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,41 @@ page_title: "Scaleway: scaleway_account_project"
77

88
Manages organization's projects on Scaleway.
99

10-
## Example Usage
10+
## Examples
11+
12+
### Basic
1113

1214
```hcl
1315
resource "scaleway_account_project" "project" {
1416
name = "project"
1517
}
1618
```
1719

20+
### Use project in provider configuration
21+
22+
If you want to use as default a project created in terraform you can use a temporary provider alias.
23+
This project can then be used to configure your default provider.
24+
25+
```hcl
26+
provider "scaleway" {
27+
alias = "tmp"
28+
}
29+
30+
resource scaleway_account_project "project" {
31+
provider = scaleway.tmp
32+
name = "my_project"
33+
}
34+
35+
provider "scaleway" {
36+
project_id = scaleway_account_project.project.id
37+
}
38+
39+
resource "scaleway_instance_server" "server" { // Will use scaleway_account_project.project
40+
image = "ubuntu_jammy"
41+
type = "PRO2-XXS"
42+
}
43+
```
44+
1845
## Arguments Reference
1946

2047
The following arguments are supported:

0 commit comments

Comments
 (0)