Skip to content

azurermMysqlFlexibleServerConfiguration

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

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-resources",
  }
);
const azurermMysqlFlexibleServerExample =
  new azurerm.mysqlFlexibleServer.MysqlFlexibleServer(this, "example_2", {
    administrator_login: "adminTerraform",
    administrator_password: "H@Sh1CoR3!",
    location: azurermResourceGroupExample.location,
    name: "example-fs",
    resource_group_name: azurermResourceGroupExample.name,
    sku_name: "GP_Standard_D2ds_v4",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMysqlFlexibleServerExample.overrideLogicalId("example");
const azurermMysqlFlexibleServerConfigurationExample =
  new azurerm.mysqlFlexibleServerConfiguration.MysqlFlexibleServerConfiguration(
    this,
    "example_3",
    {
      name: "interactive_timeout",
      resource_group_name: azurermResourceGroupExample.name,
      server_name: azurermMysqlFlexibleServerExample.name,
      value: "600",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermMysqlFlexibleServerConfigurationExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) 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.

  • serverName - (Required) Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created.

  • value - (Required) Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created.

Attributes Reference

The following attributes are exported:

  • id - The ID of the MySQL Flexible Server Configuration.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the MySQL Flexible Server Configuration.
  • update - (Defaults to 30 minutes) Used when updating the MySQL Flexible Server Configuration.
  • read - (Defaults to 5 minutes) Used when retrieving the MySQL Flexible Server Configuration.
  • delete - (Defaults to 30 minutes) Used when deleting the MySQL Flexible Server Configuration.

Import

MySQL Flexible Server Configurations can be imported using the resourceId, e.g.

terraform import azurerm_mysql_flexible_server_configuration.interactive_timeout /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforMySQL/flexibleServers/flexibleServer1/configurations/interactive_timeout