-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathssm_parameter_mesh.tf
More file actions
68 lines (58 loc) · 1.63 KB
/
ssm_parameter_mesh.tf
File metadata and controls
68 lines (58 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# MESH Configuration SSM Parameter
resource "aws_ssm_parameter" "mesh_config" {
name = "${local.ssm_mesh_prefix}/config"
description = "MESH configuration"
type = "SecureString"
value = var.enable_mock_mesh ? jsonencode({
mesh_endpoint = local.mock_mesh_endpoint
mesh_mailbox = "mock-mailbox"
mesh_mailbox_password = "UNSET"
mesh_shared_key = "mock-shared-key"
}) : jsonencode({
mesh_endpoint = "UNSET"
mesh_mailbox = "UNSET"
mesh_mailbox_password = "UNSET"
mesh_shared_key = "UNSET"
})
tags = merge(local.default_tags, {
Backup = "true"
Description = "MESH configuration"
})
lifecycle {
ignore_changes = [
value
]
}
}
# MESH Client Certificate SSM Parameter
resource "aws_ssm_parameter" "mesh_client_cert" {
name = "${local.ssm_mesh_prefix}/client-cert"
description = "MESH client certificate"
type = "SecureString"
value = var.enable_mock_mesh ? "mock-cert" : "UNSET"
tags = merge(local.default_tags, {
Backup = "true"
Description = "MESH client certificate"
})
lifecycle {
ignore_changes = [
value
]
}
}
# MESH Client Private Key SSM Parameter
resource "aws_ssm_parameter" "mesh_client_key" {
name = "${local.ssm_mesh_prefix}/client-key"
description = "MESH client private key"
type = "SecureString"
value = var.enable_mock_mesh ? "mock-key" : "UNSET"
tags = merge(local.default_tags, {
Backup = "true"
Description = "MESH client private key"
})
lifecycle {
ignore_changes = [
value
]
}
}