|
2 | 2 |
|
3 | 3 | This module is used to grant a user or service ID permissions to work with the IBM Cloud Monitoring with Sysdig service: |
4 | 4 |
|
| 5 | + |
5 | 6 | ## Example Usage |
6 | 7 | ``` |
7 | 8 | provider "ibm" { |
8 | 9 | } |
9 | 10 |
|
10 | 11 | module "access_group" { |
11 | | - source = "terraform-ibm-modules/iam/ibm//modules/access-group" |
| 12 | + // Uncomment following line to point the source to registry level module |
| 13 | + //source = "terraform-ibm-modules/iam/ibm//modules/access-group" |
12 | 14 |
|
13 | | - name = var.name |
14 | | - tags = var.ag_tags |
15 | | - description = var.description |
16 | | -} |
| 15 | + source = "../../modules/access-group" |
17 | 16 |
|
18 | | -module "access_group_policy" { |
19 | | - source = "terraform-ibm-modules/iam/ibm//modules/access-group-policy" |
20 | | - access_group_id = module.access_group.access_group_id |
21 | | - roles = var.roles |
22 | | - tags = var.ag_policy_tags |
23 | | - resources = var.resources |
24 | | - account_management = var.account_management |
25 | | -} |
| 17 | + ######### access group ###################### |
| 18 | + name = var.name |
| 19 | + tags = var.tags |
| 20 | + description = var.description |
| 21 | + provision = var.provision |
| 22 | +
|
| 23 | + ######### access group members ############## |
| 24 | + ibm_ids = var.ibm_ids |
| 25 | + service_ids = var.service_ids |
| 26 | +
|
| 27 | + ######### access group policy ############### |
| 28 | + policies = var.policies |
26 | 29 |
|
27 | | -module "access_group_members" { |
28 | | - source = "terraform-ibm-modules/iam/ibm//modules/access-group-members" |
29 | | - access_group_id = module.access_group.access_group_id |
30 | | - ibm_ids = var.ibm_ids |
31 | | - service_ids = var.service_ids |
| 30 | + ######### access group dynamic rule ######### |
| 31 | + dynamic_rules = var.dynamic_rules |
32 | 32 | } |
| 33 | +
|
33 | 34 | ``` |
34 | 35 |
|
35 | | -<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 36 | +## NOTE: |
| 37 | + |
| 38 | +If we want to make use of a particular version of module, then set the argument "version" to respective module version. |
| 39 | + |
36 | 40 | ## Inputs |
37 | 41 |
|
| 42 | +| Name | Description | Type | Default | Required | |
| 43 | +|---------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| |
| 44 | +| name | A descriptive name used to identify the access group | string | n/a | yes | |
| 45 | +| provision | Used to decide whether to create a new access group or not | bool | true | no | |
| 46 | +| description | The description of the access group. | string | n/a | no | |
| 47 | +| tags | Tags that should be applied to the service | list(string) | n/a | no | |
| 48 | +| service_ids | List of service IDS add to access group. | string | n/a | no | |
| 49 | +| ibm_ids | IBM IDs that you want to add to or remove from the access group. | list(string) | n/a | no | |
| 50 | +| policies | List of access group of policies. | list(any) | n/a | yes | |
| 51 | +| dynamic_rules | List of dynamic rules to add to access group. | list(any) | n/a | yes | |
| 52 | + |
| 53 | + |
| 54 | +## policies inputs |
| 55 | + |
| 56 | +| Name | Description | Type | Default | Required | |
| 57 | +|---------------------|------------------------------------------------------------------|:-------------|:------- :--------- | |
| 58 | +| roles | list of roles. | list(string) | n/a | yes | |
| 59 | +| tags | list of tags that you want to add to the access group policy. | list(string) | n/a | no | |
| 60 | +| account_management | Gives access to all account management services if set to true | bool | false | no | |
| 61 | +| resources | A nested block describes the resource of this policy | string | n/a | no | |
| 62 | +| resource_attributes | A nested block describes the resource attributes of the policy | string | n/a | no | |
| 63 | + |
| 64 | + |
| 65 | +## resources inputs |
| 66 | + |
| 67 | +| Name | Description | Type | Default | Required| |
| 68 | +|-------------------------------|------------------------------------------------------------------|:-------------|:------- :---------| |
| 69 | +| service | service name that you want to include in your policy definition | string | n/a | no | |
| 70 | +| resource_instance_id | ID of resource instance of the policy definition. | string | n/a | no | |
| 71 | +| region | Region of the policy definition | string | n/a | no | |
| 72 | +| resource_type | Resource type of the policy definition. | string | n/a | no | |
| 73 | +| resource | Resource of the policy definition. | string | n/a | no | |
| 74 | +| resource_group_id | ID of the resource group | string | n/a | no | |
| 75 | +| attributes | Set resource attributes in the form of name=value,name=value | string | n/a | no | |
| 76 | + |
| 77 | +## resource_attributes inputs |
| 78 | + |
| 79 | +| Name | Description | Type | Default | Required| |
| 80 | +|-------------------------------|------------------------------------------------------------------|:--------|:------------|:--------| |
| 81 | +| name | Name of the Attribute. | string | n/a | yes | |
| 82 | +| value | Value of the Attribute. | string | n/a | yes | |
| 83 | +| operator | Operator of the Attribute | string | stringEquals| no | |
| 84 | + |
| 85 | +## dynamic_rules inputs |
| 86 | + |
| 87 | +| name | Key of a map taken as name of the rule | string | n/a | yes | |
| 88 | +| expiration | The expiration in hours. | number | n/a | yes | |
| 89 | +| identity_provider | URI for your identity provider.. | string | n/a | yes | |
| 90 | +| conditions | A nested block containes list of conditions that the rule must satisfy | list(map) | n/a | yes | |
| 91 | + |
| 92 | +## conditions Inputs |
| 93 | + |
| 94 | +| Name | Description | Type | Default | Required | |
| 95 | +|----------------------|------------------------------------------------------------------|----------|---------|----------| |
| 96 | +| claim | The key value to evaluate the condition against. | String | n/a | yes | |
| 97 | +| operator | The operation to perform on the claim. | String | n/a | yes | |
| 98 | +| value | Value that the claim is compared by using the conditions.operator| String | n/a | yes | |
38 | 99 |
|
39 | | -| Name | Description | Type | Default | Required | |
40 | | -|--------------------|------------------------------------------------------------------|:-------------|:------- |:---------| |
41 | | -| name | A descriptive name used to identify the access group | string | n/a | yes | |
42 | | -| description | The description of the access group. | string | n/a | no | |
43 | | -| ag_tags | Tags that should be applied to the service | list(string) | n/a | no | |
44 | | -| roles | list of roles. | list(string) | n/a | yes | |
45 | | -| ag_policy_tags | list of tags that you want to add to the access group policy. | list(string) | n/a | no | |
46 | | -| account_management | Gives access to all account management services if set to true | bool | false | no | |
47 | | -| resources | A nested block describes the resource of this policy | string | n/a | no | |
48 | | -| service_ids | List of service IDS add to access group. | string | n/a | no | |
49 | | -| ibm_ids | IBM IDs that you want to add to or remove from the access group. | list(string) | n/a | no | |
50 | | - |
51 | | -## Resources Inputs |
52 | | - |
53 | | -| Name | Description | Type | Default | Required | |
54 | | -|-------------------------------|------------------------------------------------------------------|:-------------|:------- |:---------| |
55 | | -| service | service name that you want to include in your policy definition | string | n/a | no | |
56 | | -| resource_instance_id | ID of resource instance of the policy definition. | string | n/a | no | |
57 | | -| region | Region of the policy definition | string | n/a | no | |
58 | | -| resource_type | Resource type of the policy definition. | string | n/a | no | |
59 | | -| resource | Resource of the policy definition. | string | n/a | no | |
60 | | -| resource_group_id | ID of the resource group | string | n/a | no | |
61 | | -| attributes | Set resource attributes in the form of name=value,name=value | string | n/a | no | |
| 100 | +Note: For more information on input varaibles refer https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/iam_access_group_policy |
62 | 101 |
|
63 | 102 | ## Usage |
64 | 103 |
|
65 | | -To create access members group run the following command |
| 104 | +To create an infrastructure run the following command |
66 | 105 |
|
67 | 106 | `terraform apply -var-file="input.tfvars"` |
68 | 107 |
|
69 | | -Similarly to to remove the access group members run the command |
| 108 | +Similarly to remove an infrastructure run the following command |
70 | 109 |
|
71 | 110 | `terraform destroy -var-file="input.tfvars"` |
0 commit comments