Skip to content

Commit dbfb8f0

Browse files
committed
feat(module): mac addresses now ignore the prefix changes so importing macs works
1 parent edcdb34 commit dbfb8f0

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ module "microk8s_cluster" {
6262
| Name | Version |
6363
|------|---------|
6464
| <a name="provider_macaddress"></a> [macaddress](#provider\_macaddress) | 0.3.2 |
65-
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.3 |
66-
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.3 |
65+
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.2 |
66+
| <a name="provider_random"></a> [random](#provider\_random) | 3.6.2 |
6767
| <a name="provider_sshcommand"></a> [sshcommand](#provider\_sshcommand) | 0.2.2 |
6868
| <a name="provider_xenorchestra"></a> [xenorchestra](#provider\_xenorchestra) | 0.29.0 |
6969

xen_master.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ locals {
1515

1616
resource "macaddress" "mac_master_primary" {
1717
prefix = [0, 22, 62]
18+
19+
lifecycle {
20+
ignore_changes = [prefix]
21+
}
22+
1823
}
1924

2025
resource "xenorchestra_cloud_config" "master" {

xen_nodes.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ resource "random_integer" "node" {
1111
resource "macaddress" "mac_nodes" {
1212
count = var.node_count
1313
prefix = [0, 22, 62]
14+
15+
lifecycle {
16+
ignore_changes = [prefix]
17+
}
18+
1419
}
1520

1621
resource "xenorchestra_cloud_config" "node" {

xen_secondaries.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ EOF
5252
resource "macaddress" "mac_master_secondaries" {
5353
count = var.master_count - 1
5454
prefix = [0, 22, 62]
55+
56+
lifecycle {
57+
ignore_changes = [prefix]
58+
}
59+
5560
}
5661

5762

0 commit comments

Comments
 (0)