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

Fix ordering issue with private networks #254

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

hyvs
Copy link
Contributor

@hyvs hyvs commented Apr 15, 2022

Close #253

This fix propose to switch regions_attributes to Set to follow API behavior.

Underlying OVH API returns unordered networks and trigger terraform changes during plan/apply :

First call

HTTP/1.1 200 OK
{
  "id": "pn-xxxxxx_43",
  "name": "private-network",
  "vlanId": 43,
  "regions": [
    {
      "region": "GRA7",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "SBG5",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "GRA5",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "GRA9",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    }
  ],
  "type": "private",
  "status": "ACTIVE"
}

Second call

HTTP/1.1 200 OK
{
  "id": "pn-xxxxxx_43",
  "name": "private-network",
  "vlanId": 43,
  "regions": [
    {
      "region": "GRA5",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "SBG5",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "GRA7",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    },
    {
      "region": "GRA9",
      "status": "ACTIVE",
      "openstackId": "********-****-****-****-************"
    }
  ],
  "type": "private",
  "status": "ACTIVE"
}

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.

Resource ovh_cloud_project_network_private is not idempotent
2 participants