We recommend using Azure Native.
azure.mysql.Configuration
Explore with Pulumi AI
Sets a MySQL Configuration value on a MySQL 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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleServer = new Azure.MySql.Server("exampleServer", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
AdministratorLogin = "mysqladminun",
AdministratorLoginPassword = "H@Sh1CoR3!",
SkuName = "B_Gen5_2",
StorageMb = 5120,
Version = "5.7",
AutoGrowEnabled = true,
BackupRetentionDays = 7,
GeoRedundantBackupEnabled = true,
InfrastructureEncryptionEnabled = true,
PublicNetworkAccessEnabled = false,
SslEnforcementEnabled = true,
SslMinimalTlsVersionEnforced = "TLS1_2",
});
var exampleConfiguration = new Azure.MySql.Configuration("exampleConfiguration", new()
{
Name = "interactive_timeout",
ResourceGroupName = exampleResourceGroup.Name,
ServerName = exampleServer.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 {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleServer, err := mysql.NewServer(ctx, "exampleServer", &mysql.ServerArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
AdministratorLogin: pulumi.String("mysqladminun"),
AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"),
SkuName: pulumi.String("B_Gen5_2"),
StorageMb: pulumi.Int(5120),
Version: pulumi.String("5.7"),
AutoGrowEnabled: pulumi.Bool(true),
BackupRetentionDays: pulumi.Int(7),
GeoRedundantBackupEnabled: pulumi.Bool(true),
InfrastructureEncryptionEnabled: pulumi.Bool(true),
PublicNetworkAccessEnabled: pulumi.Bool(false),
SslEnforcementEnabled: pulumi.Bool(true),
SslMinimalTlsVersionEnforced: pulumi.String("TLS1_2"),
})
if err != nil {
return err
}
_, err = mysql.NewConfiguration(ctx, "exampleConfiguration", &mysql.ConfigurationArgs{
Name: pulumi.String("interactive_timeout"),
ResourceGroupName: exampleResourceGroup.Name,
ServerName: exampleServer.Name,
Value: pulumi.String("600"),
})
if err != nil {
return err
}
return nil
})
}
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.Server;
import com.pulumi.azure.mysql.ServerArgs;
import com.pulumi.azure.mysql.Configuration;
import com.pulumi.azure.mysql.ConfigurationArgs;
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 exampleServer = new Server("exampleServer", ServerArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.administratorLogin("mysqladminun")
.administratorLoginPassword("H@Sh1CoR3!")
.skuName("B_Gen5_2")
.storageMb(5120)
.version("5.7")
.autoGrowEnabled(true)
.backupRetentionDays(7)
.geoRedundantBackupEnabled(true)
.infrastructureEncryptionEnabled(true)
.publicNetworkAccessEnabled(false)
.sslEnforcementEnabled(true)
.sslMinimalTlsVersionEnforced("TLS1_2")
.build());
var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
.name("interactive_timeout")
.resourceGroupName(exampleResourceGroup.name())
.serverName(exampleServer.name())
.value("600")
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_server = azure.mysql.Server("exampleServer",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
administrator_login="mysqladminun",
administrator_login_password="H@Sh1CoR3!",
sku_name="B_Gen5_2",
storage_mb=5120,
version="5.7",
auto_grow_enabled=True,
backup_retention_days=7,
geo_redundant_backup_enabled=True,
infrastructure_encryption_enabled=True,
public_network_access_enabled=False,
ssl_enforcement_enabled=True,
ssl_minimal_tls_version_enforced="TLS1_2")
example_configuration = azure.mysql.Configuration("exampleConfiguration",
name="interactive_timeout",
resource_group_name=example_resource_group.name,
server_name=example_server.name,
value="600")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleServer = new azure.mysql.Server("exampleServer", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
administratorLogin: "mysqladminun",
administratorLoginPassword: "H@Sh1CoR3!",
skuName: "B_Gen5_2",
storageMb: 5120,
version: "5.7",
autoGrowEnabled: true,
backupRetentionDays: 7,
geoRedundantBackupEnabled: true,
infrastructureEncryptionEnabled: true,
publicNetworkAccessEnabled: false,
sslEnforcementEnabled: true,
sslMinimalTlsVersionEnforced: "TLS1_2",
});
const exampleConfiguration = new azure.mysql.Configuration("exampleConfiguration", {
name: "interactive_timeout",
resourceGroupName: exampleResourceGroup.name,
serverName: exampleServer.name,
value: "600",
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleServer:
type: azure:mysql:Server
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
administratorLogin: mysqladminun
administratorLoginPassword: H@Sh1CoR3!
skuName: B_Gen5_2
storageMb: 5120
version: '5.7'
autoGrowEnabled: true
backupRetentionDays: 7
geoRedundantBackupEnabled: true
infrastructureEncryptionEnabled: true
publicNetworkAccessEnabled: false
sslEnforcementEnabled: true
sslMinimalTlsVersionEnforced: TLS1_2
exampleConfiguration:
type: azure:mysql:Configuration
properties:
name: interactive_timeout
resourceGroupName: ${exampleResourceGroup.name}
serverName: ${exampleServer.name}
value: '600'
Create Configuration Resource
new Configuration(name: string, args: ConfigurationArgs, opts?: CustomResourceOptions);
@overload
def Configuration(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
value: Optional[str] = None)
@overload
def Configuration(resource_name: str,
args: ConfigurationArgs,
opts: Optional[ResourceOptions] = None)
func NewConfiguration(ctx *Context, name string, args ConfigurationArgs, opts ...ResourceOption) (*Configuration, error)
public Configuration(string name, ConfigurationArgs args, CustomResourceOptions? opts = null)
public Configuration(String name, ConfigurationArgs args)
public Configuration(String name, ConfigurationArgs args, CustomResourceOptions options)
type: azure:mysql:Configuration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigurationArgs
- 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 ConfigurationArgs
- 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 ConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConfigurationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Configuration 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 Configuration resource accepts the following input properties:
- Name string
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- Server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- Value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- Name string
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- Server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- Value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name String
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name String Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value String
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name string
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name str
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server_
name str Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value str
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name String
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name String Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value String
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Configuration 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 Configuration Resource
Get an existing Configuration 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?: ConfigurationState, opts?: CustomResourceOptions): Configuration
@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) -> Configuration
func GetConfiguration(ctx *Context, name string, id IDInput, state *ConfigurationState, opts ...ResourceOption) (*Configuration, error)
public static Configuration Get(string name, Input<string> id, ConfigurationState? state, CustomResourceOptions? opts = null)
public static Configuration get(String name, Output<String> id, ConfigurationState 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 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 Server exists. Changing this forces a new resource to be created.
- Server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- Value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- Name string
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- Server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- Value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name String
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name String Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value String
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name string
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name string Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value string
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name str
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server_
name str Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value str
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
- name String
Specifies the name of the MySQL 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 Server exists. Changing this forces a new resource to be created.
- server
Name String Specifies the name of the MySQL Server. Changing this forces a new resource to be created.
- value String
Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.
Import
MySQL Configurations can be imported using the resource id
, e.g.
$ pulumi import azure:mysql/configuration:Configuration interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1/configurations/interactive_timeout
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.