postgresql

package
v3.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveDirectoryAdministrator added in v3.11.0

type ActiveDirectoryAdministrator struct {
	pulumi.CustomResourceState

	// The login name of the principal to set as the server administrator
	Login pulumi.StringOutput `pulumi:"login"`
	// The ID of the principal to set as the server administrator
	ObjectId pulumi.StringOutput `pulumi:"objectId"`
	// The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created.
	ServerName pulumi.StringOutput `pulumi:"serverName"`
	// The Azure Tenant ID
	TenantId pulumi.StringOutput `pulumi:"tenantId"`
}

Allows you to set a user or group as the AD administrator for an PostgreSQL server in Azure

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"github.com/pulumi/pulumi/sdk/v2/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 US"),
		})
		if err != nil {
			return err
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
			ResourceGroupName:          exampleResourceGroup.Name,
			Location:                   exampleResourceGroup.Location,
			Version:                    pulumi.String("9.6"),
			AdministratorLogin:         pulumi.String("4dm1n157r470r"),
			AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
		})
		if err != nil {
			return err
		}
		_, err = postgresql.NewActiveDirectoryAdministrator(ctx, "exampleActiveDirectoryAdministrator", &postgresql.ActiveDirectoryAdministratorArgs{
			ServerName:        exampleServer.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
	})
}

```

func GetActiveDirectoryAdministrator added in v3.11.0

func GetActiveDirectoryAdministrator(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ActiveDirectoryAdministratorState, opts ...pulumi.ResourceOption) (*ActiveDirectoryAdministrator, error)

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).

func NewActiveDirectoryAdministrator added in v3.11.0

func NewActiveDirectoryAdministrator(ctx *pulumi.Context,
	name string, args *ActiveDirectoryAdministratorArgs, opts ...pulumi.ResourceOption) (*ActiveDirectoryAdministrator, error)

NewActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options.

type ActiveDirectoryAdministratorArgs added in v3.11.0

type ActiveDirectoryAdministratorArgs struct {
	// The login name of the principal to set as the server administrator
	Login pulumi.StringInput
	// The ID of the principal to set as the server administrator
	ObjectId pulumi.StringInput
	// The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created.
	ServerName pulumi.StringInput
	// The Azure Tenant ID
	TenantId pulumi.StringInput
}

The set of arguments for constructing a ActiveDirectoryAdministrator resource.

func (ActiveDirectoryAdministratorArgs) ElementType added in v3.11.0

type ActiveDirectoryAdministratorState added in v3.11.0

type ActiveDirectoryAdministratorState struct {
	// The login name of the principal to set as the server administrator
	Login pulumi.StringPtrInput
	// The ID of the principal to set as the server administrator
	ObjectId pulumi.StringPtrInput
	// The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created.
	ServerName pulumi.StringPtrInput
	// The Azure Tenant ID
	TenantId pulumi.StringPtrInput
}

func (ActiveDirectoryAdministratorState) ElementType added in v3.11.0

type Configuration

type Configuration struct {
	pulumi.CustomResourceState

	// Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringOutput `pulumi:"serverName"`
	// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.
	Value pulumi.StringOutput `pulumi:"value"`
}

Sets a PostgreSQL Configuration value on a PostgreSQL Server.

## Disclaimers

> **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
			Location:                   exampleResourceGroup.Location,
			ResourceGroupName:          exampleResourceGroup.Name,
			SkuName:                    pulumi.String("B_Gen5_2"),
			StorageMb:                  pulumi.Int(5120),
			BackupRetentionDays:        pulumi.Int(7),
			GeoRedundantBackupEnabled:  pulumi.Bool(false),
			AutoGrowEnabled:            pulumi.Bool(true),
			AdministratorLogin:         pulumi.String("psqladminun"),
			AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
			Version:                    pulumi.String("9.5"),
			SslEnforcementEnabled:      pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = postgresql.NewConfiguration(ctx, "exampleConfiguration", &postgresql.ConfigurationArgs{
			Name:              pulumi.String("backslash_quote"),
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleServer.Name,
			Value:             pulumi.String("on"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetConfiguration

func GetConfiguration(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error)

GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewConfiguration

func NewConfiguration(ctx *pulumi.Context,
	name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error)

NewConfiguration registers a new resource with the given unique name, arguments, and options.

type ConfigurationArgs

type ConfigurationArgs struct {
	// Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created.
	Name pulumi.StringInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringInput
	// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.
	Value pulumi.StringInput
}

The set of arguments for constructing a Configuration resource.

func (ConfigurationArgs) ElementType

func (ConfigurationArgs) ElementType() reflect.Type

type ConfigurationState

type ConfigurationState struct {
	// Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringPtrInput
	// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values.
	Value pulumi.StringPtrInput
}

func (ConfigurationState) ElementType

func (ConfigurationState) ElementType() reflect.Type

type Database

type Database struct {
	pulumi.CustomResourceState

	// Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created.
	Charset pulumi.StringOutput `pulumi:"charset"`
	// Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created.
	Collation pulumi.StringOutput `pulumi:"collation"`
	// Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a
	// new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringOutput `pulumi:"serverName"`
}

Manages a PostgreSQL Database within a PostgreSQL Server

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
			Location:                   exampleResourceGroup.Location,
			ResourceGroupName:          exampleResourceGroup.Name,
			SkuName:                    pulumi.String("B_Gen5_2"),
			StorageMb:                  pulumi.Int(5120),
			BackupRetentionDays:        pulumi.Int(7),
			GeoRedundantBackupEnabled:  pulumi.Bool(false),
			AutoGrowEnabled:            pulumi.Bool(true),
			AdministratorLogin:         pulumi.String("psqladminun"),
			AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
			Version:                    pulumi.String("9.5"),
			SslEnforcementEnabled:      pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = postgresql.NewDatabase(ctx, "exampleDatabase", &postgresql.DatabaseArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleServer.Name,
			Charset:           pulumi.String("UTF8"),
			Collation:         pulumi.String("English_United States.1252"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetDatabase

func GetDatabase(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *DatabaseState, opts ...pulumi.ResourceOption) (*Database, error)

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).

func NewDatabase

func NewDatabase(ctx *pulumi.Context,
	name string, args *DatabaseArgs, opts ...pulumi.ResourceOption) (*Database, error)

NewDatabase registers a new resource with the given unique name, arguments, and options.

type DatabaseArgs

type DatabaseArgs struct {
	// Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created.
	Charset pulumi.StringInput
	// Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created.
	Collation pulumi.StringInput
	// Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringInput
}

The set of arguments for constructing a Database resource.

func (DatabaseArgs) ElementType

func (DatabaseArgs) ElementType() reflect.Type

type DatabaseState

type DatabaseState struct {
	// Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created.
	Charset pulumi.StringPtrInput
	// Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created.
	Collation pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringPtrInput
}

func (DatabaseState) ElementType

func (DatabaseState) ElementType() reflect.Type

type FirewallRule

type FirewallRule struct {
	pulumi.CustomResourceState

	// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"`
	// Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a
	// new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringOutput `pulumi:"serverName"`
	// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"`
}

Manages a Firewall Rule for a PostgreSQL Server

## Example Usage ### Single IP Address)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", nil)
		if err != nil {
			return err
		}
		_, err = postgresql.NewFirewallRule(ctx, "exampleFirewallRule", &postgresql.FirewallRuleArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleServer.Name,
			StartIpAddress:    pulumi.String("40.112.8.12"),
			EndIpAddress:      pulumi.String("40.112.8.12"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### IP Range)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", nil)
		if err != nil {
			return err
		}
		_, err = postgresql.NewFirewallRule(ctx, "exampleFirewallRule", &postgresql.FirewallRuleArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			ServerName:        exampleServer.Name,
			StartIpAddress:    pulumi.String("40.112.0.0"),
			EndIpAddress:      pulumi.String("40.112.255.255"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetFirewallRule

func GetFirewallRule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error)

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).

func NewFirewallRule

func NewFirewallRule(ctx *pulumi.Context,
	name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error)

NewFirewallRule registers a new resource with the given unique name, arguments, and options.

type FirewallRuleArgs

type FirewallRuleArgs struct {
	// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	EndIpAddress pulumi.StringInput
	// Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringInput
	// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	StartIpAddress pulumi.StringInput
}

The set of arguments for constructing a FirewallRule resource.

func (FirewallRuleArgs) ElementType

func (FirewallRuleArgs) ElementType() reflect.Type

type FirewallRuleState

type FirewallRuleState struct {
	// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	EndIpAddress pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a
	// new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerName pulumi.StringPtrInput
	// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created.
	StartIpAddress pulumi.StringPtrInput
}

func (FirewallRuleState) ElementType

func (FirewallRuleState) ElementType() reflect.Type

type GetServerIdentity added in v3.16.0

type GetServerIdentity struct {
	// The ID of the System Managed Service Principal assigned to the PostgreSQL Server.
	PrincipalId string `pulumi:"principalId"`
	// The ID of the Tenant of the System Managed Service Principal assigned to the PostgreSQL Server.
	TenantId string `pulumi:"tenantId"`
	// The identity type of the Managed Identity assigned to the PostgreSQL Server.
	Type string `pulumi:"type"`
}

type GetServerIdentityArgs added in v3.16.0

type GetServerIdentityArgs struct {
	// The ID of the System Managed Service Principal assigned to the PostgreSQL Server.
	PrincipalId pulumi.StringInput `pulumi:"principalId"`
	// The ID of the Tenant of the System Managed Service Principal assigned to the PostgreSQL Server.
	TenantId pulumi.StringInput `pulumi:"tenantId"`
	// The identity type of the Managed Identity assigned to the PostgreSQL Server.
	Type pulumi.StringInput `pulumi:"type"`
}

func (GetServerIdentityArgs) ElementType added in v3.16.0

func (GetServerIdentityArgs) ElementType() reflect.Type

func (GetServerIdentityArgs) ToGetServerIdentityOutput added in v3.16.0

func (i GetServerIdentityArgs) ToGetServerIdentityOutput() GetServerIdentityOutput

func (GetServerIdentityArgs) ToGetServerIdentityOutputWithContext added in v3.16.0

func (i GetServerIdentityArgs) ToGetServerIdentityOutputWithContext(ctx context.Context) GetServerIdentityOutput

type GetServerIdentityArray added in v3.16.0

type GetServerIdentityArray []GetServerIdentityInput

func (GetServerIdentityArray) ElementType added in v3.16.0

func (GetServerIdentityArray) ElementType() reflect.Type

func (GetServerIdentityArray) ToGetServerIdentityArrayOutput added in v3.16.0

func (i GetServerIdentityArray) ToGetServerIdentityArrayOutput() GetServerIdentityArrayOutput

func (GetServerIdentityArray) ToGetServerIdentityArrayOutputWithContext added in v3.16.0

func (i GetServerIdentityArray) ToGetServerIdentityArrayOutputWithContext(ctx context.Context) GetServerIdentityArrayOutput

type GetServerIdentityArrayInput added in v3.16.0

type GetServerIdentityArrayInput interface {
	pulumi.Input

	ToGetServerIdentityArrayOutput() GetServerIdentityArrayOutput
	ToGetServerIdentityArrayOutputWithContext(context.Context) GetServerIdentityArrayOutput
}

GetServerIdentityArrayInput is an input type that accepts GetServerIdentityArray and GetServerIdentityArrayOutput values. You can construct a concrete instance of `GetServerIdentityArrayInput` via:

GetServerIdentityArray{ GetServerIdentityArgs{...} }

type GetServerIdentityArrayOutput added in v3.16.0

type GetServerIdentityArrayOutput struct{ *pulumi.OutputState }

func (GetServerIdentityArrayOutput) ElementType added in v3.16.0

func (GetServerIdentityArrayOutput) Index added in v3.16.0

func (GetServerIdentityArrayOutput) ToGetServerIdentityArrayOutput added in v3.16.0

func (o GetServerIdentityArrayOutput) ToGetServerIdentityArrayOutput() GetServerIdentityArrayOutput

func (GetServerIdentityArrayOutput) ToGetServerIdentityArrayOutputWithContext added in v3.16.0

func (o GetServerIdentityArrayOutput) ToGetServerIdentityArrayOutputWithContext(ctx context.Context) GetServerIdentityArrayOutput

type GetServerIdentityInput added in v3.16.0

type GetServerIdentityInput interface {
	pulumi.Input

	ToGetServerIdentityOutput() GetServerIdentityOutput
	ToGetServerIdentityOutputWithContext(context.Context) GetServerIdentityOutput
}

GetServerIdentityInput is an input type that accepts GetServerIdentityArgs and GetServerIdentityOutput values. You can construct a concrete instance of `GetServerIdentityInput` via:

GetServerIdentityArgs{...}

type GetServerIdentityOutput added in v3.16.0

type GetServerIdentityOutput struct{ *pulumi.OutputState }

func (GetServerIdentityOutput) ElementType added in v3.16.0

func (GetServerIdentityOutput) ElementType() reflect.Type

func (GetServerIdentityOutput) PrincipalId added in v3.16.0

The ID of the System Managed Service Principal assigned to the PostgreSQL Server.

func (GetServerIdentityOutput) TenantId added in v3.16.0

The ID of the Tenant of the System Managed Service Principal assigned to the PostgreSQL Server.

func (GetServerIdentityOutput) ToGetServerIdentityOutput added in v3.16.0

func (o GetServerIdentityOutput) ToGetServerIdentityOutput() GetServerIdentityOutput

func (GetServerIdentityOutput) ToGetServerIdentityOutputWithContext added in v3.16.0

func (o GetServerIdentityOutput) ToGetServerIdentityOutputWithContext(ctx context.Context) GetServerIdentityOutput

func (GetServerIdentityOutput) Type added in v3.16.0

The identity type of the Managed Identity assigned to the PostgreSQL Server.

type LookupServerArgs

type LookupServerArgs struct {
	// The name of the PostgreSQL Server.
	Name string `pulumi:"name"`
	// Specifies the name of the Resource Group where the PostgreSQL Server exists.
	ResourceGroupName string `pulumi:"resourceGroupName"`
}

A collection of arguments for invoking getServer.

type LookupServerResult

type LookupServerResult struct {
	// The administrator username of the PostgreSQL Server.
	AdministratorLogin string `pulumi:"administratorLogin"`
	// The fully qualified domain name of the PostgreSQL Server.
	Fqdn string `pulumi:"fqdn"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// An `identity` block as defined below.
	Identities []GetServerIdentity `pulumi:"identities"`
	// The location of the Resource Group in which the PostgreSQL Server exists.
	Location          string `pulumi:"location"`
	Name              string `pulumi:"name"`
	ResourceGroupName string `pulumi:"resourceGroupName"`
	// The SKU name of the PostgreSQL Server.
	SkuName string `pulumi:"skuName"`
	// A mapping of tags assigned to the resource.
	Tags map[string]string `pulumi:"tags"`
	// The version of the PostgreSQL Server.
	Version string `pulumi:"version"`
}

A collection of values returned by getServer.

func LookupServer

func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error)

Use this data source to access information about an existing PostgreSQL Azure Database Server.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := postgresql.LookupServer(ctx, &postgresql.LookupServerArgs{
			Name:              "postgresql-server-1",
			ResourceGroupName: "api-rg-pro",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("postgresqlServerId", example.Id)
		return nil
	})
}

```

type Server

type Server struct {
	pulumi.CustomResourceState

	// The Administrator Login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created.
	AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"`
	// The Password associated with the `administratorLogin` for the PostgreSQL Server. Required when `createMode` is `Default`.
	AdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"administratorLoginPassword"`
	// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
	AutoGrowEnabled pulumi.BoolOutput `pulumi:"autoGrowEnabled"`
	// Backup retention days for the server, supported values are between `7` and `35` days.
	BackupRetentionDays pulumi.IntOutput `pulumi:"backupRetentionDays"`
	// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default.`
	CreateMode pulumi.StringPtrOutput `pulumi:"createMode"`
	// For creation modes other then default the source server ID to use.
	CreationSourceServerId pulumi.StringPtrOutput `pulumi:"creationSourceServerId"`
	// The FQDN of the PostgreSQL Server.
	Fqdn pulumi.StringOutput `pulumi:"fqdn"`
	// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier.
	GeoRedundantBackupEnabled pulumi.BoolOutput `pulumi:"geoRedundantBackupEnabled"`
	// An `identity` block as defined below.
	Identity ServerIdentityPtrOutput `pulumi:"identity"`
	// Whether or not infrastructure is encrypted for this server. Defaults to `false`. Changing this forces a new resource to be created.
	InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"`
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringOutput `pulumi:"location"`
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// Whether or not public network access is allowed for this server. Defaults to `true`.
	PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
	// The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`.
	RestorePointInTime pulumi.StringPtrOutput `pulumi:"restorePointInTime"`
	// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#sku).
	SkuName pulumi.StringOutput `pulumi:"skuName"`
	// Deprecated: this has been renamed to the boolean `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
	SslEnforcement pulumi.StringOutput `pulumi:"sslEnforcement"`
	// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
	SslEnforcementEnabled pulumi.BoolPtrOutput `pulumi:"sslEnforcementEnabled"`
	// The mimimun TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLSEnforcementDisabled`.
	SslMinimalTlsVersionEnforced pulumi.StringPtrOutput `pulumi:"sslMinimalTlsVersionEnforced"`
	// Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).
	StorageMb pulumi.IntOutput `pulumi:"storageMb"`
	// Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.
	StorageProfile ServerStorageProfileOutput `pulumi:"storageProfile"`
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below.
	ThreatDetectionPolicy ServerThreatDetectionPolicyPtrOutput `pulumi:"threatDetectionPolicy"`
	// Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, and `11`. Changing this forces a new resource to be created.
	Version pulumi.StringOutput `pulumi:"version"`
}

Manages a PostgreSQL Server.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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
		}
		_, err = postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
			Location:                     exampleResourceGroup.Location,
			ResourceGroupName:            exampleResourceGroup.Name,
			AdministratorLogin:           pulumi.String("psqladminun"),
			AdministratorLoginPassword:   pulumi.String("H@Sh1CoR3!"),
			SkuName:                      pulumi.String("GP_Gen5_4"),
			Version:                      pulumi.String("9.6"),
			StorageMb:                    pulumi.Int(640000),
			BackupRetentionDays:          pulumi.Int(7),
			GeoRedundantBackupEnabled:    pulumi.Bool(true),
			AutoGrowEnabled:              pulumi.Bool(true),
			PublicNetworkAccessEnabled:   pulumi.Bool(false),
			SslEnforcementEnabled:        pulumi.Bool(true),
			SslMinimalTlsVersionEnforced: pulumi.String("TLS1_2"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetServer

func GetServer(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error)

GetServer gets an existing Server resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServer

func NewServer(ctx *pulumi.Context,
	name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error)

NewServer registers a new resource with the given unique name, arguments, and options.

type ServerArgs

type ServerArgs struct {
	// The Administrator Login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created.
	AdministratorLogin pulumi.StringPtrInput
	// The Password associated with the `administratorLogin` for the PostgreSQL Server. Required when `createMode` is `Default`.
	AdministratorLoginPassword pulumi.StringPtrInput
	// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
	AutoGrowEnabled pulumi.BoolPtrInput
	// Backup retention days for the server, supported values are between `7` and `35` days.
	BackupRetentionDays pulumi.IntPtrInput
	// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default.`
	CreateMode pulumi.StringPtrInput
	// For creation modes other then default the source server ID to use.
	CreationSourceServerId pulumi.StringPtrInput
	// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier.
	GeoRedundantBackupEnabled pulumi.BoolPtrInput
	// An `identity` block as defined below.
	Identity ServerIdentityPtrInput
	// Whether or not infrastructure is encrypted for this server. Defaults to `false`. Changing this forces a new resource to be created.
	InfrastructureEncryptionEnabled pulumi.BoolPtrInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Whether or not public network access is allowed for this server. Defaults to `true`.
	PublicNetworkAccessEnabled pulumi.BoolPtrInput
	// The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`.
	RestorePointInTime pulumi.StringPtrInput
	// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#sku).
	SkuName pulumi.StringInput
	// Deprecated: this has been renamed to the boolean `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
	SslEnforcement pulumi.StringPtrInput
	// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
	SslEnforcementEnabled pulumi.BoolPtrInput
	// The mimimun TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLSEnforcementDisabled`.
	SslMinimalTlsVersionEnforced pulumi.StringPtrInput
	// Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).
	StorageMb pulumi.IntPtrInput
	// Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.
	StorageProfile ServerStorageProfilePtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below.
	ThreatDetectionPolicy ServerThreatDetectionPolicyPtrInput
	// Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, and `11`. Changing this forces a new resource to be created.
	Version pulumi.StringInput
}

The set of arguments for constructing a Server resource.

func (ServerArgs) ElementType

func (ServerArgs) ElementType() reflect.Type

type ServerIdentity added in v3.16.0

type ServerIdentity struct {
	// The Client ID of the Service Principal assigned to this PostgreSQL Server.
	PrincipalId *string `pulumi:"principalId"`
	// The ID of the Tenant the Service Principal is assigned in.
	TenantId *string `pulumi:"tenantId"`
	// The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is `SystemAssigned`.
	Type string `pulumi:"type"`
}

type ServerIdentityArgs added in v3.16.0

type ServerIdentityArgs struct {
	// The Client ID of the Service Principal assigned to this PostgreSQL Server.
	PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
	// The ID of the Tenant the Service Principal is assigned in.
	TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
	// The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is `SystemAssigned`.
	Type pulumi.StringInput `pulumi:"type"`
}

func (ServerIdentityArgs) ElementType added in v3.16.0

func (ServerIdentityArgs) ElementType() reflect.Type

func (ServerIdentityArgs) ToServerIdentityOutput added in v3.16.0

func (i ServerIdentityArgs) ToServerIdentityOutput() ServerIdentityOutput

func (ServerIdentityArgs) ToServerIdentityOutputWithContext added in v3.16.0

func (i ServerIdentityArgs) ToServerIdentityOutputWithContext(ctx context.Context) ServerIdentityOutput

func (ServerIdentityArgs) ToServerIdentityPtrOutput added in v3.16.0

func (i ServerIdentityArgs) ToServerIdentityPtrOutput() ServerIdentityPtrOutput

func (ServerIdentityArgs) ToServerIdentityPtrOutputWithContext added in v3.16.0

func (i ServerIdentityArgs) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput

type ServerIdentityInput added in v3.16.0

type ServerIdentityInput interface {
	pulumi.Input

	ToServerIdentityOutput() ServerIdentityOutput
	ToServerIdentityOutputWithContext(context.Context) ServerIdentityOutput
}

ServerIdentityInput is an input type that accepts ServerIdentityArgs and ServerIdentityOutput values. You can construct a concrete instance of `ServerIdentityInput` via:

ServerIdentityArgs{...}

type ServerIdentityOutput added in v3.16.0

type ServerIdentityOutput struct{ *pulumi.OutputState }

func (ServerIdentityOutput) ElementType added in v3.16.0

func (ServerIdentityOutput) ElementType() reflect.Type

func (ServerIdentityOutput) PrincipalId added in v3.16.0

The Client ID of the Service Principal assigned to this PostgreSQL Server.

func (ServerIdentityOutput) TenantId added in v3.16.0

The ID of the Tenant the Service Principal is assigned in.

func (ServerIdentityOutput) ToServerIdentityOutput added in v3.16.0

func (o ServerIdentityOutput) ToServerIdentityOutput() ServerIdentityOutput

func (ServerIdentityOutput) ToServerIdentityOutputWithContext added in v3.16.0

func (o ServerIdentityOutput) ToServerIdentityOutputWithContext(ctx context.Context) ServerIdentityOutput

func (ServerIdentityOutput) ToServerIdentityPtrOutput added in v3.16.0

func (o ServerIdentityOutput) ToServerIdentityPtrOutput() ServerIdentityPtrOutput

func (ServerIdentityOutput) ToServerIdentityPtrOutputWithContext added in v3.16.0

func (o ServerIdentityOutput) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput

func (ServerIdentityOutput) Type added in v3.16.0

The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is `SystemAssigned`.

type ServerIdentityPtrInput added in v3.16.0

type ServerIdentityPtrInput interface {
	pulumi.Input

	ToServerIdentityPtrOutput() ServerIdentityPtrOutput
	ToServerIdentityPtrOutputWithContext(context.Context) ServerIdentityPtrOutput
}

ServerIdentityPtrInput is an input type that accepts ServerIdentityArgs, ServerIdentityPtr and ServerIdentityPtrOutput values. You can construct a concrete instance of `ServerIdentityPtrInput` via:

        ServerIdentityArgs{...}

or:

        nil

func ServerIdentityPtr added in v3.16.0

func ServerIdentityPtr(v *ServerIdentityArgs) ServerIdentityPtrInput

type ServerIdentityPtrOutput added in v3.16.0

type ServerIdentityPtrOutput struct{ *pulumi.OutputState }

func (ServerIdentityPtrOutput) Elem added in v3.16.0

func (ServerIdentityPtrOutput) ElementType added in v3.16.0

func (ServerIdentityPtrOutput) ElementType() reflect.Type

func (ServerIdentityPtrOutput) PrincipalId added in v3.16.0

The Client ID of the Service Principal assigned to this PostgreSQL Server.

func (ServerIdentityPtrOutput) TenantId added in v3.16.0

The ID of the Tenant the Service Principal is assigned in.

func (ServerIdentityPtrOutput) ToServerIdentityPtrOutput added in v3.16.0

func (o ServerIdentityPtrOutput) ToServerIdentityPtrOutput() ServerIdentityPtrOutput

func (ServerIdentityPtrOutput) ToServerIdentityPtrOutputWithContext added in v3.16.0

func (o ServerIdentityPtrOutput) ToServerIdentityPtrOutputWithContext(ctx context.Context) ServerIdentityPtrOutput

func (ServerIdentityPtrOutput) Type added in v3.16.0

The Type of Identity which should be used for this PostgreSQL Server. At this time the only possible value is `SystemAssigned`.

type ServerKey added in v3.23.0

type ServerKey struct {
	pulumi.CustomResourceState

	// The URL to a Key Vault Key.
	KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"`
	// The ID of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerId pulumi.StringOutput `pulumi:"serverId"`
}

Manages a Customer Managed Key for a PostgreSQL Server.

func GetServerKey added in v3.23.0

func GetServerKey(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ServerKeyState, opts ...pulumi.ResourceOption) (*ServerKey, error)

GetServerKey gets an existing ServerKey resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewServerKey added in v3.23.0

func NewServerKey(ctx *pulumi.Context,
	name string, args *ServerKeyArgs, opts ...pulumi.ResourceOption) (*ServerKey, error)

NewServerKey registers a new resource with the given unique name, arguments, and options.

type ServerKeyArgs added in v3.23.0

type ServerKeyArgs struct {
	// The URL to a Key Vault Key.
	KeyVaultKeyId pulumi.StringInput
	// The ID of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerId pulumi.StringInput
}

The set of arguments for constructing a ServerKey resource.

func (ServerKeyArgs) ElementType added in v3.23.0

func (ServerKeyArgs) ElementType() reflect.Type

type ServerKeyState added in v3.23.0

type ServerKeyState struct {
	// The URL to a Key Vault Key.
	KeyVaultKeyId pulumi.StringPtrInput
	// The ID of the PostgreSQL Server. Changing this forces a new resource to be created.
	ServerId pulumi.StringPtrInput
}

func (ServerKeyState) ElementType added in v3.23.0

func (ServerKeyState) ElementType() reflect.Type

type ServerState

type ServerState struct {
	// The Administrator Login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created.
	AdministratorLogin pulumi.StringPtrInput
	// The Password associated with the `administratorLogin` for the PostgreSQL Server. Required when `createMode` is `Default`.
	AdministratorLoginPassword pulumi.StringPtrInput
	// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`.
	AutoGrowEnabled pulumi.BoolPtrInput
	// Backup retention days for the server, supported values are between `7` and `35` days.
	BackupRetentionDays pulumi.IntPtrInput
	// The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default.`
	CreateMode pulumi.StringPtrInput
	// For creation modes other then default the source server ID to use.
	CreationSourceServerId pulumi.StringPtrInput
	// The FQDN of the PostgreSQL Server.
	Fqdn pulumi.StringPtrInput
	// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier.
	GeoRedundantBackupEnabled pulumi.BoolPtrInput
	// An `identity` block as defined below.
	Identity ServerIdentityPtrInput
	// Whether or not infrastructure is encrypted for this server. Defaults to `false`. Changing this forces a new resource to be created.
	InfrastructureEncryptionEnabled pulumi.BoolPtrInput
	// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
	Location pulumi.StringPtrInput
	// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Whether or not public network access is allowed for this server. Defaults to `true`.
	PublicNetworkAccessEnabled pulumi.BoolPtrInput
	// The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`.
	RestorePointInTime pulumi.StringPtrInput
	// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#sku).
	SkuName pulumi.StringPtrInput
	// Deprecated: this has been renamed to the boolean `ssl_enforcement_enabled` and will be removed in version 3.0 of the provider.
	SslEnforcement pulumi.StringPtrInput
	// Specifies if SSL should be enforced on connections. Possible values are `true` and `false`.
	SslEnforcementEnabled pulumi.BoolPtrInput
	// The mimimun TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLSEnforcementDisabled`.
	SslMinimalTlsVersionEnforced pulumi.StringPtrInput
	// Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).
	StorageMb pulumi.IntPtrInput
	// Deprecated: all storage_profile properties have been move to the top level. This block will be removed in version 3.0 of the provider.
	StorageProfile ServerStorageProfilePtrInput
	// A mapping of tags to assign to the resource.
	Tags pulumi.StringMapInput
	// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below.
	ThreatDetectionPolicy ServerThreatDetectionPolicyPtrInput
	// Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, and `11`. Changing this forces a new resource to be created.
	Version pulumi.StringPtrInput
}

func (ServerState) ElementType

func (ServerState) ElementType() reflect.Type

type ServerStorageProfile

type ServerStorageProfile struct {
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	AutoGrow *string `pulumi:"autoGrow"`
	// Backup retention days for the server, supported values are between `7` and `35` days.
	//
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	BackupRetentionDays *int `pulumi:"backupRetentionDays"`
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	GeoRedundantBackup *string `pulumi:"geoRedundantBackup"`
	// Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).
	//
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	StorageMb *int `pulumi:"storageMb"`
}

type ServerStorageProfileArgs

type ServerStorageProfileArgs struct {
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	AutoGrow pulumi.StringPtrInput `pulumi:"autoGrow"`
	// Backup retention days for the server, supported values are between `7` and `35` days.
	//
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	BackupRetentionDays pulumi.IntPtrInput `pulumi:"backupRetentionDays"`
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	GeoRedundantBackup pulumi.StringPtrInput `pulumi:"geoRedundantBackup"`
	// Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).
	//
	// Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.
	StorageMb pulumi.IntPtrInput `pulumi:"storageMb"`
}

func (ServerStorageProfileArgs) ElementType

func (ServerStorageProfileArgs) ElementType() reflect.Type

func (ServerStorageProfileArgs) ToServerStorageProfileOutput

func (i ServerStorageProfileArgs) ToServerStorageProfileOutput() ServerStorageProfileOutput

func (ServerStorageProfileArgs) ToServerStorageProfileOutputWithContext

func (i ServerStorageProfileArgs) ToServerStorageProfileOutputWithContext(ctx context.Context) ServerStorageProfileOutput

func (ServerStorageProfileArgs) ToServerStorageProfilePtrOutput

func (i ServerStorageProfileArgs) ToServerStorageProfilePtrOutput() ServerStorageProfilePtrOutput

func (ServerStorageProfileArgs) ToServerStorageProfilePtrOutputWithContext

func (i ServerStorageProfileArgs) ToServerStorageProfilePtrOutputWithContext(ctx context.Context) ServerStorageProfilePtrOutput

type ServerStorageProfileInput

type ServerStorageProfileInput interface {
	pulumi.Input

	ToServerStorageProfileOutput() ServerStorageProfileOutput
	ToServerStorageProfileOutputWithContext(context.Context) ServerStorageProfileOutput
}

ServerStorageProfileInput is an input type that accepts ServerStorageProfileArgs and ServerStorageProfileOutput values. You can construct a concrete instance of `ServerStorageProfileInput` via:

ServerStorageProfileArgs{...}

type ServerStorageProfileOutput

type ServerStorageProfileOutput struct{ *pulumi.OutputState }

func (ServerStorageProfileOutput) AutoGrow deprecated

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfileOutput) BackupRetentionDays deprecated

func (o ServerStorageProfileOutput) BackupRetentionDays() pulumi.IntPtrOutput

Backup retention days for the server, supported values are between `7` and `35` days.

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfileOutput) ElementType

func (ServerStorageProfileOutput) ElementType() reflect.Type

func (ServerStorageProfileOutput) GeoRedundantBackup deprecated

func (o ServerStorageProfileOutput) GeoRedundantBackup() pulumi.StringPtrOutput

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfileOutput) StorageMb deprecated

Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfileOutput) ToServerStorageProfileOutput

func (o ServerStorageProfileOutput) ToServerStorageProfileOutput() ServerStorageProfileOutput

func (ServerStorageProfileOutput) ToServerStorageProfileOutputWithContext

func (o ServerStorageProfileOutput) ToServerStorageProfileOutputWithContext(ctx context.Context) ServerStorageProfileOutput

func (ServerStorageProfileOutput) ToServerStorageProfilePtrOutput

func (o ServerStorageProfileOutput) ToServerStorageProfilePtrOutput() ServerStorageProfilePtrOutput

func (ServerStorageProfileOutput) ToServerStorageProfilePtrOutputWithContext

func (o ServerStorageProfileOutput) ToServerStorageProfilePtrOutputWithContext(ctx context.Context) ServerStorageProfilePtrOutput

type ServerStorageProfilePtrInput

type ServerStorageProfilePtrInput interface {
	pulumi.Input

	ToServerStorageProfilePtrOutput() ServerStorageProfilePtrOutput
	ToServerStorageProfilePtrOutputWithContext(context.Context) ServerStorageProfilePtrOutput
}

ServerStorageProfilePtrInput is an input type that accepts ServerStorageProfileArgs, ServerStorageProfilePtr and ServerStorageProfilePtrOutput values. You can construct a concrete instance of `ServerStorageProfilePtrInput` via:

        ServerStorageProfileArgs{...}

or:

        nil

type ServerStorageProfilePtrOutput

type ServerStorageProfilePtrOutput struct{ *pulumi.OutputState }

func (ServerStorageProfilePtrOutput) AutoGrow deprecated

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfilePtrOutput) BackupRetentionDays deprecated

func (o ServerStorageProfilePtrOutput) BackupRetentionDays() pulumi.IntPtrOutput

Backup retention days for the server, supported values are between `7` and `35` days.

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfilePtrOutput) Elem

func (ServerStorageProfilePtrOutput) ElementType

func (ServerStorageProfilePtrOutput) GeoRedundantBackup deprecated

func (o ServerStorageProfilePtrOutput) GeoRedundantBackup() pulumi.StringPtrOutput

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfilePtrOutput) StorageMb deprecated

Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/en-us/rest/api/postgresql/servers/create#StorageProfile).

Deprecated: this has been moved to the top level and will be removed in version 3.0 of the provider.

func (ServerStorageProfilePtrOutput) ToServerStorageProfilePtrOutput

func (o ServerStorageProfilePtrOutput) ToServerStorageProfilePtrOutput() ServerStorageProfilePtrOutput

func (ServerStorageProfilePtrOutput) ToServerStorageProfilePtrOutputWithContext

func (o ServerStorageProfilePtrOutput) ToServerStorageProfilePtrOutputWithContext(ctx context.Context) ServerStorageProfilePtrOutput

type ServerThreatDetectionPolicy added in v3.6.0

type ServerThreatDetectionPolicy struct {
	// Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`.
	DisabledAlerts []string `pulumi:"disabledAlerts"`
	// Should the account administrators be emailed when this alert is triggered?
	EmailAccountAdmins *bool `pulumi:"emailAccountAdmins"`
	// A list of email addresses which alerts should be sent to.
	EmailAddresses []string `pulumi:"emailAddresses"`
	// Is the policy enabled?
	Enabled *bool `pulumi:"enabled"`
	// Specifies the number of days to keep in the Threat Detection audit logs.
	RetentionDays *int `pulumi:"retentionDays"`
	// Specifies the identifier key of the Threat Detection audit storage account.
	StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"`
	// Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
	StorageEndpoint *string `pulumi:"storageEndpoint"`
}

type ServerThreatDetectionPolicyArgs added in v3.6.0

type ServerThreatDetectionPolicyArgs struct {
	// Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`.
	DisabledAlerts pulumi.StringArrayInput `pulumi:"disabledAlerts"`
	// Should the account administrators be emailed when this alert is triggered?
	EmailAccountAdmins pulumi.BoolPtrInput `pulumi:"emailAccountAdmins"`
	// A list of email addresses which alerts should be sent to.
	EmailAddresses pulumi.StringArrayInput `pulumi:"emailAddresses"`
	// Is the policy enabled?
	Enabled pulumi.BoolPtrInput `pulumi:"enabled"`
	// Specifies the number of days to keep in the Threat Detection audit logs.
	RetentionDays pulumi.IntPtrInput `pulumi:"retentionDays"`
	// Specifies the identifier key of the Threat Detection audit storage account.
	StorageAccountAccessKey pulumi.StringPtrInput `pulumi:"storageAccountAccessKey"`
	// Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
	StorageEndpoint pulumi.StringPtrInput `pulumi:"storageEndpoint"`
}

func (ServerThreatDetectionPolicyArgs) ElementType added in v3.6.0

func (ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyOutput added in v3.6.0

func (i ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyOutput() ServerThreatDetectionPolicyOutput

func (ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyOutputWithContext added in v3.6.0

func (i ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyOutputWithContext(ctx context.Context) ServerThreatDetectionPolicyOutput

func (ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyPtrOutput added in v3.6.0

func (i ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyPtrOutput() ServerThreatDetectionPolicyPtrOutput

func (ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyPtrOutputWithContext added in v3.6.0

func (i ServerThreatDetectionPolicyArgs) ToServerThreatDetectionPolicyPtrOutputWithContext(ctx context.Context) ServerThreatDetectionPolicyPtrOutput

type ServerThreatDetectionPolicyInput added in v3.6.0

type ServerThreatDetectionPolicyInput interface {
	pulumi.Input

	ToServerThreatDetectionPolicyOutput() ServerThreatDetectionPolicyOutput
	ToServerThreatDetectionPolicyOutputWithContext(context.Context) ServerThreatDetectionPolicyOutput
}

ServerThreatDetectionPolicyInput is an input type that accepts ServerThreatDetectionPolicyArgs and ServerThreatDetectionPolicyOutput values. You can construct a concrete instance of `ServerThreatDetectionPolicyInput` via:

ServerThreatDetectionPolicyArgs{...}

type ServerThreatDetectionPolicyOutput added in v3.6.0

type ServerThreatDetectionPolicyOutput struct{ *pulumi.OutputState }

func (ServerThreatDetectionPolicyOutput) DisabledAlerts added in v3.6.0

Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`.

func (ServerThreatDetectionPolicyOutput) ElementType added in v3.6.0

func (ServerThreatDetectionPolicyOutput) EmailAccountAdmins added in v3.6.0

Should the account administrators be emailed when this alert is triggered?

func (ServerThreatDetectionPolicyOutput) EmailAddresses added in v3.6.0

A list of email addresses which alerts should be sent to.

func (ServerThreatDetectionPolicyOutput) Enabled added in v3.6.0

Is the policy enabled?

func (ServerThreatDetectionPolicyOutput) RetentionDays added in v3.6.0

Specifies the number of days to keep in the Threat Detection audit logs.

func (ServerThreatDetectionPolicyOutput) StorageAccountAccessKey added in v3.6.0

func (o ServerThreatDetectionPolicyOutput) StorageAccountAccessKey() pulumi.StringPtrOutput

Specifies the identifier key of the Threat Detection audit storage account.

func (ServerThreatDetectionPolicyOutput) StorageEndpoint added in v3.6.0

Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

func (ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyOutput added in v3.6.0

func (o ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyOutput() ServerThreatDetectionPolicyOutput

func (ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyOutputWithContext added in v3.6.0

func (o ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyOutputWithContext(ctx context.Context) ServerThreatDetectionPolicyOutput

func (ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyPtrOutput added in v3.6.0

func (o ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyPtrOutput() ServerThreatDetectionPolicyPtrOutput

func (ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyPtrOutputWithContext added in v3.6.0

func (o ServerThreatDetectionPolicyOutput) ToServerThreatDetectionPolicyPtrOutputWithContext(ctx context.Context) ServerThreatDetectionPolicyPtrOutput

type ServerThreatDetectionPolicyPtrInput added in v3.6.0

type ServerThreatDetectionPolicyPtrInput interface {
	pulumi.Input

	ToServerThreatDetectionPolicyPtrOutput() ServerThreatDetectionPolicyPtrOutput
	ToServerThreatDetectionPolicyPtrOutputWithContext(context.Context) ServerThreatDetectionPolicyPtrOutput
}

ServerThreatDetectionPolicyPtrInput is an input type that accepts ServerThreatDetectionPolicyArgs, ServerThreatDetectionPolicyPtr and ServerThreatDetectionPolicyPtrOutput values. You can construct a concrete instance of `ServerThreatDetectionPolicyPtrInput` via:

        ServerThreatDetectionPolicyArgs{...}

or:

        nil

func ServerThreatDetectionPolicyPtr added in v3.6.0

type ServerThreatDetectionPolicyPtrOutput added in v3.6.0

type ServerThreatDetectionPolicyPtrOutput struct{ *pulumi.OutputState }

func (ServerThreatDetectionPolicyPtrOutput) DisabledAlerts added in v3.6.0

Specifies a list of alerts which should be disabled. Possible values include `Access_Anomaly`, `Sql_Injection` and `Sql_Injection_Vulnerability`.

func (ServerThreatDetectionPolicyPtrOutput) Elem added in v3.6.0

func (ServerThreatDetectionPolicyPtrOutput) ElementType added in v3.6.0

func (ServerThreatDetectionPolicyPtrOutput) EmailAccountAdmins added in v3.6.0

Should the account administrators be emailed when this alert is triggered?

func (ServerThreatDetectionPolicyPtrOutput) EmailAddresses added in v3.6.0

A list of email addresses which alerts should be sent to.

func (ServerThreatDetectionPolicyPtrOutput) Enabled added in v3.6.0

Is the policy enabled?

func (ServerThreatDetectionPolicyPtrOutput) RetentionDays added in v3.6.0

Specifies the number of days to keep in the Threat Detection audit logs.

func (ServerThreatDetectionPolicyPtrOutput) StorageAccountAccessKey added in v3.6.0

func (o ServerThreatDetectionPolicyPtrOutput) StorageAccountAccessKey() pulumi.StringPtrOutput

Specifies the identifier key of the Threat Detection audit storage account.

func (ServerThreatDetectionPolicyPtrOutput) StorageEndpoint added in v3.6.0

Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

func (ServerThreatDetectionPolicyPtrOutput) ToServerThreatDetectionPolicyPtrOutput added in v3.6.0

func (o ServerThreatDetectionPolicyPtrOutput) ToServerThreatDetectionPolicyPtrOutput() ServerThreatDetectionPolicyPtrOutput

func (ServerThreatDetectionPolicyPtrOutput) ToServerThreatDetectionPolicyPtrOutputWithContext added in v3.6.0

func (o ServerThreatDetectionPolicyPtrOutput) ToServerThreatDetectionPolicyPtrOutputWithContext(ctx context.Context) ServerThreatDetectionPolicyPtrOutput

type VirtualNetworkRule

type VirtualNetworkRule struct {
	pulumi.CustomResourceState

	// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to `false`.
	IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrOutput `pulumi:"ignoreMissingVnetServiceEndpoint"`
	// The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
	// The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.
	ServerName pulumi.StringOutput `pulumi:"serverName"`
	// The ID of the subnet that the PostgreSQL server will be connected to.
	SubnetId pulumi.StringOutput `pulumi:"subnetId"`
}

Manages a PostgreSQL Virtual Network Rule.

> **NOTE:** PostgreSQL Virtual Network Rules [can only be used with SKU Tiers of `GeneralPurpose` or `MemoryOptimized`](https://docs.microsoft.com/en-us/azure/postgresql/concepts-data-access-and-security-vnet)

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/postgresql"
"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 US"),
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.7.29.0/29"),
			},
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.7.29.0/29"),
			},
			ServiceEndpoints: pulumi.StringArray{
				pulumi.String("Microsoft.Sql"),
			},
		})
		if err != nil {
			return err
		}
		exampleServer, err := postgresql.NewServer(ctx, "exampleServer", &postgresql.ServerArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("GP_Gen5_2"),
			StorageProfile: &postgresql.ServerStorageProfileArgs{
				StorageMb:           pulumi.Int(5120),
				BackupRetentionDays: pulumi.Int(7),
				GeoRedundantBackup:  pulumi.String("Disabled"),
			},
			AdministratorLogin:         pulumi.String("psqladminun"),
			AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
			Version:                    pulumi.String("9.5"),
			SslEnforcement:             pulumi.String("Enabled"),
		})
		if err != nil {
			return err
		}
		_, err = postgresql.NewVirtualNetworkRule(ctx, "exampleVirtualNetworkRule", &postgresql.VirtualNetworkRuleArgs{
			ResourceGroupName:                exampleResourceGroup.Name,
			ServerName:                       exampleServer.Name,
			SubnetId:                         internal.ID(),
			IgnoreMissingVnetServiceEndpoint: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetVirtualNetworkRule

func GetVirtualNetworkRule(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *VirtualNetworkRuleState, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error)

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).

func NewVirtualNetworkRule

func NewVirtualNetworkRule(ctx *pulumi.Context,
	name string, args *VirtualNetworkRuleArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error)

NewVirtualNetworkRule registers a new resource with the given unique name, arguments, and options.

type VirtualNetworkRuleArgs

type VirtualNetworkRuleArgs struct {
	// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to `false`.
	IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput
	// The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringInput
	// The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.
	ServerName pulumi.StringInput
	// The ID of the subnet that the PostgreSQL server will be connected to.
	SubnetId pulumi.StringInput
}

The set of arguments for constructing a VirtualNetworkRule resource.

func (VirtualNetworkRuleArgs) ElementType

func (VirtualNetworkRuleArgs) ElementType() reflect.Type

type VirtualNetworkRuleState

type VirtualNetworkRuleState struct {
	// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? Defaults to `false`.
	IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput
	// The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created.
	ResourceGroupName pulumi.StringPtrInput
	// The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created.
	ServerName pulumi.StringPtrInput
	// The ID of the subnet that the PostgreSQL server will be connected to.
	SubnetId pulumi.StringPtrInput
}

func (VirtualNetworkRuleState) ElementType

func (VirtualNetworkRuleState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL