You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Remove the content in this H2 heading after completing the steps -->
14
-
15
-
## Submit a new module
16
-
17
-
:+1::tada: Thank you for taking the time to contribute! :tada::+1:
18
-
19
-
This template repository exists to help you create Terraform modules for IBM Cloud.
20
-
21
-
The default structure includes the following files:
22
-
23
-
-`README.md`: A description of the module
24
-
-`main.tf`: The logic for the module
25
-
-`version.tf`: The required terraform and provider versions
26
-
-`variables.tf`: The input variables for the module
27
-
-`outputs.tf`: The values that are output from the module
28
-
For more information, see [Module structure](https://terraform-ibm-modules.github.io/documentation/#/module-structure) in the project documentation.
29
-
30
-
You can add other content to support what your module does and how it works. For example, you might add a `scripts/` directory that contains shell scripts that are run by a `local-exec``null_resource` in the Terraform module.
31
-
32
-
Follow this process to create and submit a Terraform module.
33
-
34
-
### Create a repo from this repo template
35
-
36
-
1. Create a repository from this repository template by clicking `Use this template` in the upper right of the GitHub UI.
37
-
    <br>For more information about creating a repository from a template, see the [GitHub docs](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
38
-
1. Select `terraform-ibm-modules` as the owner.
39
-
1. Enter a name for the module in format `terraform-ibm-<NAME>`, where `<NAME>` reflects the type of infrastructure that the module manages.
40
-
    <br>Use hyphens as delimiters for names with multiple words (for example, terraform-ibm-`activity-tracker`).
41
-
1. Provide a short description of the module.
42
-
    <br>The description is displayed under the repository name on the [organization page](https://github.com/terraform-ibm-modules) and in the **About** section of the repository. Use the description to help users understand the purpose of your module. For more information, see [module names and descriptions](https://terraform-ibm-modules.github.io/documentation/#/implementation-guidelines?id=module-names-and-descriptions) in the docs.
43
-
44
-
### Clone the repo and set up your development environment
45
-
46
-
Locally clone the new repository and set up your development environment by completing the tasks in [Local development setup](https://terraform-ibm-modules.github.io/documentation/#/local-dev-setup) in the project documentation.
47
-
48
-
### Update the repo name and description in source control
49
-
50
-
To help make sure that the repo name and description are not changed except through pull requests, they are defined in the `settings.yml` file.
51
-
52
-
Check to make sure that values are uncommented and correct:
53
-
54
-
1. Open the [settings.yml](.github/settings.yml) file.
55
-
1. If not already updated, uncomment the `name` and `description` properties and set the values to what you specified when you requested the repo.
56
-
57
-
### Update the Terraform files
58
-
59
-
Implement the logic for your module by updating the `main.tf`, `version.tf`, `variables.tf`, and `outputs.tf` Terraform files. For more information, see [Creating Terraform on IBM Cloud templates](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-create-tf-config).
60
12
61
-
### Create examples and tests
62
-
63
-
Add one or more examples in the `examples` directory that consume your new module, and configure tests for them in the `tests` directory. For more information about tests, see [Tests](https://terraform-ibm-modules.github.io/documentation/#/tests).
64
-
65
-
### Update the content in the readme file
66
-
67
-
After you implement the logic for your module and create examples and tests, update this readme file in your repository by following these steps:
68
-
69
-
1. Update the title heading and add a description about your module.
70
-
1. Update the badge links.
71
-
1. Remove all the content in this H2 heading section.
72
-
1. Complete the [Usage](#usage) and [Required IAM access policies](#required-iam-access-policies) sections. The [Examples](#examples) and [Requirements](#requirements) section are populated by a pre-commit hook.
73
-
74
-
### Commit your code and submit your module for review
75
-
76
-
1. Before you commit any code, review [Contributing to the IBM Cloud Terraform modules project](https://terraform-ibm-modules.github.io/documentation/#/contribute-module) in the project documentation.
77
-
1. Create a pull request for review.
78
-
79
-
### Post-merge steps
80
-
81
-
After the first PR for your module is merged, follow these post-merge steps:
82
-
83
-
1. Create a PR to enable the upgrade test by removing the `t.Skip` line in `tests/pr_test.go`.
84
-
85
-
<!-- Remove the content in this previous H2 heading -->
13
+
This module can be used to provision and configure [Context Based Restrictions](https://cloud.ibm.com/docs/account?topic=account-context-restrictions-create&interface=ui).
86
14
87
15
## Usage
88
16
@@ -94,67 +22,93 @@ unless real values don't help users know what to change.
|[ibm_iam_account_settings.iam_account_settings](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/data-sources/iam_account_settings)| data source |
150
87
151
88
## Inputs
152
89
153
-
No inputs.
90
+
| Name | Description | Type | Default | Required |
| <aname="input_addresses"></a> [addresses](#input\_addresses)| (List) The list of addresses in the zone | <pre>list(object({<br> type = optional(string)<br> value = optional(string)<br> ref = optional(object({<br> account_id = string<br> location = optional(string)<br> service_instance = optional(string)<br> service_name = optional(string)<br> service_type = optional(string)<br> }))<br> }))</pre> |`[]`| no |
93
+
| <aname="input_enforcement_mode"></a> [enforcement\_mode](#input\_enforcement\_mode)| (String) The rule enforcement mode |`string`|`"report"`| no |
94
+
| <aname="input_excluded_addresses"></a> [excluded\_addresses](#input\_excluded\_addresses)| (Optional, List) The list of excluded addresses in the zone | <pre>list(object({<br> type = optional(string)<br> value = optional(string)<br> }))</pre> |`[]`| no |
95
+
| <aname="input_name"></a> [name](#input\_name)| (Optional, String) The name of the zone |`string`|`null`| no |
96
+
| <aname="input_operations"></a> [operations](#input\_operations)| (Optional, List) The operations this rule applies to | <pre>list(object({<br> api_types = list(object({<br> api_type_id = string<br> }))<br> }))</pre> |`[]`| no |
97
+
| <aname="input_resources"></a> [resources](#input\_resources)| (Optional, List) The resources this rule apply to | <pre>list(object({<br> attributes = list(object({<br> name = string<br> value = string<br> operator = optional(string)<br> }))<br> tags = optional(list(object({<br> name = string<br> value = string<br> operator = optional(string)<br> })))<br> }))</pre> |`[]`| no |
98
+
| <aname="input_rule_contexts"></a> [rule\_contexts](#input\_rule\_contexts)| (List) The contexts the rule applies to | <pre>list(object({<br> attributes = list(object({<br> name = string<br> value = string<br> }))<br> }))</pre> | <pre>[<br> {<br> "attributes": [<br> {<br> "name": "va",<br> "value": "va"<br> }<br> ]<br> }<br>]</pre> | no |
99
+
| <aname="input_rule_description"></a> [rule\_description](#input\_rule\_description)| (Optional, String) The description of the rule |`string`|`null`| no |
100
+
| <aname="input_zone_description"></a> [zone\_description](#input\_zone\_description)| (Optional, String) The description of the zone |`string`|`null`| no |
0 commit comments