bernardodemarco commented on issue #172: URL: https://github.com/apache/cloudstack-terraform-provider/issues/172#issuecomment-2830583776
Hello, @lwsa-leonardosouza Do the credentials configured in your `cloudstack` provider belong to a Root Admin account? If so, could you verify whether the `var.vlan` input variable is defined? Additionally, it would be interesting to check what value the Management Server is receiving for the `vlan` attribute in the `createPrivateGateway` API call. ``` resource "cloudstack_private_gateway" "pvgateway" { gateway = var.gateway ip_address = var.ip_address netmask = var.netmask vlan = var.vlan != "" ? var.vlan : null vpc_id = module.vpc.id acl_id = var.acl_id != "" ? var.acl_id : null physical_network_id = var.physical_network_id != "" ? var.physical_network_id : null } ``` As mentioned on the [private gateway module documentation](https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs/resources/private_gateway), it is only possible to create private gateways through Terraform using Root Admin credentials. This requirement exists because, currently, the Apache CloudStack provider only supports the `vlan` parameter; the `associatednetworkid` is not supported. Since non-root admins accounts do not have access to infrastructure details, the `vlan` parameter is not available for them. We can create a new issue to support the `associatednetworkid` parameter. What do you guys think? --- > I`ve tried same example from repository, but didn't work: This example seems to be missing the `acl_id` attribute. I executed it, with the credentials of a Root Admin account and with the `acl_id` defined, and it worked as expected. I'll open a PR to update the documentation example. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org