Service
Manages a Azure Database Migration Service.
NOTE: Destroying a Database Migration Service will leave any outstanding tasks untouched. This is to avoid unexpectedly deleting any tasks managed outside of this provide.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new Azure.Network.VirtualNetworkArgs
{
AddressSpaces =
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new Azure.Network.SubnetArgs
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefix = "10.0.1.0/24",
});
var exampleService = new Azure.DatabaseMigration.Service("exampleService", new Azure.DatabaseMigration.ServiceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
SubnetId = exampleSubnet.Id,
SkuName = "Standard_1vCores",
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/databasemigration"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefix: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
_, err = databasemigration.NewService(ctx, "exampleService", &databasemigration.ServiceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
SubnetId: exampleSubnet.ID(),
SkuName: pulumi.String("Standard_1vCores"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
address_spaces=["10.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefix="10.0.1.0/24")
example_service = azure.databasemigration.Service("exampleService",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
subnet_id=example_subnet.id,
sku_name="Standard_1vCores")import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefix: "10.0.1.0/24",
});
const exampleService = new azure.databasemigration.Service("exampleService", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
subnetId: exampleSubnet.id,
skuName: "Standard_1vCores",
});Create a Service Resource
new Service(name: string, args: ServiceArgs, opts?: CustomResourceOptions);def Service(resource_name, opts=None, location=None, name=None, resource_group_name=None, sku_name=None, subnet_id=None, tags=None, __props__=None);func NewService(ctx *Context, name string, args ServiceArgs, opts ...ResourceOption) (*Service, error)public Service(string name, ServiceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Service Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Service resource accepts the following input properties:
- Resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- Sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- Subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assigned to the resource.
- Resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- Sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- Subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assigned to the resource.
- resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assigned to the resource.
- resource_
group_ strname Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- sku_
name str The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- subnet_
id str The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specify the name of the database migration service. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assigned to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:
Look up an Existing Service Resource
Get an existing Service 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?: ServiceState, opts?: CustomResourceOptions): Servicestatic get(resource_name, id, opts=None, location=None, name=None, resource_group_name=None, sku_name=None, subnet_id=None, tags=None, __props__=None);func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- Resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- Sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- Subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assigned to the resource.
- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- Resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- Sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- Subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assigned to the resource.
- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name string
Specify the name of the database migration service. Changing this forces a new resource to be created.
- resource
Group stringName Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- sku
Name string The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- subnet
Id string The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assigned to the resource.
- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- name str
Specify the name of the database migration service. Changing this forces a new resource to be created.
- resource_
group_ strname Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.
- sku_
name str The sku name of the database migration service. Possible values are
Premium_4vCores,Standard_1vCores,Standard_2vCoresandStandard_4vCores. Changing this forces a new resource to be created.- subnet_
id str The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assigned to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.