Skip to content

Commit

Permalink
fix: updates to mod template (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocofaigh committed Jul 11, 2023
1 parent 4529516 commit 3f5abfb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The default structure includes the following files:
- `version.tf`: The required terraform and provider versions
- `variables.tf`: The input variables for the module
- `outputs.tf`: The values that are output from the module

Use nested modules to split complex behavior into smaller modules that advanced users can choose from. Put nested modules under a `/modules` subdirectory. If you include more than one nested module, make the submodules [composable](https://developer.hashicorp.com/terraform/language/modules/develop/composition) by the caller. In other words, don't embed calls between submodules to create a deeply nested tree of modules.
For more information, see [Module structure](https://terraform-ibm-modules.github.io/documentation/#/module-structure) in the project documentation.

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.
Expand Down Expand Up @@ -146,7 +148,7 @@ statement instead the previous block.

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3, < 1.6 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |

## Modules

Expand Down
3 changes: 1 addition & 2 deletions examples/basic/version.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
# Since hashicorp can include breaking changes in minor version updates, ensure to lock into a range here.
required_version = ">= 1.3, < 1.6"
required_version = ">= 1.3.0"

# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main
# module's version.tf (usually a basic example), and 1 example that will always use the latest provider version.
Expand Down
3 changes: 1 addition & 2 deletions examples/complete/version.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
# Since hashicorp can include breaking changes in minor version updates, ensure to lock into a range here.
required_version = ">= 1.3, < 1.6"
required_version = ">= 1.3.0"

# Ensure that there is always 1 example locked into the lowest provider version of the range defined in the main
# module's version.tf (usually a basic example), and 1 example that will always use the latest provider version.
Expand Down
2 changes: 1 addition & 1 deletion module-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"variables": {},
"outputs": {},
"required_core": [
"\u003e= 1.3, \u003c 1.6"
"\u003e= 1.3.0"
],
"required_providers": {},
"managed_resources": {},
Expand Down
3 changes: 1 addition & 2 deletions version.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
terraform {
# Since hashicorp can include breaking changes in minor version updates, ensure to lock into a range here.
required_version = ">= 1.3, < 1.6"
required_version = ">= 1.3.0"

# Use a flexible range in modules that future proofs the module's usage with upcoming minor and patch versions
# required_providers {
Expand Down

0 comments on commit 3f5abfb

Please sign in to comment.