Flexible Server Args
data class FlexibleServerArgs(val administratorLogin: Output<String>? = null, val administratorPassword: Output<String>? = null, val authentication: Output<FlexibleServerAuthenticationArgs>? = null, val autoGrowEnabled: Output<Boolean>? = null, val backupRetentionDays: Output<Int>? = null, val createMode: Output<String>? = null, val customerManagedKey: Output<FlexibleServerCustomerManagedKeyArgs>? = null, val delegatedSubnetId: Output<String>? = null, val geoRedundantBackupEnabled: Output<Boolean>? = null, val highAvailability: Output<FlexibleServerHighAvailabilityArgs>? = null, val identity: Output<FlexibleServerIdentityArgs>? = null, val location: Output<String>? = null, val maintenanceWindow: Output<FlexibleServerMaintenanceWindowArgs>? = null, val name: Output<String>? = null, val pointInTimeRestoreTimeInUtc: Output<String>? = null, val privateDnsZoneId: Output<String>? = null, val replicationRole: Output<String>? = null, val resourceGroupName: Output<String>? = null, val skuName: Output<String>? = null, val sourceServerId: Output<String>? = null, val storageMb: Output<Int>? = null, val tags: Output<Map<String, String>>? = null, val version: Output<String>? = null, val zone: Output<String>? = null) : ConvertibleToJava<FlexibleServerArgs>
Manages a PostgreSQL Flexible Server.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
import com.pulumi.azure.privatedns.Zone;
import com.pulumi.azure.privatedns.ZoneArgs;
import com.pulumi.azure.privatedns.ZoneVirtualNetworkLink;
import com.pulumi.azure.privatedns.ZoneVirtualNetworkLinkArgs;
import com.pulumi.azure.postgresql.FlexibleServer;
import com.pulumi.azure.postgresql.FlexibleServerArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.serviceEndpoints("Microsoft.Storage")
.delegations(SubnetDelegationArgs.builder()
.name("fs")
.serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
.name("Microsoft.DBforPostgreSQL/flexibleServers")
.actions("Microsoft.Network/virtualNetworks/subnets/join/action")
.build())
.build())
.build());
var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleZoneVirtualNetworkLink = new ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", ZoneVirtualNetworkLinkArgs.builder()
.privateDnsZoneName(exampleZone.name())
.virtualNetworkId(exampleVirtualNetwork.id())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12")
.delegatedSubnetId(exampleSubnet.id())
.privateDnsZoneId(exampleZone.id())
.administratorLogin("psqladmin")
.administratorPassword("H@Sh1CoR3!")
.zone("1")
.storageMb(32768)
.skuName("GP_Standard_D4s_v3")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleZoneVirtualNetworkLink)
.build());
}
}
Content copied to clipboard
Import
PostgreSQL Flexible Servers can be imported using the resource id
, e.g.
$ pulumi import azure:postgresql/flexibleServer:FlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/flexibleServers/server1
Content copied to clipboard
Constructors
Link copied to clipboard
fun FlexibleServerArgs(administratorLogin: Output<String>? = null, administratorPassword: Output<String>? = null, authentication: Output<FlexibleServerAuthenticationArgs>? = null, autoGrowEnabled: Output<Boolean>? = null, backupRetentionDays: Output<Int>? = null, createMode: Output<String>? = null, customerManagedKey: Output<FlexibleServerCustomerManagedKeyArgs>? = null, delegatedSubnetId: Output<String>? = null, geoRedundantBackupEnabled: Output<Boolean>? = null, highAvailability: Output<FlexibleServerHighAvailabilityArgs>? = null, identity: Output<FlexibleServerIdentityArgs>? = null, location: Output<String>? = null, maintenanceWindow: Output<FlexibleServerMaintenanceWindowArgs>? = null, name: Output<String>? = null, pointInTimeRestoreTimeInUtc: Output<String>? = null, privateDnsZoneId: Output<String>? = null, replicationRole: Output<String>? = null, resourceGroupName: Output<String>? = null, skuName: Output<String>? = null, sourceServerId: Output<String>? = null, storageMb: Output<Int>? = null, tags: Output<Map<String, String>>? = null, version: Output<String>? = null, zone: Output<String>? = null)
Functions
Properties
Link copied to clipboard
The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created.
Link copied to clipboard