You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose IPv6 and IPv4 assigned addresses as computed properties
Currently, the `ip_assignments` has a list of the IPs that ZeroTier
provided to the member from its assignment pool. It contains a mix of
IPv4 and IPv6 addresses.
There is some scenarios where having the distiction of wheter it is an
IPv4 or IPv6 changes which resource to create. For example using DNS
records we are only allowed to create `AAAA` records in the presence of
IPv6 addresses, and `A` records to IPv4.
Filtering this information on Terraform is cumbersome, using the filter
on list operations, while it is much easier to provide this information
through the provider.
This commit create two extra computed properties, `ipv6_assignments` and
`ipv4_assignments`, which separates each address assignment as expected.
The `ipv6_assignments` does not include RFC4139 nor 6PLANE addresses as
they are always computed on the `member` resource level, even if the
`network` is configured to not use those addresses, and their
information is not returned by the controller API as an assigned
address either.
Description: "List of IP routed and assigned by ZeroTier controller assignment pool. Does not include RFC4193 nor 6PLANE addresses, only those from assignment pool or manually provided.",
67
+
Optional: true,
68
+
Elem: &schema.Schema{
69
+
Type: schema.TypeString,
70
+
},
71
+
},
72
+
"ipv4_assignments": {
73
+
Type: schema.TypeSet,
74
+
Description: "Computed list of IPv4 assigned by ZeroTier controller assignment pool.",
75
+
Computed: true,
76
+
Elem: &schema.Schema{
77
+
Type: schema.TypeString,
78
+
},
79
+
},
80
+
"ipv6_assignments": {
81
+
Type: schema.TypeSet,
82
+
Description: "Computed list of IPv6 assigned by ZeroTier controller assignment pool. Does not include RFC4193 nor 6PLANE addresses, only those from assignment pool or manually provided.",
0 commit comments