ovh.Ip.Move
Explore with Pulumi AI
Moves a given IP to a different service, or inversely, parks it if empty service is given
Move IP 1.2.3.4 to service loadbalancer-XXXXX
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const moveIpToLoadBalancerXxxxx = new ovh.ip.Move("moveIpToLoadBalancerXxxxx", {
    ip: "1.2.3.4",
    routedTo: {
        serviceName: "loadbalancer-XXXXX",
    },
});
import pulumi
import pulumi_ovh as ovh
move_ip_to_load_balancer_xxxxx = ovh.ip.Move("moveIpToLoadBalancerXxxxx",
    ip="1.2.3.4",
    routed_to={
        "service_name": "loadbalancer-XXXXX",
    })
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/ip"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ip.NewMove(ctx, "moveIpToLoadBalancerXxxxx", &ip.MoveArgs{
			Ip: pulumi.String("1.2.3.4"),
			RoutedTo: &ip.MoveRoutedToArgs{
				ServiceName: pulumi.String("loadbalancer-XXXXX"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var moveIpToLoadBalancerXxxxx = new Ovh.Ip.Move("moveIpToLoadBalancerXxxxx", new()
    {
        Ip = "1.2.3.4",
        RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
        {
            ServiceName = "loadbalancer-XXXXX",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Ip.Move;
import com.pulumi.ovh.Ip.MoveArgs;
import com.pulumi.ovh.Ip.inputs.MoveRoutedToArgs;
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 moveIpToLoadBalancerXxxxx = new Move("moveIpToLoadBalancerXxxxx", MoveArgs.builder()
            .ip("1.2.3.4")
            .routedTo(MoveRoutedToArgs.builder()
                .serviceName("loadbalancer-XXXXX")
                .build())
            .build());
    }
}
resources:
  moveIpToLoadBalancerXxxxx:
    type: ovh:Ip:Move
    properties:
      ip: 1.2.3.4
      routedTo:
        serviceName: loadbalancer-XXXXX
Park IP/Detach IP 1.2.3.4 from any service
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const parkIp = new ovh.ip.Move("parkIp", {
    ip: "1.2.3.4",
    routedTo: {
        serviceName: "",
    },
});
import pulumi
import pulumi_ovh as ovh
park_ip = ovh.ip.Move("parkIp",
    ip="1.2.3.4",
    routed_to={
        "service_name": "",
    })
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/ip"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ip.NewMove(ctx, "parkIp", &ip.MoveArgs{
			Ip: pulumi.String("1.2.3.4"),
			RoutedTo: &ip.MoveRoutedToArgs{
				ServiceName: pulumi.String(""),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() => 
{
    var parkIp = new Ovh.Ip.Move("parkIp", new()
    {
        Ip = "1.2.3.4",
        RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
        {
            ServiceName = "",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Ip.Move;
import com.pulumi.ovh.Ip.MoveArgs;
import com.pulumi.ovh.Ip.inputs.MoveRoutedToArgs;
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 parkIp = new Move("parkIp", MoveArgs.builder()
            .ip("1.2.3.4")
            .routedTo(MoveRoutedToArgs.builder()
                .serviceName("")
                .build())
            .build());
    }
}
resources:
  parkIp:
    type: ovh:Ip:Move
    properties:
      ip: 1.2.3.4
      routedTo:
        serviceName: ""
Create Move Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Move(name: string, args: MoveArgs, opts?: CustomResourceOptions);@overload
def Move(resource_name: str,
         args: MoveArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def Move(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         ip: Optional[str] = None,
         routed_to: Optional[_ip.MoveRoutedToArgs] = None,
         description: Optional[str] = None)func NewMove(ctx *Context, name string, args MoveArgs, opts ...ResourceOption) (*Move, error)public Move(string name, MoveArgs args, CustomResourceOptions? opts = null)type: ovh:Ip:Move
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 MoveArgs
- 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 MoveArgs
- 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 MoveArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MoveArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MoveArgs
- 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 moveResource = new Ovh.Ip.Move("moveResource", new()
{
    Ip = "string",
    RoutedTo = new Ovh.Ip.Inputs.MoveRoutedToArgs
    {
        ServiceName = "string",
    },
    Description = "string",
});
example, err := Ip.NewMove(ctx, "moveResource", &Ip.MoveArgs{
	Ip: pulumi.String("string"),
	RoutedTo: &ip.MoveRoutedToArgs{
		ServiceName: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
})
var moveResource = new Move("moveResource", MoveArgs.builder()
    .ip("string")
    .routedTo(MoveRoutedToArgs.builder()
        .serviceName("string")
        .build())
    .description("string")
    .build());
move_resource = ovh.ip.Move("moveResource",
    ip="string",
    routed_to={
        "service_name": "string",
    },
    description="string")
const moveResource = new ovh.ip.Move("moveResource", {
    ip: "string",
    routedTo: {
        serviceName: "string",
    },
    description: "string",
});
type: ovh:Ip:Move
properties:
    description: string
    ip: string
    routedTo:
        serviceName: string
Move 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 Move resource accepts the following input properties:
- Ip string
- IP block that we want to attach to a different service
- RoutedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- Description string
- Description attached to the IP
- Ip string
- IP block that we want to attach to a different service
- RoutedTo MoveRouted To Args 
- Service to route the IP to. If null, the IP will be parked instead of moved
- Description string
- Description attached to the IP
- ip String
- IP block that we want to attach to a different service
- routedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- description String
- Description attached to the IP
- ip string
- IP block that we want to attach to a different service
- routedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- description string
- Description attached to the IP
- ip str
- IP block that we want to attach to a different service
- routed_to ip.Move Routed To Args 
- Service to route the IP to. If null, the IP will be parked instead of moved
- description str
- Description attached to the IP
- ip String
- IP block that we want to attach to a different service
- routedTo Property Map
- Service to route the IP to. If null, the IP will be parked instead of moved
- description String
- Description attached to the IP
Outputs
All input properties are implicitly available as output properties. Additionally, the Move resource produces the following output properties:
- CanBe boolTerminated 
- Whether IP service can be terminated
- Country string
- Country
- Id string
- The provider-assigned unique ID for this managed resource.
- OrganisationId string
- IP block organisation Id
- ServiceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- TaskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- TaskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- Type string
- Possible values for ip type
- CanBe boolTerminated 
- Whether IP service can be terminated
- Country string
- Country
- Id string
- The provider-assigned unique ID for this managed resource.
- OrganisationId string
- IP block organisation Id
- ServiceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- TaskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- TaskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- Type string
- Possible values for ip type
- canBe BooleanTerminated 
- Whether IP service can be terminated
- country String
- Country
- id String
- The provider-assigned unique ID for this managed resource.
- organisationId String
- IP block organisation Id
- serviceName String
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart StringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus String
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type String
- Possible values for ip type
- canBe booleanTerminated 
- Whether IP service can be terminated
- country string
- Country
- id string
- The provider-assigned unique ID for this managed resource.
- organisationId string
- IP block organisation Id
- serviceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type string
- Possible values for ip type
- can_be_ boolterminated 
- Whether IP service can be terminated
- country str
- Country
- id str
- The provider-assigned unique ID for this managed resource.
- organisation_id str
- IP block organisation Id
- service_name str
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- task_start_ strdate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- task_status str
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type str
- Possible values for ip type
- canBe BooleanTerminated 
- Whether IP service can be terminated
- country String
- Country
- id String
- The provider-assigned unique ID for this managed resource.
- organisationId String
- IP block organisation Id
- serviceName String
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart StringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus String
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type String
- Possible values for ip type
Look up Existing Move Resource
Get an existing Move 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?: MoveState, opts?: CustomResourceOptions): Move@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        can_be_terminated: Optional[bool] = None,
        country: Optional[str] = None,
        description: Optional[str] = None,
        ip: Optional[str] = None,
        organisation_id: Optional[str] = None,
        routed_to: Optional[_ip.MoveRoutedToArgs] = None,
        service_name: Optional[str] = None,
        task_start_date: Optional[str] = None,
        task_status: Optional[str] = None,
        type: Optional[str] = None) -> Movefunc GetMove(ctx *Context, name string, id IDInput, state *MoveState, opts ...ResourceOption) (*Move, error)public static Move Get(string name, Input<string> id, MoveState? state, CustomResourceOptions? opts = null)public static Move get(String name, Output<String> id, MoveState state, CustomResourceOptions options)resources:  _:    type: ovh:Ip:Move    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.
- CanBe boolTerminated 
- Whether IP service can be terminated
- Country string
- Country
- Description string
- Description attached to the IP
- Ip string
- IP block that we want to attach to a different service
- OrganisationId string
- IP block organisation Id
- RoutedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- ServiceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- TaskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- TaskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- Type string
- Possible values for ip type
- CanBe boolTerminated 
- Whether IP service can be terminated
- Country string
- Country
- Description string
- Description attached to the IP
- Ip string
- IP block that we want to attach to a different service
- OrganisationId string
- IP block organisation Id
- RoutedTo MoveRouted To Args 
- Service to route the IP to. If null, the IP will be parked instead of moved
- ServiceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- TaskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- TaskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- Type string
- Possible values for ip type
- canBe BooleanTerminated 
- Whether IP service can be terminated
- country String
- Country
- description String
- Description attached to the IP
- ip String
- IP block that we want to attach to a different service
- organisationId String
- IP block organisation Id
- routedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- serviceName String
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart StringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus String
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type String
- Possible values for ip type
- canBe booleanTerminated 
- Whether IP service can be terminated
- country string
- Country
- description string
- Description attached to the IP
- ip string
- IP block that we want to attach to a different service
- organisationId string
- IP block organisation Id
- routedTo MoveRouted To 
- Service to route the IP to. If null, the IP will be parked instead of moved
- serviceName string
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart stringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus string
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type string
- Possible values for ip type
- can_be_ boolterminated 
- Whether IP service can be terminated
- country str
- Country
- description str
- Description attached to the IP
- ip str
- IP block that we want to attach to a different service
- organisation_id str
- IP block organisation Id
- routed_to ip.Move Routed To Args 
- Service to route the IP to. If null, the IP will be parked instead of moved
- service_name str
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- task_start_ strdate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- task_status str
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type str
- Possible values for ip type
- canBe BooleanTerminated 
- Whether IP service can be terminated
- country String
- Country
- description String
- Description attached to the IP
- ip String
- IP block that we want to attach to a different service
- organisationId String
- IP block organisation Id
- routedTo Property Map
- Service to route the IP to. If null, the IP will be parked instead of moved
- serviceName String
- Service name in the form of ip-<part-1>.<part-2>.<part-3>.<part-4>
- taskStart StringDate 
- Starting date and time field of the current IP task that is in charge of changing the service the IP is attached to
- taskStatus String
- Status field of the current IP task that is in charge of changing the service the IP is attached to
- type String
- Possible values for ip type
Supporting Types
MoveRoutedTo, MoveRoutedToArgs      
- ServiceName string
- Name of the service to route the IP to. IP will be parked if this value is an empty string
- ServiceName string
- Name of the service to route the IP to. IP will be parked if this value is an empty string
- serviceName String
- Name of the service to route the IP to. IP will be parked if this value is an empty string
- serviceName string
- Name of the service to route the IP to. IP will be parked if this value is an empty string
- service_name str
- Name of the service to route the IP to. IP will be parked if this value is an empty string
- serviceName String
- Name of the service to route the IP to. IP will be parked if this value is an empty string
Import
The resource can be imported using the ip field, e.g.,
bash
$ pulumi import ovh:Ip/move:Move mv '1.2.3.4/32'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ovhTerraform Provider.