Skip to content

Commit 7a4b40d

Browse files
Release 0.1.4 (#5)
* Release 0.1.3 * terraform version >= 1.3.0 * chore: release notes and version bump * feat: module tag updated to ocilz-terraform-module * chore: release notes updated * doc: SPECs updated --------- Co-authored-by: Erna Guerrero <[email protected]>
1 parent 8e97e64 commit 7a4b40d

File tree

15 files changed

+33
-69
lines changed

15 files changed

+33
-69
lines changed

RELEASE-NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# August 27, 2024 Release Notes - 0.1.4
2+
## Updates
3+
1. All modules now require Terraform binary equal or greater than 1.3.0.
4+
2. *cislz-terraform-module* tag renamed to *ocilz-terraform-module*.
5+
16
# July 24, 2024 Release Notes - 0.1.3
27
## Updates
38
1. Aligned [README.md](./README.md) structure to Oracle's GitHub organizations requirements.

budgets/README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Check the [examples](./examples/) folder for actual module usage.
1515
- [Known Issues](#issues)
1616

1717
## <a name="requirements">Requirements</a>
18+
19+
### Terraform Version >= 1.3.0
20+
This module requires Terraform binary version 1.3.0 or greater, as it relies on Optional Object Type Attributes feature. The feature shortens the amount of input values in complex object types, by having Terraform automatically inserting a default value for any missing optional attributes.
21+
1822
### IAM Permissions
1923

2024
This module requires the following OCI IAM permission:
@@ -25,27 +29,6 @@ Allow group <group> to manage usage-budgets in tenancy
2529

2630
**Note:** Budgets are always created in the Root compartment, regardless the compartment they target.
2731

28-
### Terraform Version < 1.3.x and Optional Object Type Attributes
29-
This module relies on [Terraform Optional Object Type Attributes feature](https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes), which is experimental from Terraform 0.14.x to 1.2.x. It shortens the amount of input values in complex object types, by having Terraform automatically inserting a default value for any missing optional attributes. The feature has been promoted and it is no longer experimental in Terraform 1.3.x.
30-
31-
**As is, this module can only be used with Terraform versions up to 1.2.x**, because it can be consumed by other modules via [OCI Resource Manager service](https://docs.oracle.com/en-us/iaas/Content/ResourceManager/home.htm), that still does not support Terraform 1.3.x.
32-
33-
Upon running *terraform plan* with Terraform versions prior to 1.3.x, Terraform displays the following warning:
34-
```
35-
Warning: Experimental feature "module_variable_optional_attrs" is active
36-
```
37-
38-
Note the warning is harmless. The code has been tested with Terraform 1.3.x and the implementation is fully compatible.
39-
40-
If you really want to use Terraform 1.3.x, in [providers.tf](./providers.tf):
41-
1. Change the terraform version requirement to:
42-
```
43-
required_version = ">= 1.3.0"
44-
```
45-
2. Remove the line:
46-
```
47-
experiments = [module_variable_optional_attrs]
48-
```
4932
## <a name="invoke">How to Invoke the Module</a>
5033

5134
Terraform modules can be invoked locally or remotely.

budgets/SPEC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
| Name | Version |
44
|------|---------|
5-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | < 1.3.0 |
5+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
66

77
## Providers
88

@@ -25,7 +25,7 @@ No modules.
2525

2626
| Name | Description | Type | Default | Required |
2727
|------|-------------|------|---------|:--------:|
28-
| <a name="input_budgets_configuration"></a> [budgets\_configuration](#input\_budgets\_configuration) | n/a | <pre>object({<br> #default_compartment_id = optional(string),<br> default_defined_tags = optional(map(string)),<br> default_freeform_tags = optional(map(string))<br> budgets = optional(map(object({<br> #compartment_id = optional(string),<br> name = string,<br> description = optional(string),<br> target = optional(object({<br> type = optional(string), # Default: COMPARTMENT<br> values = optional(list(string)) # Default: [<tenancy_ocid>]<br> })),<br> amount = number,<br> schedule = optional(object({<br> reset_period = optional(string), # Default: MONTHLY<br> processing_period_type = optional(string) # Default: MONTH. Valid values: MONTH, SINGLE_USE.<br> day_of_month_to_begin = optional(number), # Only applicable when processing_period_type is MONTH. Default: <current day>.<br> single_use_start_date = optional(string), # Only applicable when processing_period_type is SINGLE_USE.<br> single_use_end_date = optional(string) # Only applicable when processing_period_type is SINGLE_USE.<br> })),<br> defined_tags = optional(map(string)),<br> freeform_tags = optional(map(string)),<br> alert_rule = optional(object({<br> name = optional(string)<br> description = optional(string)<br> threshold_metric = optional(string), # Default: ACTUAL<br> threshold_type = optional(string), # Default: PERCENTAGE<br> threshold_value = number,<br> recipients = optional(string),<br> message = optional(string),<br> defined_tags = optional(map(string)),<br> freeform_tags = optional(map(string))<br> }))<br> })))<br> })</pre> | n/a | yes |
28+
| <a name="input_budgets_configuration"></a> [budgets\_configuration](#input\_budgets\_configuration) | n/a | <pre>object({<br> #default_compartment_id = optional(string),<br> default_defined_tags = optional(map(string)),<br> default_freeform_tags = optional(map(string))<br> budgets = optional(map(object({<br> #compartment_id = optional(string),<br> name = string,<br> description = optional(string),<br> target = optional(object({<br> type = optional(string), # Default: COMPARTMENT<br> values = optional(list(string)) # Default: [<tenancy_ocid>]<br> })),<br> amount = number,<br> schedule = optional(object({<br> reset_period = optional(string), # Default: MONTHLY<br> processing_period_type = optional(string) # Default: MONTH. Valid values: MONTH, SINGLE_USE.<br> day_of_month_to_begin = optional(number), # Only applicable when processing_period_type is MONTH. Default: <current day>.<br> single_use_start_date = optional(string), # Only applicable when processing_period_type is SINGLE_USE.<br> single_use_end_date = optional(string) # Only applicable when processing_period_type is SINGLE_USE.<br> })),<br> defined_tags = optional(map(string)),<br> freeform_tags = optional(map(string)),<br> alert_rule = optional(object({<br> name = optional(string)<br> description = optional(string)<br> threshold_metric = optional(string), # Default: ACTUAL<br> threshold_type = optional(string), # Default: PERCENTAGE<br> threshold_value = number,<br> recipients = string,<br> message = string,<br> defined_tags = optional(map(string)),<br> freeform_tags = optional(map(string))<br> }))<br> })))<br> })</pre> | n/a | yes |
2929
| <a name="input_compartments_dependency"></a> [compartments\_dependency](#input\_compartments\_dependency) | A map of objects containing the externally managed compartments this module may depend on. All map objects must have the same type and must contain at least an 'id' attribute (representing the compartment OCID) of string type. | `map(any)` | `null` | no |
3030
| <a name="input_module_name"></a> [module\_name](#input\_module\_name) | The module name. | `string` | `"budgets"` | no |
3131
| <a name="input_tenancy_ocid"></a> [tenancy\_ocid](#input\_tenancy\_ocid) | n/a | `any` | n/a | yes |

budgets/examples/compartment-based-budget/provider.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ provider "oci" {
1111
}
1212

1313
terraform {
14-
required_version = "< 1.3.0"
14+
required_version = ">= 1.3.0"
1515
required_providers {
1616
oci = {
1717
source = "oracle/oci"
1818
}
1919
}
20-
experiments = [module_variable_optional_attrs]
21-
}
20+
}

budgets/examples/minimal-config-budget/provider.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ provider "oci" {
1111
}
1212

1313
terraform {
14-
required_version = "< 1.3.0"
14+
required_version = ">= 1.3.0"
1515
required_providers {
1616
oci = {
1717
source = "oracle/oci"
1818
}
1919
}
20-
experiments = [module_variable_optional_attrs]
21-
}
20+
}

budgets/examples/tag-based-budget/provider.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ provider "oci" {
1111
}
1212

1313
terraform {
14-
required_version = "< 1.3.0"
14+
required_version = ">= 1.3.0"
1515
required_providers {
1616
oci = {
1717
source = "oracle/oci"
1818
}
1919
}
20-
experiments = [module_variable_optional_attrs]
21-
}
20+
}

budgets/metadata.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
#-- Used to inform module and release number.
55
locals {
6-
cislz_module_tag = {"cislz-terraform-module" : fileexists("${path.module}/../release.txt") ? "${var.module_name}/${file("${path.module}/../release.txt")}" : "${var.module_name}"}
6+
cislz_module_tag = {"ocilz-terraform-module" : fileexists("${path.module}/../release.txt") ? "${var.module_name}/${file("${path.module}/../release.txt")}" : "${var.module_name}"}
77
}

budgets/providers.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
terraform {
5-
required_version = "< 1.3.0"
5+
required_version = ">= 1.3.0"
66
required_providers {
77
oci = {
88
source = "oracle/oci"
99
}
1010
}
11-
experiments = [module_variable_optional_attrs]
12-
}
11+
}

release.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.3
1+
0.1.4

tags/README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Check the [examples](./examples/) folder for module usage with actual input data
1717
- [Known Issues](#issues)
1818

1919
## <a name="requirements">Requirements</a>
20+
21+
### Terraform Version >= 1.3.0
22+
This module requires Terraform binary version 1.3.0 or greater, as it relies on Optional Object Type Attributes feature. The feature shortens the amount of input values in complex object types, by having Terraform automatically inserting a default value for any missing optional attributes.
23+
2024
### IAM Permissions
2125

2226
This module requires the following OCI IAM permissions:
@@ -41,27 +45,6 @@ If *\<COMPARTMENT-OCID\>* is the root compartment (tenancy level), the permissio
4145
Allow group <group> to manage tag-defaults in tenancy
4246
Allow group <group> to inspect tag-namespaces in tenancy
4347
```
44-
### Terraform Version < 1.3.x and Optional Object Type Attributes
45-
This module relies on [Terraform Optional Object Type Attributes feature](https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes), which is experimental from Terraform 0.14.x to 1.2.x. It shortens the amount of input values in complex object types, by having Terraform automatically inserting a default value for any missing optional attributes. The feature has been promoted and it is no longer experimental in Terraform 1.3.x.
46-
47-
**As is, this module can only be used with Terraform versions up to 1.2.x**, because it can be consumed by other modules via [OCI Resource Manager service](https://docs.oracle.com/en-us/iaas/Content/ResourceManager/home.htm), that still does not support Terraform 1.3.x.
48-
49-
Upon running *terraform plan* with Terraform versions prior to 1.3.x, Terraform displays the following warning:
50-
```
51-
Warning: Experimental feature "module_variable_optional_attrs" is active
52-
```
53-
54-
Note the warning is harmless. The code has been tested with Terraform 1.3.x and the implementation is fully compatible.
55-
56-
If you really want to use Terraform 1.3.x, in [providers.tf](./providers.tf):
57-
1. Change the terraform version requirement to:
58-
```
59-
required_version = ">= 1.3.0"
60-
```
61-
2. Remove the line:
62-
```
63-
experiments = [module_variable_optional_attrs]
64-
```
6548

6649
## <a name="invoke">How to Invoke the Module</a>
6750

0 commit comments

Comments
 (0)