TIL plantimestamp > timestamp because timestamp is evaluated at apply.
This commit is contained in:
parent
b3950b394e
commit
c99d837055
3 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@ locals {
|
|||
labels = merge(var.labels, {
|
||||
"com.docker.stack.namespace" = var.stack_name
|
||||
"ooo.grey.config.stack" = var.stack_name
|
||||
#"ooo.grey.config.created" = timestamp()
|
||||
#"ooo.grey.config.created" = plantimestamp()
|
||||
"ooo.grey.config.bytes" = length(var.value)
|
||||
"ooo.grey.config.name" = local.config_name
|
||||
"ooo.grey.config.hash" = sha1(var.value)
|
||||
|
|
|
@ -2,14 +2,14 @@ locals {
|
|||
volume_name = substr(join("-", [
|
||||
substr(var.stack_name, 0, 20),
|
||||
substr(var.volume_name, 0, 64 - 1 - 3 - 20 - 6 - 6),
|
||||
formatdate("YYMMDD", timestamp()),
|
||||
formatdate("hhmmss", timestamp()),
|
||||
formatdate("YYMMDD", plantimestamp()),
|
||||
formatdate("hhmmss", plantimestamp()),
|
||||
]), 0, 63)
|
||||
|
||||
labels = merge(var.labels, {
|
||||
"com.docker.stack.namespace" = var.stack_name
|
||||
"ooo.grey.volume.stack" = var.stack_name
|
||||
"ooo.grey.volume.name" = var.volume_name
|
||||
#"ooo.grey.volume.created" = timestamp()
|
||||
#"ooo.grey.volume.created" = plantimestamp()
|
||||
})
|
||||
}
|
|
@ -25,7 +25,7 @@ resource "htpasswd_password" "registry_users" {
|
|||
salt = random_password.salt[each.key].result
|
||||
}
|
||||
resource "docker_config" "docker_registry_htpasswd" {
|
||||
name = "docker-registry-htpasswd-${replace(timestamp(), ":", ".")}"
|
||||
name = "docker-registry-htpasswd-${replace(plantimestamp(), ":", ".")}"
|
||||
data = base64encode(local.registry_htpasswd)
|
||||
lifecycle {
|
||||
ignore_changes = [name]
|
||||
|
|
Loading…
Reference in a new issue