Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
# args: [--branch, main]

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.101.1
rev: v1.108.0
hooks:
- id: tfupdate
name: Autoupdate Terraform versions
Expand Down Expand Up @@ -62,6 +62,10 @@ repos:
name: Autoupdate pass provider versions
args:
- --args=provider mecodia/pass --version ">= 3.1.0, < 4.0.0"
- id: tfupdate
name: Autoupdate null provider versions
args:
- --args=provider hashicorp/null --version ">= 3.3.0, < 4.0.0"
# This hook is configured to run only in manual stage to avoid unnecessary provider lock file updates on every commit.
# Run this hook manually when you need to update the provider lock file across all supported platforms.
- id: terraform_providers_lock
Expand Down
4 changes: 4 additions & 0 deletions misc/null/.tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugin "terraform" {
enabled = true
preset = "recommended"
}
44 changes: 44 additions & 0 deletions misc/null/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# template module

A terraform module for creating "null resources".
Using <https://registry.terraform.io/providers/hashicorp/null>.

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_null"></a> [null](#requirement\_null) | ~> 3.3.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | ~> 0.9.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_null"></a> [null](#provider\_null) | ~> 3.3.0 |
| <a name="provider_time"></a> [time](#provider\_time) | ~> 0.9.1 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [null_resource.main](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |
| [time_static.last_update](https://registry.terraform.io/providers/hashicorp/time/latest/docs/resources/static) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_customer"></a> [customer](#input\_customer) | Customer for the current deployment | `string` | `""` | no |
| <a name="input_name"></a> [name](#input\_name) | The name of the template resource | `string` | `"my-template"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Default tags to add to resources | `map(any)` | `{}` | no |

## Outputs

No outputs.
<!-- END_TF_DOCS -->
14 changes: 14 additions & 0 deletions misc/null/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
locals {
# tflint-ignore: terraform_unused_declarations
interpolated_tags = merge({
"Name" = var.name,
"Customer" = var.customer,
"ManagedBy" = "Terraform",
"LastModifiedAt" = time_static.last_update.rfc3339,
},
var.tags
)
}

resource "time_static" "last_update" {
}
3 changes: 3 additions & 0 deletions misc/null/null.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "null_resource" "main" {

}
Empty file added misc/null/outputs.tf
Empty file.
13 changes: 13 additions & 0 deletions misc/null/providers.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_version = "~> 1.3"
required_providers {
null = {
source = "hashicorp/null"
version = "~> 3.3.0"
}
time = {
source = "hashicorp/time"
version = "~> 0.9.1"
}
}
}
19 changes: 19 additions & 0 deletions misc/null/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
variable "name" {
description = "The name of the template resource"
type = string
default = "my-template"
}

variable "customer" {
description = "Customer for the current deployment"
type = string
default = ""
}

variable "tags" {
description = "Default tags to add to resources"
type = map(any)
default = {}
}

# module specific variables
Loading