-
Notifications
You must be signed in to change notification settings - Fork 85
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
resource and data for VPC - quotas for projects #1038
Comments
Hello! VPC resources are supported by their own provider, which can work together with the "regular" NSX Terraform provider Hashicorp registry: https://registry.terraform.io/providers/vmware/for-vmware-nsxt-virtual-private-cloud/latest/docs |
Thanks for your response @salv-orlando , I will have a look at that provider. What about quotas for projects? Anything in the roadmap for that? |
Supporting project quotas requires implementations of a resource for constraint API, e.g:
With the payload
To create a 1 T1 quota for test project. |
Hello both, thanks for your responses. any pointers you can offer? thanks |
If you are a user consuming a few VPCs this makes sense, but if you want to administer a bunch of customers or provision VPCs for customers this does not work. |
This is my hacky workaround using the Mastercard/restapi provider to initially create the VPC. I left out the variable and provider declarations for brevity. locals {
vpc_path = "/policy/api/v1/orgs/${var.org_id}/projects/${var.project_id}/vpcs"
vpc_body = {
display_name = var.display_name
id = var.vpc_id
short_id = var.short_id
site_infos = [{
edge_cluster_paths = var.edge_cluster_paths
}]
load_balancer_vpc_endpoint = {
enabled = var.load_balancer_vpc_endpoint_enabled
}
default_gateway_path = var.default_gateway_path
service_gateway = {
disable = var.service_gateway_disable
qos_config = {
ingress_qos_profile_path = var.ingress_qos_profile_path
egress_qos_profile_path = var.egress_qos_profile_path
}
auto_snat = var.service_gateway_auto_snat
}
ip_address_type = var.ip_address_type
private_ipv4_blocks = var.private_ipv4_blocks
external_ipv4_blocks = var.external_ipv4_blocks
ipv6_profile_paths = var.ipv6_profile_paths
dhcp_config = {
enable_dhcp = var.enable_dhcp,
dns_client_config = {
dns_server_ips = var.dns_server_ips
}
}
}
}
resource "restapi_object" "vpc" {
create_method = "PATCH"
create_path = "${local.vpc_path}/{id}"
path = local.vpc_path
id_attribute = "id"
object_id = var.vpc_id
data = jsonencode(local.vpc_body)
} |
Is your feature request related to a problem? Please describe.
Hello, I was going down the project + VPC path to isolate and create a level of self service for the devops team, however halfway through - made it all the way from zero to project - when I noticed there are no resources for vpc, any plan to add them?
Also, there is no way to build quotas either for the projects, is that in the roadmap?
Describe the solution you'd like
It would be great if we could build using terraform all things to do with projects and vpcs
Describe alternatives you've considered
I don't think I have a workaround at this moment, at least by using only terraform.
Additional context
Great work so far. kudos.
The text was updated successfully, but these errors were encountered: