We recommend using Azure Native.
azure.mysql.FlexibleServerConfiguration
Explore with Pulumi AI
Sets a MySQL Flexible Server Configuration value on a MySQL Flexible 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
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleFlexibleServer = new azure.mysql.FlexibleServer("example", {
name: "example-fs",
resourceGroupName: example.name,
location: example.location,
administratorLogin: "adminTerraform",
administratorPassword: "H@Sh1CoR3!",
skuName: "GP_Standard_D2ds_v4",
});
const exampleFlexibleServerConfiguration = new azure.mysql.FlexibleServerConfiguration("example", {
name: "interactive_timeout",
resourceGroupName: example.name,
serverName: exampleFlexibleServer.name,
value: "600",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_flexible_server = azure.mysql.FlexibleServer("example",
name="example-fs",
resource_group_name=example.name,
location=example.location,
administrator_login="adminTerraform",
administrator_password="H@Sh1CoR3!",
sku_name="GP_Standard_D2ds_v4")
example_flexible_server_configuration = azure.mysql.FlexibleServerConfiguration("example",
name="interactive_timeout",
resource_group_name=example.name,
server_name=example_flexible_server.name,
value="600")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mysql"
"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{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleFlexibleServer, err := mysql.NewFlexibleServer(ctx, "example", &mysql.FlexibleServerArgs{
Name: pulumi.String("example-fs"),
ResourceGroupName: example.Name,
Location: example.Location,
AdministratorLogin: pulumi.String("adminTerraform"),
AdministratorPassword: pulumi.String("H@Sh1CoR3!"),
SkuName: pulumi.String("GP_Standard_D2ds_v4"),
})
if err != nil {
return err
}
_, err = mysql.NewFlexibleServerConfiguration(ctx, "example", &mysql.FlexibleServerConfigurationArgs{
Name: pulumi.String("interactive_timeout"),
ResourceGroupName: example.Name,
ServerName: exampleFlexibleServer.Name,
Value: pulumi.String("600"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleFlexibleServer = new Azure.MySql.FlexibleServer("example", new()
{
Name = "example-fs",
ResourceGroupName = example.Name,
Location = example.Location,
AdministratorLogin = "adminTerraform",
AdministratorPassword = "H@Sh1CoR3!",
SkuName = "GP_Standard_D2ds_v4",
});
var exampleFlexibleServerConfiguration = new Azure.MySql.FlexibleServerConfiguration("example", new()
{
Name = "interactive_timeout",
ResourceGroupName = example.Name,
ServerName = exampleFlexibleServer.Name,
Value = "600",
});
});
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.mysql.FlexibleServer;
import com.pulumi.azure.mysql.FlexibleServerArgs;
import com.pulumi.azure.mysql.FlexibleServerConfiguration;
import com.pulumi.azure.mysql.FlexibleServerConfigurationArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleFlexibleServer = new FlexibleServer("exampleFlexibleServer", FlexibleServerArgs.builder()
.name("example-fs")
.resourceGroupName(example.name())
.location(example.location())
.administratorLogin("adminTerraform")
.administratorPassword("H@Sh1CoR3!")
.skuName("GP_Standard_D2ds_v4")
.build());
var exampleFlexibleServerConfiguration = new FlexibleServerConfiguration("exampleFlexibleServerConfiguration", FlexibleServerConfigurationArgs.builder()
.name("interactive_timeout")
.resourceGroupName(example.name())
.serverName(exampleFlexibleServer.name())
.value("600")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleFlexibleServer:
type: azure:mysql:FlexibleServer
name: example
properties:
name: example-fs
resourceGroupName: ${example.name}
location: ${example.location}
administratorLogin: adminTerraform
administratorPassword: H@Sh1CoR3!
skuName: GP_Standard_D2ds_v4
exampleFlexibleServerConfiguration:
type: azure:mysql:FlexibleServerConfiguration
name: example
properties:
name: interactive_timeout
resourceGroupName: ${example.name}
serverName: ${exampleFlexibleServer.name}
value: '600'
Create FlexibleServerConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FlexibleServerConfiguration(name: string, args: FlexibleServerConfigurationArgs, opts?: CustomResourceOptions);
@overload
def FlexibleServerConfiguration(resource_name: str,
args: FlexibleServerConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FlexibleServerConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
value: Optional[str] = None,
name: Optional[str] = None)
func NewFlexibleServerConfiguration(ctx *Context, name string, args FlexibleServerConfigurationArgs, opts ...ResourceOption) (*FlexibleServerConfiguration, error)
public FlexibleServerConfiguration(string name, FlexibleServerConfigurationArgs args, CustomResourceOptions? opts = null)
public FlexibleServerConfiguration(String name, FlexibleServerConfigurationArgs args)
public FlexibleServerConfiguration(String name, FlexibleServerConfigurationArgs args, CustomResourceOptions options)
type: azure:mysql:FlexibleServerConfiguration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args FlexibleServerConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args FlexibleServerConfigurationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args FlexibleServerConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FlexibleServerConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FlexibleServerConfigurationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var flexibleServerConfigurationResource = new Azure.MySql.FlexibleServerConfiguration("flexibleServerConfigurationResource", new()
{
ResourceGroupName = "string",
ServerName = "string",
Value = "string",
Name = "string",
});
example, err := mysql.NewFlexibleServerConfiguration(ctx, "flexibleServerConfigurationResource", &mysql.FlexibleServerConfigurationArgs{
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
Value: pulumi.String("string"),
Name: pulumi.String("string"),
})
var flexibleServerConfigurationResource = new FlexibleServerConfiguration("flexibleServerConfigurationResource", FlexibleServerConfigurationArgs.builder()
.resourceGroupName("string")
.serverName("string")
.value("string")
.name("string")
.build());
flexible_server_configuration_resource = azure.mysql.FlexibleServerConfiguration("flexibleServerConfigurationResource",
resource_group_name="string",
server_name="string",
value="string",
name="string")
const flexibleServerConfigurationResource = new azure.mysql.FlexibleServerConfiguration("flexibleServerConfigurationResource", {
resourceGroupName: "string",
serverName: "string",
value: "string",
name: "string",
});
type: azure:mysql:FlexibleServerConfiguration
properties:
name: string
resourceGroupName: string
serverName: string
value: string
FlexibleServerConfiguration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The FlexibleServerConfiguration resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- Value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- Name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- Value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- Name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value String
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name String
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server_
name str - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value str
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name str
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value String
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name String
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the FlexibleServerConfiguration resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FlexibleServerConfiguration Resource
Get an existing FlexibleServerConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: FlexibleServerConfigurationState, opts?: CustomResourceOptions): FlexibleServerConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
value: Optional[str] = None) -> FlexibleServerConfiguration
func GetFlexibleServerConfiguration(ctx *Context, name string, id IDInput, state *FlexibleServerConfigurationState, opts ...ResourceOption) (*FlexibleServerConfiguration, error)
public static FlexibleServerConfiguration Get(string name, Input<string> id, FlexibleServerConfigurationState? state, CustomResourceOptions? opts = null)
public static FlexibleServerConfiguration get(String name, Output<String> id, FlexibleServerConfigurationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- Value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- Name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- Server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- Value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name String
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value String
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name string
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name string - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value string
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name str
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server_
name str - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value str
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
- name String
- Specifies the name of the MySQL Flexible Server Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.
- server
Name String - Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.
- value String
- Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values.
Import
MySQL Flexible Server Configurations can be imported using the resource id
, e.g.
$ pulumi import azure:mysql/flexibleServerConfiguration:FlexibleServerConfiguration interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1/configurations/interactive_timeout
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.