-
Notifications
You must be signed in to change notification settings - Fork 359
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
Define 'ip_address = "" ' parameter in "fixed_ip" for openstack_networking_port_v2 ,but the ip will be assigned a value. #429
Comments
@xudehua Hello. This is expected behaviour according to OpenStack Neutron Documentation:
And we have the following note in the Terraform Provider Documentation:
Setting this value to blank is the same as skipping this flag. |
@ozerovandrei Hi, Thank you for you answer. Thanks again Edward |
That's a good point. We will update our documentation to clarify "if it is left blank or omitted". As far as creating a port with no IP address, you might have to disable DHCP on the subnet itself. |
Can you describe it in more detail. I disable DHCP,but the VM was still assigned IP address. Another, Did the Terraform support the paramete "--no-fixed-ip" in the command " openstack port create --no-fixed-ip"? Edward |
openstack port create --help --no-fixed-ip No IP or subnet for this port. |
I don't think it currently supports it, but we might be able to get this to work. Here's the API request when using {"port": {"network_id": "foo", "fixed_ips": [], "name": "jttest", "admin_state_up": true} The upstream Gophercloud library might allow us to pass in |
@jtopjian I guess that |
@ozerovandrei Right. I'm just wondering if Gophercloud's current use of |
Looks like this is very possible to do 😄 I've submitted #433 which adds a new argument of |
@ozerovandrei |
Hi there,
Terraform v0.11.7
Affected Resource(s)
Please list the resources as a list, for example:
According the terraform docs https://www.terraform.io/docs/providers/openstack/r/networking_port_v2.html
The fixed_ip block supports:
subnet_id - (Required) Subnet in which to allocate IP address for this port.
ip_address - (Optional) IP address desired in the subnet for this port. If you don't specify ip_address, an available IP address from the specified subnet will be allocated to this port. This field will not be populated if it is left blank. To retrieve the assigned IP address, use the all_fixed_ips attribute.
resource "openstack_networking_port_v2" "port_net-03_v4" {
name = "test"
network_id = "${var.uuid}"
admin_state_up = "true"
security_group_ids = [ "${var.security_group_id}" ]
fixed_ip {
"subnet_id" = "${var.sub_uuid}"
"ip_address" = ""
}
}
Output
I just want to create a port in the instance ,no IP required. But after creating instance , the instance's port had been assigned IP value( may be by DHCP).
Thanks
The text was updated successfully, but these errors were encountered: