# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetActiveDirectoryAdministrator gets an existing ActiveDirectoryAdministrator resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetDatabase gets an existing Database resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetElasticPool gets an existing ElasticPool resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetFailoverGroup gets an existing FailoverGroup resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetFirewallRule gets an existing FirewallRule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetManagedDatabase gets an existing ManagedDatabase resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetManagedInstance gets an existing ManagedInstance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetManagedInstanceActiveDirectoryAdministrator gets an existing ManagedInstanceActiveDirectoryAdministrator resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetManagedInstanceFailoverGroup gets an existing ManagedInstanceFailoverGroup resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := sql.GetServer(ctx, &sql.GetServerArgs{ Name: "examplesqlservername", ResourceGroupName: "example-resources", }, nil) if err != nil { return err } ctx.Export("sqlServerId", example.Id) return nil }) } ```.
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := sql.GetSqlManagedInstance(ctx, &sql.GetSqlManagedInstanceArgs{ Name: "example_mi", ResourceGroupName: "example-resources", }, nil) if err != nil { return err } ctx.Export("sqlInstanceId", example.Id) return nil }) } ``` ## Attribues Reference
* `id` - The SQL Managed Instance ID.
No description provided by the author
GetSqlServer gets an existing SqlServer resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
GetVirtualNetworkRule gets an existing VirtualNetworkRule resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := sql.LookupDatabase(ctx, &sql.LookupDatabaseArgs{ Name: "example_db", ServerName: "example_db_server", ResourceGroupName: "example-resources", }, nil) if err != nil { return err } ctx.Export("sqlDatabaseId", example.Id) return nil }) } ```.
No description provided by the author
No description provided by the author
No description provided by the author
NewActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options.
NewDatabase registers a new resource with the given unique name, arguments, and options.
NewElasticPool registers a new resource with the given unique name, arguments, and options.
NewFailoverGroup registers a new resource with the given unique name, arguments, and options.
NewFirewallRule registers a new resource with the given unique name, arguments, and options.
NewManagedDatabase registers a new resource with the given unique name, arguments, and options.
NewManagedInstance registers a new resource with the given unique name, arguments, and options.
NewManagedInstanceActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options.
NewManagedInstanceFailoverGroup registers a new resource with the given unique name, arguments, and options.
NewSqlServer registers a new resource with the given unique name, arguments, and options.
NewVirtualNetworkRule registers a new resource with the given unique name, arguments, and options.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { current, err := core.GetClientConfig(ctx, nil, nil) if err != nil { return err } exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{ Location: pulumi.String("West Europe"), }) if err != nil { return err } exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("4dm1n157r470r"), AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), }) if err != nil { return err } _, err = sql.NewActiveDirectoryAdministrator(ctx, "exampleActiveDirectoryAdministrator", &sql.ActiveDirectoryAdministratorArgs{ ServerName: exampleSqlServer.Name, ResourceGroupName: exampleResourceGroup.Name, Login: pulumi.String("sqladmin"), TenantId: pulumi.String(current.TenantId), ObjectId: pulumi.String(current.ObjectId), }) if err != nil { return err } return nil }) } ```
## Import
A SQL Active Directory Administrator can be imported using the `resource id`, e.g.
The set of arguments for constructing a ActiveDirectoryAdministrator resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage" "github.com/pulumi/pulumi/sdk/v3/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 } exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: pulumi.String("West US"), Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("4dm1n157r470r"), AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), Tags: pulumi.StringMap{ "environment": pulumi.String("production"), }, }) if err != nil { return err } exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, AccountTier: pulumi.String("Standard"), AccountReplicationType: pulumi.String("LRS"), }) if err != nil { return err } _, err = sql.NewDatabase(ctx, "exampleDatabase", &sql.DatabaseArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: pulumi.String("West US"), ServerName: exampleSqlServer.Name, ExtendedAuditingPolicy: &sql.DatabaseExtendedAuditingPolicyArgs{ StorageEndpoint: exampleAccount.PrimaryBlobEndpoint, StorageAccountAccessKey: exampleAccount.PrimaryAccessKey, StorageAccountAccessKeyIsSecondary: pulumi.Bool(true), RetentionInDays: pulumi.Int(6), }, Tags: pulumi.StringMap{ "environment": pulumi.String("production"), }, }) if err != nil { return err } return nil }) } ```
## Import
SQL Databases can be imported using the `resource id`, e.g.
The set of arguments for constructing a Database resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/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 } exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("4dm1n157r470r"), AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), }) if err != nil { return err } _, err = sql.NewElasticPool(ctx, "exampleElasticPool", &sql.ElasticPoolArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, ServerName: exampleSqlServer.Name, Edition: pulumi.String("Basic"), Dtu: pulumi.Int(50), DbDtuMin: pulumi.Int(0), DbDtuMax: pulumi.Int(5), PoolSize: pulumi.Int(5000), }) if err != nil { return err } return nil }) } ```
> **NOTE on `sql.ElasticPool`:** - The values of `edition`, `dtu`, and `poolSize` must be consistent with the [Azure SQL Database Service Tiers](https://docs.microsoft.com/en-gb/azure/sql-database/sql-database-service-tiers#elastic-pool-service-tiers-and-performance-in-edtus).
The set of arguments for constructing a ElasticPool resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "fmt"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/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 } primary, err := sql.NewSqlServer(ctx, "primary", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("sqladmin"), AdministratorLoginPassword: pulumi.String(fmt.Sprintf("%v%v%v%v", "pa", "$", "$", "w0rd")), }) if err != nil { return err } secondary, err := sql.NewSqlServer(ctx, "secondary", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: pulumi.String("northeurope"), Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("sqladmin"), AdministratorLoginPassword: pulumi.String(fmt.Sprintf("%v%v%v%v", "pa", "$", "$", "w0rd")), }) if err != nil { return err } db1, err := sql.NewDatabase(ctx, "db1", &sql.DatabaseArgs{ ResourceGroupName: primary.ResourceGroupName, Location: primary.Location, ServerName: primary.Name, }) if err != nil { return err } _, err = sql.NewFailoverGroup(ctx, "exampleFailoverGroup", &sql.FailoverGroupArgs{ ResourceGroupName: primary.ResourceGroupName, ServerName: primary.Name, Databases: pulumi.StringArray{ db1.ID(), }, PartnerServers: sql.FailoverGroupPartnerServerArray{ &sql.FailoverGroupPartnerServerArgs{ Id: secondary.ID(), }, }, ReadWriteEndpointFailoverPolicy: &sql.FailoverGroupReadWriteEndpointFailoverPolicyArgs{ Mode: pulumi.String("Automatic"), GraceMinutes: pulumi.Int(60), }, }) if err != nil { return err } return nil }) } ```
## Import
SQL Failover Groups can be imported using the `resource id`, e.g.
The set of arguments for constructing a FailoverGroup resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/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 } exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: pulumi.String("West US"), Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("4dm1n157r470r"), AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), }) if err != nil { return err } _, err = sql.NewFirewallRule(ctx, "exampleFirewallRule", &sql.FirewallRuleArgs{ ResourceGroupName: exampleResourceGroup.Name, ServerName: exampleSqlServer.Name, StartIpAddress: pulumi.String("10.0.17.62"), EndIpAddress: pulumi.String("10.0.17.62"), }) if err != nil { return err } return nil }) } ```
## Import
SQL Firewall Rules can be imported using the `resource id`, e.g.
The set of arguments for constructing a FirewallRule resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A collection of arguments for invoking getServer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A collection of arguments for invoking getServer.
A collection of values returned by getServer.
A collection of values returned by getServer.
A collection of arguments for invoking getSqlManagedInstance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A collection of arguments for invoking getSqlManagedInstance.
A collection of values returned by getSqlManagedInstance.
A collection of values returned by getSqlManagedInstance.
A collection of arguments for invoking getDatabase.
A collection of arguments for invoking getDatabase.
A collection of values returned by getDatabase.
A collection of values returned by getDatabase.
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := sql.NewManagedDatabase(ctx, "example", &sql.ManagedDatabaseArgs{ SqlManagedInstanceId: pulumi.Any(azurerm_sql_managed_instance.Example.Id), Location: pulumi.Any(azurerm_resource_group.Example.Location), }) if err != nil { return err } return nil }) } ```
## Import
SQL Managed Databases can be imported using the `resource id`, e.g.
The set of arguments for constructing a ManagedDatabase resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/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 } exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "exampleNetworkSecurityGroup", &network.NetworkSecurityGroupArgs{ Location: exampleResourceGroup.Location, ResourceGroupName: exampleResourceGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowManagementInbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(106), Direction: pulumi.String("Inbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("Tcp"), SourcePortRange: pulumi.String("*"), DestinationPortRanges: pulumi.StringArray{ pulumi.String("9000"), pulumi.String("9003"), pulumi.String("1438"), pulumi.String("1440"), pulumi.String("1452"), }, SourceAddressPrefix: pulumi.String("*"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowMisubnetInbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(200), Direction: pulumi.String("Inbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("*"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("*"), SourceAddressPrefix: pulumi.String("10.0.0.0/24"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowHealthProbeInbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(300), Direction: pulumi.String("Inbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("*"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("*"), SourceAddressPrefix: pulumi.String("AzureLoadBalancer"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowTdsInbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(1000), Direction: pulumi.String("Inbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("Tcp"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("1433"), SourceAddressPrefix: pulumi.String("VirtualNetwork"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "denyAllInbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(4096), Direction: pulumi.String("Inbound"), Access: pulumi.String("Deny"), Protocol: pulumi.String("*"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("*"), SourceAddressPrefix: pulumi.String("*"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowManagementOutbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(102), Direction: pulumi.String("Outbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("Tcp"), SourcePortRange: pulumi.String("*"), DestinationPortRanges: pulumi.StringArray{ pulumi.String("80"), pulumi.String("443"), pulumi.String("12000"), }, SourceAddressPrefix: pulumi.String("*"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "allowMisubnetOutbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(200), Direction: pulumi.String("Outbound"), Access: pulumi.String("Allow"), Protocol: pulumi.String("*"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("*"), SourceAddressPrefix: pulumi.String("10.0.0.0/24"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } _, err = network.NewNetworkSecurityRule(ctx, "denyAllOutbound", &network.NetworkSecurityRuleArgs{ Priority: pulumi.Int(4096), Direction: pulumi.String("Outbound"), Access: pulumi.String("Deny"), Protocol: pulumi.String("*"), SourcePortRange: pulumi.String("*"), DestinationPortRange: pulumi.String("*"), SourceAddressPrefix: pulumi.String("*"), DestinationAddressPrefix: pulumi.String("*"), ResourceGroupName: exampleResourceGroup.Name, NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, }) if err != nil { return err } exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{ ResourceGroupName: exampleResourceGroup.Name, AddressSpaces: pulumi.StringArray{ pulumi.String("10.0.0.0/16"), }, Location: exampleResourceGroup.Location, }) if err != nil { return err } exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{ ResourceGroupName: exampleResourceGroup.Name, VirtualNetworkName: exampleVirtualNetwork.Name, AddressPrefix: pulumi.String("10.0.0.0/24"), Delegations: network.SubnetDelegationArray{ &network.SubnetDelegationArgs{ Name: pulumi.String("managedinstancedelegation"), ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ Name: pulumi.String("Microsoft.Sql/managedInstances"), Actions: pulumi.StringArray{ pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"), pulumi.String("Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action"), }, }, }, }, }) if err != nil { return err } exampleSubnetNetworkSecurityGroupAssociation, err := network.NewSubnetNetworkSecurityGroupAssociation(ctx, "exampleSubnetNetworkSecurityGroupAssociation", &network.SubnetNetworkSecurityGroupAssociationArgs{ SubnetId: exampleSubnet.ID(), NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(), }) if err != nil { return err } exampleRouteTable, err := network.NewRouteTable(ctx, "exampleRouteTable", &network.RouteTableArgs{ Location: exampleResourceGroup.Location, ResourceGroupName: exampleResourceGroup.Name, DisableBgpRoutePropagation: pulumi.Bool(false), }, pulumi.DependsOn([]pulumi.Resource{ exampleSubnet, })) if err != nil { return err } exampleSubnetRouteTableAssociation, err := network.NewSubnetRouteTableAssociation(ctx, "exampleSubnetRouteTableAssociation", &network.SubnetRouteTableAssociationArgs{ SubnetId: exampleSubnet.ID(), RouteTableId: exampleRouteTable.ID(), }) if err != nil { return err } _, err = sql.NewManagedInstance(ctx, "exampleManagedInstance", &sql.ManagedInstanceArgs{ ResourceGroupName: exampleResourceGroup.Name, Location: exampleResourceGroup.Location, AdministratorLogin: pulumi.String("mradministrator"), AdministratorLoginPassword: pulumi.String("thisIsDog11"), LicenseType: pulumi.String("BasePrice"), SubnetId: exampleSubnet.ID(), SkuName: pulumi.String("GP_Gen5"), Vcores: pulumi.Int(4), StorageSizeInGb: pulumi.Int(32), }, pulumi.DependsOn([]pulumi.Resource{ exampleSubnetNetworkSecurityGroupAssociation, exampleSubnetRouteTableAssociation, })) if err != nil { return err } return nil }) } ```
## Import
SQL Servers can be imported using the `resource id`, e.g.
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { exampleManagedInstance, err := sql.NewManagedInstance(ctx, "exampleManagedInstance", &sql.ManagedInstanceArgs{ ResourceGroupName: pulumi.Any(azurerm_resource_group.Example.Name), Location: pulumi.Any(azurerm_resource_group.Example.Location), AdministratorLogin: pulumi.String("mradministrator"), AdministratorLoginPassword: pulumi.String("thisIsDog11"), LicenseType: pulumi.String("BasePrice"), SubnetId: pulumi.Any(azurerm_subnet.Example.Id), SkuName: pulumi.String("GP_Gen5"), Vcores: pulumi.Int(4), StorageSizeInGb: pulumi.Int(32), }, pulumi.DependsOn([]pulumi.Resource{ azurerm_subnet_network_security_group_association.Example, azurerm_subnet_route_table_association.Example, })) if err != nil { return err } current, err := core.GetClientConfig(ctx, nil, nil) if err != nil { return err } _, err = sql.NewManagedInstanceActiveDirectoryAdministrator(ctx, "exampleManagedInstanceActiveDirectoryAdministrator", &sql.ManagedInstanceActiveDirectoryAdministratorArgs{ ManagedInstanceName: exampleManagedInstance.Name, ResourceGroupName: pulumi.Any(azurerm_resource_group.Example.Name), Login: pulumi.String("sqladmin"), TenantId: pulumi.String(current.TenantId), ObjectId: pulumi.String(current.ObjectId), }) if err != nil { return err } return nil }) } ```
## Import
A SQL Active Directory Administrator can be imported using the `resource id`, e.g.
The set of arguments for constructing a ManagedInstanceActiveDirectoryAdministrator resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The set of arguments for constructing a ManagedInstance resource.
No description provided by the author
## Import
SQL Instance Failover Groups can be imported using the `resource id`, e.g.
The set of arguments for constructing a ManagedInstanceFailoverGroup resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Manages a Microsoft SQL Azure Database Server.
The set of arguments for constructing a SqlServer resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
## Example Usage
```go package main
import ( "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/sql" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" )
func main() { pulumi.Run(func(ctx *pulumi.Context) error { example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ Location: pulumi.String("West Europe"), }) if err != nil { return err } vnet, err := network.NewVirtualNetwork(ctx, "vnet", &network.VirtualNetworkArgs{ AddressSpaces: pulumi.StringArray{ pulumi.String("10.7.29.0/29"), }, Location: example.Location, ResourceGroupName: example.Name, }) if err != nil { return err } subnet, err := network.NewSubnet(ctx, "subnet", &network.SubnetArgs{ ResourceGroupName: example.Name, VirtualNetworkName: vnet.Name, AddressPrefixes: pulumi.StringArray{ pulumi.String("10.7.29.0/29"), }, ServiceEndpoints: pulumi.StringArray{ pulumi.String("Microsoft.Sql"), }, }) if err != nil { return err } sqlserver, err := sql.NewSqlServer(ctx, "sqlserver", &sql.SqlServerArgs{ ResourceGroupName: example.Name, Location: example.Location, Version: pulumi.String("12.0"), AdministratorLogin: pulumi.String("4dm1n157r470r"), AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), }) if err != nil { return err } _, err = sql.NewVirtualNetworkRule(ctx, "sqlvnetrule", &sql.VirtualNetworkRuleArgs{ ResourceGroupName: example.Name, ServerName: sqlserver.Name, SubnetId: subnet.ID(), }) if err != nil { return err } return nil }) } ```
## Import
SQL Virtual Network Rules can be imported using the `resource id`, e.g.
The set of arguments for constructing a VirtualNetworkRule resource.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
ActiveDirectoryAdministratorArrayInput is an input type that accepts ActiveDirectoryAdministratorArray and ActiveDirectoryAdministratorArrayOutput values.
No description provided by the author
ActiveDirectoryAdministratorMapInput is an input type that accepts ActiveDirectoryAdministratorMap and ActiveDirectoryAdministratorMapOutput values.
DatabaseArrayInput is an input type that accepts DatabaseArray and DatabaseArrayOutput values.
DatabaseExtendedAuditingPolicyInput is an input type that accepts DatabaseExtendedAuditingPolicyArgs and DatabaseExtendedAuditingPolicyOutput values.
DatabaseExtendedAuditingPolicyPtrInput is an input type that accepts DatabaseExtendedAuditingPolicyArgs, DatabaseExtendedAuditingPolicyPtr and DatabaseExtendedAuditingPolicyPtrOutput values.
DatabaseImportInput is an input type that accepts DatabaseImportArgs and DatabaseImportOutput values.
DatabaseImportPtrInput is an input type that accepts DatabaseImportArgs, DatabaseImportPtr and DatabaseImportPtrOutput values.
No description provided by the author
DatabaseMapInput is an input type that accepts DatabaseMap and DatabaseMapOutput values.
DatabaseThreatDetectionPolicyInput is an input type that accepts DatabaseThreatDetectionPolicyArgs and DatabaseThreatDetectionPolicyOutput values.
DatabaseThreatDetectionPolicyPtrInput is an input type that accepts DatabaseThreatDetectionPolicyArgs, DatabaseThreatDetectionPolicyPtr and DatabaseThreatDetectionPolicyPtrOutput values.
ElasticPoolArrayInput is an input type that accepts ElasticPoolArray and ElasticPoolArrayOutput values.
No description provided by the author
ElasticPoolMapInput is an input type that accepts ElasticPoolMap and ElasticPoolMapOutput values.
FailoverGroupArrayInput is an input type that accepts FailoverGroupArray and FailoverGroupArrayOutput values.
No description provided by the author
FailoverGroupMapInput is an input type that accepts FailoverGroupMap and FailoverGroupMapOutput values.
FailoverGroupPartnerServerArrayInput is an input type that accepts FailoverGroupPartnerServerArray and FailoverGroupPartnerServerArrayOutput values.
FailoverGroupPartnerServerInput is an input type that accepts FailoverGroupPartnerServerArgs and FailoverGroupPartnerServerOutput values.
FailoverGroupReadonlyEndpointFailoverPolicyInput is an input type that accepts FailoverGroupReadonlyEndpointFailoverPolicyArgs and FailoverGroupReadonlyEndpointFailoverPolicyOutput values.
FailoverGroupReadonlyEndpointFailoverPolicyPtrInput is an input type that accepts FailoverGroupReadonlyEndpointFailoverPolicyArgs, FailoverGroupReadonlyEndpointFailoverPolicyPtr and FailoverGroupReadonlyEndpointFailoverPolicyPtrOutput values.
FailoverGroupReadWriteEndpointFailoverPolicyInput is an input type that accepts FailoverGroupReadWriteEndpointFailoverPolicyArgs and FailoverGroupReadWriteEndpointFailoverPolicyOutput values.
FailoverGroupReadWriteEndpointFailoverPolicyPtrInput is an input type that accepts FailoverGroupReadWriteEndpointFailoverPolicyArgs, FailoverGroupReadWriteEndpointFailoverPolicyPtr and FailoverGroupReadWriteEndpointFailoverPolicyPtrOutput values.
FirewallRuleArrayInput is an input type that accepts FirewallRuleArray and FirewallRuleArrayOutput values.
No description provided by the author
FirewallRuleMapInput is an input type that accepts FirewallRuleMap and FirewallRuleMapOutput values.
GetServerIdentityArrayInput is an input type that accepts GetServerIdentityArray and GetServerIdentityArrayOutput values.
GetServerIdentityInput is an input type that accepts GetServerIdentityArgs and GetServerIdentityOutput values.
GetSqlManagedInstanceIdentityArrayInput is an input type that accepts GetSqlManagedInstanceIdentityArray and GetSqlManagedInstanceIdentityArrayOutput values.
GetSqlManagedInstanceIdentityInput is an input type that accepts GetSqlManagedInstanceIdentityArgs and GetSqlManagedInstanceIdentityOutput values.
ManagedDatabaseArrayInput is an input type that accepts ManagedDatabaseArray and ManagedDatabaseArrayOutput values.
No description provided by the author
ManagedDatabaseMapInput is an input type that accepts ManagedDatabaseMap and ManagedDatabaseMapOutput values.
ManagedInstanceActiveDirectoryAdministratorArrayInput is an input type that accepts ManagedInstanceActiveDirectoryAdministratorArray and ManagedInstanceActiveDirectoryAdministratorArrayOutput values.
No description provided by the author
ManagedInstanceActiveDirectoryAdministratorMapInput is an input type that accepts ManagedInstanceActiveDirectoryAdministratorMap and ManagedInstanceActiveDirectoryAdministratorMapOutput values.
ManagedInstanceArrayInput is an input type that accepts ManagedInstanceArray and ManagedInstanceArrayOutput values.
ManagedInstanceFailoverGroupArrayInput is an input type that accepts ManagedInstanceFailoverGroupArray and ManagedInstanceFailoverGroupArrayOutput values.
No description provided by the author
ManagedInstanceFailoverGroupMapInput is an input type that accepts ManagedInstanceFailoverGroupMap and ManagedInstanceFailoverGroupMapOutput values.
ManagedInstanceFailoverGroupPartnerRegionArrayInput is an input type that accepts ManagedInstanceFailoverGroupPartnerRegionArray and ManagedInstanceFailoverGroupPartnerRegionArrayOutput values.
ManagedInstanceFailoverGroupPartnerRegionInput is an input type that accepts ManagedInstanceFailoverGroupPartnerRegionArgs and ManagedInstanceFailoverGroupPartnerRegionOutput values.
ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyInput is an input type that accepts ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs and ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyOutput values.
ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyPtrInput is an input type that accepts ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyArgs, ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyPtr and ManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyPtrOutput values.
ManagedInstanceIdentityInput is an input type that accepts ManagedInstanceIdentityArgs and ManagedInstanceIdentityOutput values.
ManagedInstanceIdentityPtrInput is an input type that accepts ManagedInstanceIdentityArgs, ManagedInstanceIdentityPtr and ManagedInstanceIdentityPtrOutput values.
No description provided by the author
ManagedInstanceMapInput is an input type that accepts ManagedInstanceMap and ManagedInstanceMapOutput values.
SqlServerArrayInput is an input type that accepts SqlServerArray and SqlServerArrayOutput values.
SqlServerExtendedAuditingPolicyInput is an input type that accepts SqlServerExtendedAuditingPolicyArgs and SqlServerExtendedAuditingPolicyOutput values.
SqlServerExtendedAuditingPolicyPtrInput is an input type that accepts SqlServerExtendedAuditingPolicyArgs, SqlServerExtendedAuditingPolicyPtr and SqlServerExtendedAuditingPolicyPtrOutput values.
SqlServerIdentityInput is an input type that accepts SqlServerIdentityArgs and SqlServerIdentityOutput values.
SqlServerIdentityPtrInput is an input type that accepts SqlServerIdentityArgs, SqlServerIdentityPtr and SqlServerIdentityPtrOutput values.
No description provided by the author
SqlServerMapInput is an input type that accepts SqlServerMap and SqlServerMapOutput values.
SqlServerThreatDetectionPolicyInput is an input type that accepts SqlServerThreatDetectionPolicyArgs and SqlServerThreatDetectionPolicyOutput values.
SqlServerThreatDetectionPolicyPtrInput is an input type that accepts SqlServerThreatDetectionPolicyArgs, SqlServerThreatDetectionPolicyPtr and SqlServerThreatDetectionPolicyPtrOutput values.
VirtualNetworkRuleArrayInput is an input type that accepts VirtualNetworkRuleArray and VirtualNetworkRuleArrayOutput values.
No description provided by the author
VirtualNetworkRuleMapInput is an input type that accepts VirtualNetworkRuleMap and VirtualNetworkRuleMapOutput values.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author