Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/749 **BREAKING CHANGE** - Change IPv6 role strings in apstra_datacenter_resource_pool_allocation resource #750

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

chrismarget-j
Copy link
Collaborator

This PR changes the set of valid strings for the apstra_datacenter_resource_pool_allocation resource's role attribute.

The following strings have been replaced for consistency with the many other valid values which put ipv6 at the end:

  • ipv6_spine_leaf_link_ips --------> spine_leaf_link_ips_ipv6
  • ipv6_spine_superspine_link_ips -> spine_superspine_link_ips_ipv6
  • ipv6_to_generic_link_ips---------> to_generic_link_ips_ipv6

After upgrading to a provider release which includes this change, the terraform provider will no longer accept the old strings. A validation error will require the configuration to be amended to use these new values.

After the configuration has been updated to use the new values, Terraform will plan a change, but the change should be nondisruptive to the blueprint. Notice this resource is being updated in-place, and the only attribute subject to change is role:

Terraform will perform the following actions:

  # apstra_datacenter_resource_pool_allocation.spine_leaf_link_ips_ipv6 will be updated in-place
  ~ resource "apstra_datacenter_resource_pool_allocation" "spine_leaf_link_ips_ipv6" {
      ~ role         = "ipv6_spine_leaf_link_ips" -> "spine_leaf_link_ips_ipv6"
        # (2 unchanged attributes hidden)
    }

Details of what's in this PR:

  • purged some placeholder stuff related to Freeform blueprints (this isn't going to happen)
  • the role attribute's RequiresReplace plan modifier has been changed to RequiresReplaceIf with a helper function which recognizes the old and new strings: No replace when updating role from an old style value to a new style value.
  • rosetta module required to bring the new values to life
  • a couple of overlooked test cases related to apstra.InterfaceNumberingIpv4Type and apstra.InterfaceNumberingIpv6Type which were required to get the rosetta tests passing

Closes #749

@chrismarget-j chrismarget-j merged commit a02fb4d into main Jul 27, 2024
1 check passed
@chrismarget-j chrismarget-j deleted the task/749-rename-pool-allocation-ipv6-roles branch July 27, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename resource pool allocation IPv6 roles
2 participants