Skip to content

Commit

Permalink
IAM Identity: Effective account settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pooraniss-ibm committed Oct 21, 2024
1 parent 0fc55fc commit 765cf03
Show file tree
Hide file tree
Showing 8 changed files with 1,319 additions and 0 deletions.
67 changes: 67 additions & 0 deletions examples/ibm-iam-identity-effective-account-settings/README.md
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 examples/ibm-iam-identity-effective-account-settings/main.tf
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 examples/ibm-iam-identity-effective-account-settings/variables.tf
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
}
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"
}
}
}
Loading

0 comments on commit 765cf03

Please sign in to comment.