1. Packages
  2. Ibm Provider
  3. API Docs
  4. IsBareMetalServerNetworkInterfaceFloatingIp
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.IsBareMetalServerNetworkInterfaceFloatingIp

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Adding a floating IP address that you can associate with a Bare Metal Server. You can use the floating IP address to access your server from the public network, independent of whether the subnet is attached to a public gateway. For more information, see about floating IP.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    
    {}
    

    Example Usage

    The following example shows how to create a Bare Metal Server for VPC and associate a floating IP address to a network interface on the server.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const vpc = new ibm.IsVpc("vpc", {});
    const subnet = new ibm.IsSubnet("subnet", {
        vpc: vpc.isVpcId,
        zone: "us-south-3",
        ipv4CidrBlock: "10.240.129.0/24",
    });
    const ssh = new ibm.IsSshKey("ssh", {publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR"});
    const fip = new ibm.IsFloatingIp("fip", {zone: "us-south-3"});
    const bms = new ibm.IsBareMetalServer("bms", {
        profile: "bx2-metal-192x768",
        image: "r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e",
        zone: "us-south-3",
        keys: [ssh.isSshKeyId],
        primaryNetworkInterface: {
            subnet: subnet.isSubnetId,
        },
        vpc: vpc.isVpcId,
    });
    const bmsNic = new ibm.IsBareMetalServerNetworkInterface("bmsNic", {
        bareMetalServer: bms.isBareMetalServerId,
        subnet: subnet.isSubnetId,
        allowIpSpoofing: true,
        allowedVlans: [
            101,
            102,
        ],
    });
    const bmsNicFip = new ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", {
        bareMetalServer: bms.isBareMetalServerId,
        networkInterface: bmsNic.isBareMetalServerNetworkInterfaceId,
        floatingIp: fip.isFloatingIpId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    vpc = ibm.IsVpc("vpc")
    subnet = ibm.IsSubnet("subnet",
        vpc=vpc.is_vpc_id,
        zone="us-south-3",
        ipv4_cidr_block="10.240.129.0/24")
    ssh = ibm.IsSshKey("ssh", public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR")
    fip = ibm.IsFloatingIp("fip", zone="us-south-3")
    bms = ibm.IsBareMetalServer("bms",
        profile="bx2-metal-192x768",
        image="r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e",
        zone="us-south-3",
        keys=[ssh.is_ssh_key_id],
        primary_network_interface={
            "subnet": subnet.is_subnet_id,
        },
        vpc=vpc.is_vpc_id)
    bms_nic = ibm.IsBareMetalServerNetworkInterface("bmsNic",
        bare_metal_server=bms.is_bare_metal_server_id,
        subnet=subnet.is_subnet_id,
        allow_ip_spoofing=True,
        allowed_vlans=[
            101,
            102,
        ])
    bms_nic_fip = ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip",
        bare_metal_server=bms.is_bare_metal_server_id,
        network_interface=bms_nic.is_bare_metal_server_network_interface_id,
        floating_ip=fip.is_floating_ip_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vpc, err := ibm.NewIsVpc(ctx, "vpc", nil)
    		if err != nil {
    			return err
    		}
    		subnet, err := ibm.NewIsSubnet(ctx, "subnet", &ibm.IsSubnetArgs{
    			Vpc:           vpc.IsVpcId,
    			Zone:          pulumi.String("us-south-3"),
    			Ipv4CidrBlock: pulumi.String("10.240.129.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		ssh, err := ibm.NewIsSshKey(ctx, "ssh", &ibm.IsSshKeyArgs{
    			PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR"),
    		})
    		if err != nil {
    			return err
    		}
    		fip, err := ibm.NewIsFloatingIp(ctx, "fip", &ibm.IsFloatingIpArgs{
    			Zone: pulumi.String("us-south-3"),
    		})
    		if err != nil {
    			return err
    		}
    		bms, err := ibm.NewIsBareMetalServer(ctx, "bms", &ibm.IsBareMetalServerArgs{
    			Profile: pulumi.String("bx2-metal-192x768"),
    			Image:   pulumi.String("r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e"),
    			Zone:    pulumi.String("us-south-3"),
    			Keys: pulumi.StringArray{
    				ssh.IsSshKeyId,
    			},
    			PrimaryNetworkInterface: &ibm.IsBareMetalServerPrimaryNetworkInterfaceArgs{
    				Subnet: subnet.IsSubnetId,
    			},
    			Vpc: vpc.IsVpcId,
    		})
    		if err != nil {
    			return err
    		}
    		bmsNic, err := ibm.NewIsBareMetalServerNetworkInterface(ctx, "bmsNic", &ibm.IsBareMetalServerNetworkInterfaceArgs{
    			BareMetalServer: bms.IsBareMetalServerId,
    			Subnet:          subnet.IsSubnetId,
    			AllowIpSpoofing: pulumi.Bool(true),
    			AllowedVlans: pulumi.Float64Array{
    				pulumi.Float64(101),
    				pulumi.Float64(102),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIsBareMetalServerNetworkInterfaceFloatingIp(ctx, "bmsNicFip", &ibm.IsBareMetalServerNetworkInterfaceFloatingIpArgs{
    			BareMetalServer:  bms.IsBareMetalServerId,
    			NetworkInterface: bmsNic.IsBareMetalServerNetworkInterfaceId,
    			FloatingIp:       fip.IsFloatingIpId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var vpc = new Ibm.IsVpc("vpc");
    
        var subnet = new Ibm.IsSubnet("subnet", new()
        {
            Vpc = vpc.IsVpcId,
            Zone = "us-south-3",
            Ipv4CidrBlock = "10.240.129.0/24",
        });
    
        var ssh = new Ibm.IsSshKey("ssh", new()
        {
            PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR",
        });
    
        var fip = new Ibm.IsFloatingIp("fip", new()
        {
            Zone = "us-south-3",
        });
    
        var bms = new Ibm.IsBareMetalServer("bms", new()
        {
            Profile = "bx2-metal-192x768",
            Image = "r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e",
            Zone = "us-south-3",
            Keys = new[]
            {
                ssh.IsSshKeyId,
            },
            PrimaryNetworkInterface = new Ibm.Inputs.IsBareMetalServerPrimaryNetworkInterfaceArgs
            {
                Subnet = subnet.IsSubnetId,
            },
            Vpc = vpc.IsVpcId,
        });
    
        var bmsNic = new Ibm.IsBareMetalServerNetworkInterface("bmsNic", new()
        {
            BareMetalServer = bms.IsBareMetalServerId,
            Subnet = subnet.IsSubnetId,
            AllowIpSpoofing = true,
            AllowedVlans = new[]
            {
                101,
                102,
            },
        });
    
        var bmsNicFip = new Ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", new()
        {
            BareMetalServer = bms.IsBareMetalServerId,
            NetworkInterface = bmsNic.IsBareMetalServerNetworkInterfaceId,
            FloatingIp = fip.IsFloatingIpId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsVpc;
    import com.pulumi.ibm.IsSubnet;
    import com.pulumi.ibm.IsSubnetArgs;
    import com.pulumi.ibm.IsSshKey;
    import com.pulumi.ibm.IsSshKeyArgs;
    import com.pulumi.ibm.IsFloatingIp;
    import com.pulumi.ibm.IsFloatingIpArgs;
    import com.pulumi.ibm.IsBareMetalServer;
    import com.pulumi.ibm.IsBareMetalServerArgs;
    import com.pulumi.ibm.inputs.IsBareMetalServerPrimaryNetworkInterfaceArgs;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterface;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceArgs;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceFloatingIp;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceFloatingIpArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var vpc = new IsVpc("vpc");
    
            var subnet = new IsSubnet("subnet", IsSubnetArgs.builder()
                .vpc(vpc.isVpcId())
                .zone("us-south-3")
                .ipv4CidrBlock("10.240.129.0/24")
                .build());
    
            var ssh = new IsSshKey("ssh", IsSshKeyArgs.builder()
                .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR")
                .build());
    
            var fip = new IsFloatingIp("fip", IsFloatingIpArgs.builder()
                .zone("us-south-3")
                .build());
    
            var bms = new IsBareMetalServer("bms", IsBareMetalServerArgs.builder()
                .profile("bx2-metal-192x768")
                .image("r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e")
                .zone("us-south-3")
                .keys(ssh.isSshKeyId())
                .primaryNetworkInterface(IsBareMetalServerPrimaryNetworkInterfaceArgs.builder()
                    .subnet(subnet.isSubnetId())
                    .build())
                .vpc(vpc.isVpcId())
                .build());
    
            var bmsNic = new IsBareMetalServerNetworkInterface("bmsNic", IsBareMetalServerNetworkInterfaceArgs.builder()
                .bareMetalServer(bms.isBareMetalServerId())
                .subnet(subnet.isSubnetId())
                .allowIpSpoofing(true)
                .allowedVlans(            
                    101,
                    102)
                .build());
    
            var bmsNicFip = new IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", IsBareMetalServerNetworkInterfaceFloatingIpArgs.builder()
                .bareMetalServer(bms.isBareMetalServerId())
                .networkInterface(bmsNic.isBareMetalServerNetworkInterfaceId())
                .floatingIp(fip.isFloatingIpId())
                .build());
    
        }
    }
    
    resources:
      vpc:
        type: ibm:IsVpc
      subnet:
        type: ibm:IsSubnet
        properties:
          vpc: ${vpc.isVpcId}
          zone: us-south-3
          ipv4CidrBlock: 10.240.129.0/24
      ssh:
        type: ibm:IsSshKey
        properties:
          publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR
      fip:
        type: ibm:IsFloatingIp
        properties:
          zone: us-south-3
      bms:
        type: ibm:IsBareMetalServer
        properties:
          profile: bx2-metal-192x768
          image: r134-31c8ca90-2623-48d7-8cf7-737be6fc4c3e
          zone: us-south-3
          keys:
            - ${ssh.isSshKeyId}
          primaryNetworkInterface:
            subnet: ${subnet.isSubnetId}
          vpc: ${vpc.isVpcId}
      bmsNic:
        type: ibm:IsBareMetalServerNetworkInterface
        properties:
          bareMetalServer: ${bms.isBareMetalServerId}
          subnet: ${subnet.isSubnetId}
          allowIpSpoofing: true
          allowedVlans:
            - 101
            - 102
      bmsNicFip:
        type: ibm:IsBareMetalServerNetworkInterfaceFloatingIp
        properties:
          bareMetalServer: ${bms.isBareMetalServerId}
          networkInterface: ${bmsNic.isBareMetalServerNetworkInterfaceId}
          floatingIp: ${fip.isFloatingIpId}
    

    Additional Examples

    The following example shows how to create a allow float network interface and associate a floating IP address to an allow float network interface on the server.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const fip2 = new ibm.IsFloatingIp("fip2", {zone: "us-south-3"});
    const allowFloat = new ibm.IsBareMetalServerNetworkInterfaceAllowFloat("allowFloat", {
        bareMetalServer: ibm_is_bare_metal_server.bms.id,
        subnet: ibm_is_subnet.subnet.id,
        allowIpSpoofing: false,
        vlan: 101,
    });
    const bmsNicFip = new ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", {
        bareMetalServer: allowFloat.floatingBareMetalServer,
        networkInterface: allowFloat.networkInterface,
        floatingIp: fip2.isFloatingIpId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    fip2 = ibm.IsFloatingIp("fip2", zone="us-south-3")
    allow_float = ibm.IsBareMetalServerNetworkInterfaceAllowFloat("allowFloat",
        bare_metal_server=ibm_is_bare_metal_server["bms"]["id"],
        subnet=ibm_is_subnet["subnet"]["id"],
        allow_ip_spoofing=False,
        vlan=101)
    bms_nic_fip = ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip",
        bare_metal_server=allow_float.floating_bare_metal_server,
        network_interface=allow_float.network_interface,
        floating_ip=fip2.is_floating_ip_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fip2, err := ibm.NewIsFloatingIp(ctx, "fip2", &ibm.IsFloatingIpArgs{
    			Zone: pulumi.String("us-south-3"),
    		})
    		if err != nil {
    			return err
    		}
    		allowFloat, err := ibm.NewIsBareMetalServerNetworkInterfaceAllowFloat(ctx, "allowFloat", &ibm.IsBareMetalServerNetworkInterfaceAllowFloatArgs{
    			BareMetalServer: pulumi.Any(ibm_is_bare_metal_server.Bms.Id),
    			Subnet:          pulumi.Any(ibm_is_subnet.Subnet.Id),
    			AllowIpSpoofing: pulumi.Bool(false),
    			Vlan:            pulumi.Float64(101),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ibm.NewIsBareMetalServerNetworkInterfaceFloatingIp(ctx, "bmsNicFip", &ibm.IsBareMetalServerNetworkInterfaceFloatingIpArgs{
    			BareMetalServer:  allowFloat.FloatingBareMetalServer,
    			NetworkInterface: allowFloat.NetworkInterface,
    			FloatingIp:       fip2.IsFloatingIpId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var fip2 = new Ibm.IsFloatingIp("fip2", new()
        {
            Zone = "us-south-3",
        });
    
        var allowFloat = new Ibm.IsBareMetalServerNetworkInterfaceAllowFloat("allowFloat", new()
        {
            BareMetalServer = ibm_is_bare_metal_server.Bms.Id,
            Subnet = ibm_is_subnet.Subnet.Id,
            AllowIpSpoofing = false,
            Vlan = 101,
        });
    
        var bmsNicFip = new Ibm.IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", new()
        {
            BareMetalServer = allowFloat.FloatingBareMetalServer,
            NetworkInterface = allowFloat.NetworkInterface,
            FloatingIp = fip2.IsFloatingIpId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsFloatingIp;
    import com.pulumi.ibm.IsFloatingIpArgs;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceAllowFloat;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceAllowFloatArgs;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceFloatingIp;
    import com.pulumi.ibm.IsBareMetalServerNetworkInterfaceFloatingIpArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var fip2 = new IsFloatingIp("fip2", IsFloatingIpArgs.builder()
                .zone("us-south-3")
                .build());
    
            var allowFloat = new IsBareMetalServerNetworkInterfaceAllowFloat("allowFloat", IsBareMetalServerNetworkInterfaceAllowFloatArgs.builder()
                .bareMetalServer(ibm_is_bare_metal_server.bms().id())
                .subnet(ibm_is_subnet.subnet().id())
                .allowIpSpoofing(false)
                .vlan(101)
                .build());
    
            var bmsNicFip = new IsBareMetalServerNetworkInterfaceFloatingIp("bmsNicFip", IsBareMetalServerNetworkInterfaceFloatingIpArgs.builder()
                .bareMetalServer(allowFloat.floatingBareMetalServer())
                .networkInterface(allowFloat.networkInterface())
                .floatingIp(fip2.isFloatingIpId())
                .build());
    
        }
    }
    
    resources:
      fip2:
        type: ibm:IsFloatingIp
        properties:
          zone: us-south-3
      allowFloat:
        type: ibm:IsBareMetalServerNetworkInterfaceAllowFloat
        properties:
          bareMetalServer: ${ibm_is_bare_metal_server.bms.id}
          subnet: ${ibm_is_subnet.subnet.id}
          allowIpSpoofing: false
          vlan: 101
      bmsNicFip:
        type: ibm:IsBareMetalServerNetworkInterfaceFloatingIp
        properties:
          bareMetalServer: ${allowFloat.floatingBareMetalServer}
          networkInterface: ${allowFloat.networkInterface}
          floatingIp: ${fip2.isFloatingIpId}
    

    Syntax

    terraform import ibm_is_bare_metal_server_network_interface_floating_ip.example <bare_metal_server_id>/<bare_metal_server_network_interface_id>/<floating_ip_id> 
    

    Example

    $ terraform import ibm_is_bare_metal_server_network_interface_floating_ip.example d7bec597-4726-451f-8a63-e62e6f19c32c/d7bec597-4726-451f-8a63-e62e6f19c32c/d7bec597-4726-451f-8a63-e62e6f19c32c
    

    Create IsBareMetalServerNetworkInterfaceFloatingIp Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IsBareMetalServerNetworkInterfaceFloatingIp(name: string, args: IsBareMetalServerNetworkInterfaceFloatingIpArgs, opts?: CustomResourceOptions);
    @overload
    def IsBareMetalServerNetworkInterfaceFloatingIp(resource_name: str,
                                                    args: IsBareMetalServerNetworkInterfaceFloatingIpInitArgs,
                                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IsBareMetalServerNetworkInterfaceFloatingIp(resource_name: str,
                                                    opts: Optional[ResourceOptions] = None,
                                                    bare_metal_server: Optional[str] = None,
                                                    floating_ip: Optional[str] = None,
                                                    network_interface: Optional[str] = None,
                                                    is_bare_metal_server_network_interface_floating_ip_id: Optional[str] = None,
                                                    timeouts: Optional[IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs] = None)
    func NewIsBareMetalServerNetworkInterfaceFloatingIp(ctx *Context, name string, args IsBareMetalServerNetworkInterfaceFloatingIpArgs, opts ...ResourceOption) (*IsBareMetalServerNetworkInterfaceFloatingIp, error)
    public IsBareMetalServerNetworkInterfaceFloatingIp(string name, IsBareMetalServerNetworkInterfaceFloatingIpArgs args, CustomResourceOptions? opts = null)
    public IsBareMetalServerNetworkInterfaceFloatingIp(String name, IsBareMetalServerNetworkInterfaceFloatingIpArgs args)
    public IsBareMetalServerNetworkInterfaceFloatingIp(String name, IsBareMetalServerNetworkInterfaceFloatingIpArgs args, CustomResourceOptions options)
    
    type: ibm:IsBareMetalServerNetworkInterfaceFloatingIp
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IsBareMetalServerNetworkInterfaceFloatingIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IsBareMetalServerNetworkInterfaceFloatingIpInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IsBareMetalServerNetworkInterfaceFloatingIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IsBareMetalServerNetworkInterfaceFloatingIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IsBareMetalServerNetworkInterfaceFloatingIpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var isBareMetalServerNetworkInterfaceFloatingIpResource = new Ibm.IsBareMetalServerNetworkInterfaceFloatingIp("isBareMetalServerNetworkInterfaceFloatingIpResource", new()
    {
        BareMetalServer = "string",
        FloatingIp = "string",
        NetworkInterface = "string",
        IsBareMetalServerNetworkInterfaceFloatingIpId = "string",
        Timeouts = new Ibm.Inputs.IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ibm.NewIsBareMetalServerNetworkInterfaceFloatingIp(ctx, "isBareMetalServerNetworkInterfaceFloatingIpResource", &ibm.IsBareMetalServerNetworkInterfaceFloatingIpArgs{
    	BareMetalServer:  pulumi.String("string"),
    	FloatingIp:       pulumi.String("string"),
    	NetworkInterface: pulumi.String("string"),
    	IsBareMetalServerNetworkInterfaceFloatingIpId: pulumi.String("string"),
    	Timeouts: &ibm.IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var isBareMetalServerNetworkInterfaceFloatingIpResource = new IsBareMetalServerNetworkInterfaceFloatingIp("isBareMetalServerNetworkInterfaceFloatingIpResource", IsBareMetalServerNetworkInterfaceFloatingIpArgs.builder()
        .bareMetalServer("string")
        .floatingIp("string")
        .networkInterface("string")
        .isBareMetalServerNetworkInterfaceFloatingIpId("string")
        .timeouts(IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    is_bare_metal_server_network_interface_floating_ip_resource = ibm.IsBareMetalServerNetworkInterfaceFloatingIp("isBareMetalServerNetworkInterfaceFloatingIpResource",
        bare_metal_server="string",
        floating_ip="string",
        network_interface="string",
        is_bare_metal_server_network_interface_floating_ip_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const isBareMetalServerNetworkInterfaceFloatingIpResource = new ibm.IsBareMetalServerNetworkInterfaceFloatingIp("isBareMetalServerNetworkInterfaceFloatingIpResource", {
        bareMetalServer: "string",
        floatingIp: "string",
        networkInterface: "string",
        isBareMetalServerNetworkInterfaceFloatingIpId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ibm:IsBareMetalServerNetworkInterfaceFloatingIp
    properties:
        bareMetalServer: string
        floatingIp: string
        isBareMetalServerNetworkInterfaceFloatingIpId: string
        networkInterface: string
        timeouts:
            create: string
            delete: string
            update: string
    

    IsBareMetalServerNetworkInterfaceFloatingIp Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The IsBareMetalServerNetworkInterfaceFloatingIp resource accepts the following input properties:

    BareMetalServer string
    Bare metal server identifier.
    FloatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    NetworkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    IsBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    Timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    BareMetalServer string
    Bare metal server identifier.
    FloatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    NetworkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    IsBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    Timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    floatingIp String
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    networkInterface String
    The unique identifier for a network interface associated with the Bare metal server.
    isBareMetalServerNetworkInterfaceFloatingIpId String
    (String) The unique identifier of the floating IP.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    bareMetalServer string
    Bare metal server identifier.
    floatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    networkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    isBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    bare_metal_server str
    Bare metal server identifier.
    floating_ip str
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    network_interface str
    The unique identifier for a network interface associated with the Bare metal server.
    is_bare_metal_server_network_interface_floating_ip_id str
    (String) The unique identifier of the floating IP.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs
    bareMetalServer String
    Bare metal server identifier.
    floatingIp String
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    networkInterface String
    The unique identifier for a network interface associated with the Bare metal server.
    isBareMetalServerNetworkInterfaceFloatingIpId String
    (String) The unique identifier of the floating IP.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IsBareMetalServerNetworkInterfaceFloatingIp resource produces the following output properties:

    Address string
    (String) The floating IP address.
    Crn string
    (String) The CRN for this floating IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the floating IP
    Status string
    (String) Provisioning status of the floating IP address.
    Target string
    (String) The ID of the network interface used to allocate the floating IP address.
    Zone string
    (String) The zone name where to create the floating IP address.
    Address string
    (String) The floating IP address.
    Crn string
    (String) The CRN for this floating IP.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the floating IP
    Status string
    (String) Provisioning status of the floating IP address.
    Target string
    (String) The ID of the network interface used to allocate the floating IP address.
    Zone string
    (String) The zone name where to create the floating IP address.
    address String
    (String) The floating IP address.
    crn String
    (String) The CRN for this floating IP.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the floating IP
    status String
    (String) Provisioning status of the floating IP address.
    target String
    (String) The ID of the network interface used to allocate the floating IP address.
    zone String
    (String) The zone name where to create the floating IP address.
    address string
    (String) The floating IP address.
    crn string
    (String) The CRN for this floating IP.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the floating IP
    status string
    (String) Provisioning status of the floating IP address.
    target string
    (String) The ID of the network interface used to allocate the floating IP address.
    zone string
    (String) The zone name where to create the floating IP address.
    address str
    (String) The floating IP address.
    crn str
    (String) The CRN for this floating IP.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the floating IP
    status str
    (String) Provisioning status of the floating IP address.
    target str
    (String) The ID of the network interface used to allocate the floating IP address.
    zone str
    (String) The zone name where to create the floating IP address.
    address String
    (String) The floating IP address.
    crn String
    (String) The CRN for this floating IP.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the floating IP
    status String
    (String) Provisioning status of the floating IP address.
    target String
    (String) The ID of the network interface used to allocate the floating IP address.
    zone String
    (String) The zone name where to create the floating IP address.

    Look up Existing IsBareMetalServerNetworkInterfaceFloatingIp Resource

    Get an existing IsBareMetalServerNetworkInterfaceFloatingIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IsBareMetalServerNetworkInterfaceFloatingIpState, opts?: CustomResourceOptions): IsBareMetalServerNetworkInterfaceFloatingIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            bare_metal_server: Optional[str] = None,
            crn: Optional[str] = None,
            floating_ip: Optional[str] = None,
            is_bare_metal_server_network_interface_floating_ip_id: Optional[str] = None,
            name: Optional[str] = None,
            network_interface: Optional[str] = None,
            status: Optional[str] = None,
            target: Optional[str] = None,
            timeouts: Optional[IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs] = None,
            zone: Optional[str] = None) -> IsBareMetalServerNetworkInterfaceFloatingIp
    func GetIsBareMetalServerNetworkInterfaceFloatingIp(ctx *Context, name string, id IDInput, state *IsBareMetalServerNetworkInterfaceFloatingIpState, opts ...ResourceOption) (*IsBareMetalServerNetworkInterfaceFloatingIp, error)
    public static IsBareMetalServerNetworkInterfaceFloatingIp Get(string name, Input<string> id, IsBareMetalServerNetworkInterfaceFloatingIpState? state, CustomResourceOptions? opts = null)
    public static IsBareMetalServerNetworkInterfaceFloatingIp get(String name, Output<String> id, IsBareMetalServerNetworkInterfaceFloatingIpState state, CustomResourceOptions options)
    resources:  _:    type: ibm:IsBareMetalServerNetworkInterfaceFloatingIp    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Address string
    (String) The floating IP address.
    BareMetalServer string
    Bare metal server identifier.
    Crn string
    (String) The CRN for this floating IP.
    FloatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    IsBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    Name string
    Name of the floating IP
    NetworkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    Status string
    (String) Provisioning status of the floating IP address.
    Target string
    (String) The ID of the network interface used to allocate the floating IP address.
    Timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    Zone string
    (String) The zone name where to create the floating IP address.
    Address string
    (String) The floating IP address.
    BareMetalServer string
    Bare metal server identifier.
    Crn string
    (String) The CRN for this floating IP.
    FloatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    IsBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    Name string
    Name of the floating IP
    NetworkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    Status string
    (String) Provisioning status of the floating IP address.
    Target string
    (String) The ID of the network interface used to allocate the floating IP address.
    Timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs
    Zone string
    (String) The zone name where to create the floating IP address.
    address String
    (String) The floating IP address.
    bareMetalServer String
    Bare metal server identifier.
    crn String
    (String) The CRN for this floating IP.
    floatingIp String
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    isBareMetalServerNetworkInterfaceFloatingIpId String
    (String) The unique identifier of the floating IP.
    name String
    Name of the floating IP
    networkInterface String
    The unique identifier for a network interface associated with the Bare metal server.
    status String
    (String) Provisioning status of the floating IP address.
    target String
    (String) The ID of the network interface used to allocate the floating IP address.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    zone String
    (String) The zone name where to create the floating IP address.
    address string
    (String) The floating IP address.
    bareMetalServer string
    Bare metal server identifier.
    crn string
    (String) The CRN for this floating IP.
    floatingIp string
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    isBareMetalServerNetworkInterfaceFloatingIpId string
    (String) The unique identifier of the floating IP.
    name string
    Name of the floating IP
    networkInterface string
    The unique identifier for a network interface associated with the Bare metal server.
    status string
    (String) Provisioning status of the floating IP address.
    target string
    (String) The ID of the network interface used to allocate the floating IP address.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeouts
    zone string
    (String) The zone name where to create the floating IP address.
    address str
    (String) The floating IP address.
    bare_metal_server str
    Bare metal server identifier.
    crn str
    (String) The CRN for this floating IP.
    floating_ip str
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    is_bare_metal_server_network_interface_floating_ip_id str
    (String) The unique identifier of the floating IP.
    name str
    Name of the floating IP
    network_interface str
    The unique identifier for a network interface associated with the Bare metal server.
    status str
    (String) Provisioning status of the floating IP address.
    target str
    (String) The ID of the network interface used to allocate the floating IP address.
    timeouts IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs
    zone str
    (String) The zone name where to create the floating IP address.
    address String
    (String) The floating IP address.
    bareMetalServer String
    Bare metal server identifier.
    crn String
    (String) The CRN for this floating IP.
    floatingIp String
    The unique identifier for a floating IP to associate with the network interface associated with the bare metal server
    isBareMetalServerNetworkInterfaceFloatingIpId String
    (String) The unique identifier of the floating IP.
    name String
    Name of the floating IP
    networkInterface String
    The unique identifier for a network interface associated with the Bare metal server.
    status String
    (String) Provisioning status of the floating IP address.
    target String
    (String) The ID of the network interface used to allocate the floating IP address.
    timeouts Property Map
    zone String
    (String) The zone name where to create the floating IP address.

    Supporting Types

    IsBareMetalServerNetworkInterfaceFloatingIpTimeouts, IsBareMetalServerNetworkInterfaceFloatingIpTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    The ibm_is_bare_metal_server_network_interface_floating_ip resource can be imported by using bare metal server ID, network interface ID, floating ip ID.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud