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

subnet v2 resource (regionalized API) #732

Conversation

AdrienPensart
Copy link
Contributor

@AdrienPensart AdrienPensart commented Sep 23, 2024

Description

Add a new regionalized resource ovh_cloud_project_network_private_subnet_v2, it is not really a v2, but a regionalized subnet, so it may be preferable to call it ovh_cloud_project_network_private_subnet_on_region or something like this...

Related to ovh/public-cloud-roadmap#582

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (improve existing resource(s) or datasource(s))
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A: make testacc TESTARGS="-run TestAccCloudProjectNetworkPrivateSubnetV2_basic"

Test Configuration:

  • Terraform version: terraform version: Terraform vx.y.z
  • Existing HCL configuration you used:
resource "ovh_cloud_project_network_private_subnet_v2" "subnet" {
    service_name      = ovh_cloud_project_network_private.network.service_name
    name              = "my_new_subnet"
    network_id        = element(tolist(ovh_cloud_project_network_private.network.regions_attributes), 0).openstackid
    region            = element(tolist(ovh_cloud_project_network_private.network.regions), 0)
    cidr              = "192.168.0.0/24"
    dns_nameservers   = ["1.1.1.1"]
    host_route {
            destination = "192.168.0.0/24"
            nexthop = "192.168.0.254"
    }
    allocation_pool {
            start = "192.168.0.100"
            end = "192.168.0.200"
    }
    dhcp              = true
    gateway_ip        = "192.168.0.253"
    enable_gateway_ip = true
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran successfully go mod vendor if I added or modify go.mod file

@AdrienPensart AdrienPensart force-pushed the dev/adrien.pensart/private-subnet-dhcp-attributes branch from 8974b2a to f545853 Compare September 23, 2024 13:28
@AdrienPensart AdrienPensart changed the title Dev/adrien.pensart/private subnet dhcp attributes subnet v2 resource (regionalized API) Sep 23, 2024
@AdrienPensart AdrienPensart force-pushed the dev/adrien.pensart/private-subnet-dhcp-attributes branch from f545853 to 9b890ca Compare September 23, 2024 14:23
@AdrienPensart AdrienPensart force-pushed the dev/adrien.pensart/private-subnet-dhcp-attributes branch from 9b890ca to 04df2ad Compare September 23, 2024 14:40
},
"enable_gateway_ip": {
Type: schema.TypeBool,
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

required on the API

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to set as required

@amstuta amstuta merged commit 1082424 into ovh:master Oct 2, 2024
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.

2 participants