forked from IBM-Cloud/terraform-provider-ibm
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IAM Identity: Effective account settings (IBM-Cloud#5583)
- Loading branch information
1 parent
7a2b13c
commit 4854242
Showing
9 changed files
with
1,320 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
examples/ibm-iam-identity-effective-account-settings/README.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,67 @@ | ||
# Examples for IAM Identity Services | ||
|
||
These examples illustrate how to use the resources and data sources associated with IAM Identity Services. | ||
|
||
The following data sources are supported: | ||
* ibm_iam_effective_account_settings | ||
|
||
## Usage | ||
|
||
To run this example, execute the following commands: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Run `terraform destroy` when you don't need these resources. | ||
|
||
## IAM Identity Services data sources | ||
|
||
### Data source: ibm_iam_effective_account_settings | ||
|
||
```hcl | ||
data "ibm_iam_effective_account_settings" "iam_effective_account_settings_instance" { | ||
account_id = var.iam_effective_account_settings_account_id | ||
include_history = var.iam_effective_account_settings_include_history | ||
resolve_user_mfa = var.iam_effective_account_settings_resolve_user_mfa | ||
} | ||
``` | ||
|
||
#### Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|---------| | ||
| account_id | Unique ID of the account. | `string` | true | | ||
| include_history | Defines if the entity history is included in the response. | `bool` | false | | ||
| resolve_user_mfa | Enrich MFA exemptions with user information. | `bool` | false | | ||
|
||
#### Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| context | Context with key properties for problem determination. | | ||
| effective | | | ||
| account | | | ||
| assigned_templates | assigned template section. | | ||
|
||
## Assumptions | ||
|
||
1. TODO | ||
|
||
## Notes | ||
|
||
1. TODO | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| terraform | ~> 0.12 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| ibm | 1.13.1 | |
14 changes: 14 additions & 0 deletions
14
examples/ibm-iam-identity-effective-account-settings/main.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 @@ | ||
provider "ibm" { | ||
ibmcloud_api_key = var.ibmcloud_api_key | ||
} | ||
|
||
// Data source is not linked to a resource instance | ||
// Uncomment if an existing data source instance exists | ||
/* | ||
// Create iam_effective_account_settings data source | ||
data "ibm_iam_effective_account_settings" "iam_effective_account_settings_instance" { | ||
account_id = var.iam_effective_account_settings_account_id | ||
include_history = var.iam_effective_account_settings_include_history | ||
resolve_user_mfa = var.iam_effective_account_settings_resolve_user_mfa | ||
} | ||
*/ |
Empty file.
21 changes: 21 additions & 0 deletions
21
examples/ibm-iam-identity-effective-account-settings/variables.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,21 @@ | ||
variable "ibmcloud_api_key" { | ||
description = "IBM Cloud API key" | ||
type = string | ||
} | ||
|
||
// Data source arguments for iam_effective_account_settings | ||
variable "iam_effective_account_settings_account_id" { | ||
description = "Unique ID of the account." | ||
type = string | ||
default = "account_id" | ||
} | ||
variable "iam_effective_account_settings_include_history" { | ||
description = "Defines if the entity history is included in the response." | ||
type = bool | ||
default = false | ||
} | ||
variable "iam_effective_account_settings_resolve_user_mfa" { | ||
description = "Enrich MFA exemptions with user information." | ||
type = bool | ||
default = false | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/ibm-iam-identity-effective-account-settings/versions.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,9 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
required_providers { | ||
ibm = { | ||
source = "IBM-Cloud/ibm" | ||
version = "1.52.0-beta0" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.