-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'DOC-4424' into 'master'
DOC-4424: Terraform release v1.0.0 See merge request documentation/doc-terraform-template!88
- Loading branch information
Showing
35 changed files
with
342 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
### Get one of your own access keys (root account or user) | ||
|
||
```hcl | ||
data "outscale_access_key" "access_key01" { | ||
filter { | ||
name = "access_key_ids" | ||
values = ["ABCDEFGHIJ0123456789"] | ||
} | ||
} | ||
``` | ||
|
||
### Get the access key of another user | ||
|
||
```hcl | ||
data "outscale_access_key" "access_key01" { | ||
user_name = "user_name" | ||
filter { | ||
name = "access_key_ids" | ||
values = ["XXXXXXXXX"] | ||
} | ||
filter { | ||
name = "states" | ||
values = ["ACTIVE"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
### Get your own access keys (root account or user) | ||
|
||
```hcl | ||
data "outscale_access_keys" "access_keys01" { | ||
filter { | ||
name = "access_key_ids" | ||
values = ["ABCDEFGHIJ0123456789", "0123456789ABCDEFGHIJ"] | ||
} | ||
} | ||
``` | ||
|
||
### Get the access keys of another user | ||
|
||
```hcl | ||
data "outscale_access_keys" "access_keys" { | ||
user_name = "user_name" | ||
filter { | ||
name = "access_key_ids" | ||
values = ["XXXXXXXXX","YYYYYYYYYY"] | ||
} | ||
filter { | ||
name = "states" | ||
values = ["ACTIVE"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```hcl | ||
data "outscale_entities_linked_to_policy" "entities_linked_policy01" { | ||
policy_orn = "orn:ows:idauth::012345678910:policy/example/example-policy" | ||
entities_type = ["USER","GROUP","ACCOUNT"] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
```hcl | ||
data "outscale_policies" "user_policies" { | ||
filter { | ||
name = "only_linked" | ||
values = [true] | ||
} | ||
filter { | ||
name = "path_prefix" | ||
values = ["/"] | ||
} | ||
filter { | ||
name = "scope" | ||
values = ["LOCAL"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
```hcl | ||
data "outscale_policies_linked_to_user" "linked_policy01" { | ||
user_name = "user_name" | ||
} | ||
``` |
13 changes: 13 additions & 0 deletions
13
Content/data-sources/policies_linked_to_user_group-example.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
```hcl | ||
data "outscale_policies_linked_to_user_group" "managed_policies_linked_to_user_group" { | ||
user_group_name = "user_group_name" | ||
filter { | ||
name = "user_group_ids" | ||
values = ["XXXXXXX","YYYYYY"] | ||
} | ||
filter { | ||
name = "path_prefix" | ||
values = ["/test/"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
```hcl | ||
data "outscale_policy" "user_policy01" { | ||
policy_orn = "orn:ows:idauth::012345678910:policy/example/example-user-policy" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
```hcl | ||
data "outscale_user" "user01" { | ||
filter { | ||
name = "user_ids" | ||
values = ["XXXXXXXXXXXXXXXX"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```hcl | ||
data "outscale_user_group" "user_group01" { | ||
user_group_name = "user_group_name" | ||
path = "/" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
```hcl | ||
data "outscale_user_groups" "usegroups01" { | ||
filter { | ||
name = "user_group_ids" | ||
values = ["XXXXXXXXX","YYYYYYYYYY"] | ||
} | ||
filter { | ||
name = "path_prefix" | ||
values = ["/"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```hcl | ||
data "outscale_user_groups_per_user" "user_groups_per_user01" { | ||
user_name = "user_name" | ||
user_path = "/" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
```hcl | ||
data "outscale_users" "users-2" { | ||
filter { | ||
name = "user_ids" | ||
values = ["XXXXXXXXXXXXXXXX","YYYYYYYYYY"] | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
argument: | ||
add: | ||
state: (Optional) The state for the access key (`ACTIVE` | `INACTIVE`). | ||
remove: | ||
- user_name # Waiting for Terraform implementation | ||
state: (Optional) The state for the access key (`ACTIVE` | `INACTIVE`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
### Creating an access key for yourself | ||
|
||
```hcl | ||
resource "outscale_access_key" "access_key01" { | ||
state = "ACTIVE" | ||
expiration_date = "2023-01-01" | ||
expiration_date = "2028-01-01" | ||
} | ||
``` | ||
|
||
### Creating an access key for another user | ||
|
||
```hcl | ||
resource "outscale_access_key" "access_key_eim01" { | ||
user_name = outscale_user.user-1.user_name | ||
state = "ACTIVE" | ||
expiration_date = "2028-01-01" | ||
depends_on = [outscale_user.user-1] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
```hcl | ||
resource "outscale_policy" "policy-1" { | ||
policy_name = "terraform-policy-1" | ||
description = "test-terraform" | ||
document = file("policy.json") | ||
path = "/" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Import | ||
|
||
A policy can be imported using its ORN. For example: | ||
|
||
```console | ||
|
||
$ terraform import outscale_policy.policy1 orn | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
argument: | ||
add: | ||
set_as_default: (Optional) If set to true, the new policy version is set as the default version, meaning it becomes the active one. Otherwise, the new policy version is not actually active until the `default_version_id` is specified in the `outscale_user` or `outscale_user_group` resources. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```hcl | ||
resource "outscale_policy_version" "Policy2-version-02" { | ||
policy_orn = outscale_policy.policy-2.orn | ||
document = file("policy.json") | ||
set_as_default = true | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
~> **Note** At creation, the initial version of a policy is set to 'V1' by default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
argument: | ||
add: | ||
default_version_id: The ID of a policy version that you want to make the default one (the active one). |
Oops, something went wrong.