-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f90873a
commit 93b7cc4
Showing
6 changed files
with
319 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...er_oapi/data/user/TF-01_user_resource_attributes_ok/step1.user_resource_attributes_ok.ref
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,32 @@ | ||
{ | ||
"version": "########", | ||
"terraform_version": "########", | ||
"serial": "########", | ||
"lineage": "########", | ||
"outputs": {}, | ||
"resources": [ | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_user", | ||
"name": "userInteg", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"id": "##id-0##", | ||
"last_modification_date": "########", | ||
"path": "/", | ||
"policy": [], | ||
"user_id": "##id-0##", | ||
"user_name": "test_integ" | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==" | ||
} | ||
] | ||
} | ||
], | ||
"check_results": "########" | ||
} |
4 changes: 4 additions & 0 deletions
4
...der_oapi/data/user/TF-01_user_resource_attributes_ok/step1.user_resource_attributes_ok.tf
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,4 @@ | ||
resource "outscale_user" "userInteg" { | ||
user_name = "test_integ" | ||
path = "/" | ||
} |
70 changes: 70 additions & 0 deletions
70
...er_oapi/data/user/TF-01_user_resource_attributes_ok/step2.user_resource_attributes_ok.ref
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,70 @@ | ||
{ | ||
"version": "########", | ||
"terraform_version": "########", | ||
"serial": "########", | ||
"lineage": "########", | ||
"outputs": {}, | ||
"resources": [ | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_policy", | ||
"name": "policy_user01", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"description": "Example of description", | ||
"document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}", | ||
"id": "##id-0##", | ||
"is_linkable": true, | ||
"last_modification_date": "########", | ||
"orn": "########", | ||
"path": "/okht/", | ||
"policy_default_version_id": "##id-1##", | ||
"policy_id": "##id-2##", | ||
"policy_name": "okht-user-policy", | ||
"resources_count": 0 | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==" | ||
} | ||
] | ||
}, | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_user", | ||
"name": "userInteg", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"id": "##id-3##", | ||
"last_modification_date": "########", | ||
"path": "/Integ/", | ||
"policy": [ | ||
{ | ||
"creation_date": "########", | ||
"last_modification_date": "########", | ||
"policy_id": "##id-2##", | ||
"policy_name": "okht-user-policy", | ||
"policy_orn": "orn:ows:idauth::339215505907:policy/okht/okht-user-policy" | ||
} | ||
], | ||
"user_id": "##id-3##", | ||
"user_name": "test_integ_update" | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==", | ||
"dependencies": [ | ||
"outscale_policy.policy_user01" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"check_results": "########" | ||
} |
14 changes: 14 additions & 0 deletions
14
...der_oapi/data/user/TF-01_user_resource_attributes_ok/step2.user_resource_attributes_ok.tf
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,14 @@ | ||
resource "outscale_policy" "policy_user01" { | ||
description = "Example of description" | ||
document = "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}" | ||
path = "/okht/" | ||
policy_name = "okht-user-policy" | ||
} | ||
|
||
resource "outscale_user" "userInteg" { | ||
user_name = "test_integ_update" | ||
path = "/Integ/" | ||
policy { | ||
policy_orn = outscale_policy.policy_user01.orn | ||
} | ||
} |
158 changes: 158 additions & 0 deletions
158
...TF-03_user_group_datasources_attributes_ok/step1.user_group_datasources_attributes_ok.ref
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,158 @@ | ||
{ | ||
"version": "########", | ||
"terraform_version": "########", | ||
"serial": "########", | ||
"lineage": "########", | ||
"outputs": {}, | ||
"resources": [ | ||
{ | ||
"mode": "data", | ||
"type": "outscale_user_groups", | ||
"name": "testgrpData", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"filter": "########", | ||
"id": "##id-0##", | ||
"user_groups": [ | ||
{ | ||
"creation_date": "########", | ||
"last_modification_date": "########", | ||
"orn": "########", | ||
"path": "/TestdataUG/", | ||
"user_group_id": "##id-1##", | ||
"user_group_name": "testDataugInteg" | ||
} | ||
] | ||
}, | ||
"sensitive_attributes": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_policy", | ||
"name": "policy_userGroup01", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"description": "Example of description", | ||
"document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}", | ||
"id": "##id-2##", | ||
"is_linkable": true, | ||
"last_modification_date": "########", | ||
"orn": "########", | ||
"path": "/okht/", | ||
"policy_default_version_id": "##id-3##", | ||
"policy_id": "##id-4##", | ||
"policy_name": "group-policy", | ||
"resources_count": 0 | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==" | ||
} | ||
] | ||
}, | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_policy", | ||
"name": "policy_userTest", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"description": "Example of description", | ||
"document": "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}", | ||
"id": "##id-5##", | ||
"is_linkable": true, | ||
"last_modification_date": "########", | ||
"orn": "########", | ||
"path": "/", | ||
"policy_default_version_id": "##id-3##", | ||
"policy_id": "##id-6##", | ||
"policy_name": "user-policy", | ||
"resources_count": 0 | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==" | ||
} | ||
] | ||
}, | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_user", | ||
"name": "userTest", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"id": "##id-7##", | ||
"last_modification_date": "########", | ||
"path": "/IntegGroup/", | ||
"policy": [ | ||
{ | ||
"creation_date": "########", | ||
"last_modification_date": "########", | ||
"policy_id": "##id-6##", | ||
"policy_name": "user-policy", | ||
"policy_orn": "orn:ows:idauth::339215505907:policy/user-policy" | ||
} | ||
], | ||
"user_id": "##id-7##", | ||
"user_name": "group_user" | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==", | ||
"dependencies": [ | ||
"outscale_policy.policy_userTest" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"mode": "managed", | ||
"type": "outscale_user_group", | ||
"name": "dataUserGroupInteg", | ||
"provider": "provider[\"registry.terraform.io/outscale/outscale\"]", | ||
"instances": [ | ||
{ | ||
"schema_version": 0, | ||
"attributes": { | ||
"creation_date": "########", | ||
"id": "##id-8##", | ||
"last_modification_date": "########", | ||
"orn": "########", | ||
"path": "/TestdataUG/", | ||
"policy": [ | ||
{ | ||
"creation_date": "########", | ||
"last_modification_date": "########", | ||
"policy_id": "##id-4##", | ||
"policy_name": "group-policy", | ||
"policy_orn": "orn:ows:idauth::339215505907:policy/okht/group-policy" | ||
} | ||
], | ||
"user": [], | ||
"user_group_id": "##id-1##", | ||
"user_group_name": "testDataugInteg" | ||
}, | ||
"sensitive_attributes": [], | ||
"private": "bnVsbA==", | ||
"dependencies": [ | ||
"outscale_policy.policy_userGroup01" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"check_results": "########" | ||
} |
41 changes: 41 additions & 0 deletions
41
.../TF-03_user_group_datasources_attributes_ok/step1.user_group_datasources_attributes_ok.tf
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,41 @@ | ||
resource "outscale_policy" "policy_userGroup01" { | ||
description = "Example of description" | ||
document = "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}" | ||
path = "/okht/" | ||
policy_name = "group-policy" | ||
} | ||
|
||
resource "outscale_policy" "policy_userTest" { | ||
description = "Example of description" | ||
document = "{\"Statement\": [ {\"Effect\": \"Allow\", \"Action\": [\"*\"], \"Resource\": [\"*\"]} ]}" | ||
path = "/" | ||
policy_name = "user-policy" | ||
} | ||
|
||
resource "outscale_user" "userTest" { | ||
user_name = "group_user" | ||
path = "/IntegGroup/" | ||
policy { | ||
policy_orn = outscale_policy.policy_userTest.orn | ||
} | ||
} | ||
|
||
resource "outscale_user_group" "dataUserGroupInteg" { | ||
user_group_name = "testDataugInteg" | ||
path = "/TestdataUG/" | ||
policy { | ||
policy_orn = outscale_policy.policy_userGroup01.orn | ||
} | ||
} | ||
|
||
data "outscale_user_groups" "testgrpData" { | ||
filter { | ||
name = "user_group_ids" | ||
values = [outscale_user_group.dataUserGroupInteg.user_group_id] | ||
} | ||
filter { | ||
name = "path_prefix" | ||
values = ["/TestdataUG/"] | ||
} | ||
} | ||
|