SpringCloudAppMysqlAssociationArgs

data class SpringCloudAppMysqlAssociationArgs(val databaseName: Output<String>? = null, val mysqlServerId: Output<String>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val springCloudAppId: Output<String>? = null, val username: Output<String>? = null) : ConvertibleToJava<SpringCloudAppMysqlAssociationArgs>

Associates a Spring Cloud Application with a MySQL Database.

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.appplatform.SpringCloudService;
import com.pulumi.azure.appplatform.SpringCloudServiceArgs;
import com.pulumi.azure.appplatform.SpringCloudApp;
import com.pulumi.azure.appplatform.SpringCloudAppArgs;
import com.pulumi.azure.mysql.Server;
import com.pulumi.azure.mysql.ServerArgs;
import com.pulumi.azure.mysql.Database;
import com.pulumi.azure.mysql.DatabaseArgs;
import com.pulumi.azure.appplatform.SpringCloudAppMysqlAssociation;
import com.pulumi.azure.appplatform.SpringCloudAppMysqlAssociationArgs;
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 exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var exampleSpringCloudApp = new SpringCloudApp("exampleSpringCloudApp", SpringCloudAppArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serviceName(exampleSpringCloudService.name())
.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")
.sslEnforcementEnabled(true)
.sslMinimalTlsVersionEnforced("TLS1_2")
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.serverName(exampleServer.name())
.charset("utf8")
.collation("utf8_unicode_ci")
.build());
var exampleSpringCloudAppMysqlAssociation = new SpringCloudAppMysqlAssociation("exampleSpringCloudAppMysqlAssociation", SpringCloudAppMysqlAssociationArgs.builder()
.springCloudAppId(exampleSpringCloudApp.id())
.mysqlServerId(exampleServer.id())
.databaseName(exampleDatabase.name())
.username(exampleServer.administratorLogin())
.password(exampleServer.administratorLoginPassword())
.build());
}
}

Import

Spring Cloud Application MySQL Association can be imported using the resource id, e.g.

$ pulumi import azure:appplatform/springCloudAppMysqlAssociation:SpringCloudAppMysqlAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AppPlatform/spring/service1/apps/app1/bindings/bind1

Constructors

Link copied to clipboard
fun SpringCloudAppMysqlAssociationArgs(databaseName: Output<String>? = null, mysqlServerId: Output<String>? = null, name: Output<String>? = null, password: Output<String>? = null, springCloudAppId: Output<String>? = null, username: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SpringCloudAppMysqlAssociationArgs

Properties

Link copied to clipboard
val databaseName: Output<String>? = null

Specifies the name of the MySQL Database which the Spring Cloud App should be associated with.

Link copied to clipboard
val mysqlServerId: Output<String>? = null

Specifies the ID of the MySQL Server. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Spring Cloud Application Association. Changing this forces a new resource to be created.

Link copied to clipboard
val password: Output<String>? = null

Specifies the password which should be used when connecting to the MySQL Database from the Spring Cloud App.

Link copied to clipboard
val springCloudAppId: Output<String>? = null

Specifies the ID of the Spring Cloud Application where this Association is created. Changing this forces a new resource to be created.

Link copied to clipboard
val username: Output<String>? = null

Specifies the username which should be used when connecting to the MySQL Database from the Spring Cloud App.