-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
35 lines (32 loc) · 1.85 KB
/
Copy pathmain.tf
File metadata and controls
35 lines (32 loc) · 1.85 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
# ── Keystone: the application profile ───────────────────────────────────────────
# The application profile (fvAp) is the container for the application EPGs that
# make up one application's tiers within a tenant; its id is the Distinguished
# Name uni/tn-{tenant}/ap-{name}. `name` is immutable — a change forces a new
# application profile. The parent tenant is referenced through parent_dn (the
# current attribute; the legacy tenant_dn attribute is deprecated in this
# provider line).
resource "aci_application_profile" "this" {
parent_dn = var.tenant_dn
name = var.application_profile.name
priority = var.application_profile.priority
# Metadata tail.
annotation = var.application_profile.annotation
name_alias = var.application_profile.name_alias
description = var.application_profile.description
owner_key = var.application_profile.owner_key
owner_tag = var.application_profile.owner_tag
# ACI metadata lists (tagAnnotation / tagTag). Accepted as {key = value} maps for
# ergonomics and converted to the provider's {key, value} object shape. Left
# unmanaged (null) when empty so the module never fights provider-computed state.
annotations = length(var.application_profile.annotations) > 0 ? [
for k, v in var.application_profile.annotations : { key = k, value = v }
] : null
tags = length(var.application_profile.tags) > 0 ? [
for k, v in var.application_profile.tags : { key = k, value = v }
] : null
# Typed relation to a monitoring policy (fvRsApMonPol), by name. Null leaves
# the relation at the provider default.
relation_to_monitoring_policy = var.application_profile.relation_to_monitoring_policy == null ? null : {
monitoring_policy_name = var.application_profile.relation_to_monitoring_policy.monitoring_policy_name
}
}