ProvisionScriptState class

Input properties used for looking up and filtering ProvisionScript resources.

Constructors

ProvisionScriptState({Input<String?>? database, Input<String?>? deletionPolicy, Input<String?>? description, Input<String?>? instance, Input<String?>? passwordSecretVersion, Input<String?>? project, Input<String?>? script, Input<String?>? user})
Creates a new ProvisionScriptState. database The name of the database to which Terraform connects. Changing deletionPolicy The deletion policy for the resources created by the script. The description The description of the provision script. instance The name of the Cloud SQL instance. Changing this forces the script to passwordSecretVersion The resource name of the Secret Manager secret storing the project The ID of the project in which the resource belongs. If it is not provided, script The SQL script to provision database resources. Its execution time limit user The name of the built-in database user to authenticate as. For MySQL user,
const
ProvisionScriptState.fromMap(Map<String, dynamic> map)
factory

Properties

database → Input<String?>?
The name of the database to which Terraform connects. Changing this forces Terraform to connect to the new database and run the script. This argument is required for Postgres instances. It's optional for MySQL, but some of your queries may require a database. You can create and use a database in the script or explicitly reference a google_sql_database.
final
deletionPolicy → Input<String?>?
The deletion policy for the resources created by the script. The default is "ABANDON". It must be "ABANDON" to allow Terraform to abandon the resources. If you want to delete resources, add statements in the script such as drop … if exists.
final
description → Input<String?>?
The description of the provision script.
final
hashCode → int
The hash code for this object.
no setterinherited
instance → Input<String?>?
The name of the Cloud SQL instance. Changing this forces the script to be run on the new instance.
final
passwordSecretVersion → Input<String?>?
The resource name of the Secret Manager secret storing the password. The secret should be a regional secret and stored in the exact same region as the Cloud SQL instance. Follow https://docs.cloud.google.com/secret-manager/regional-secrets/create-regional-secret. When user and passwordSecretVersion are provided, the script is run using this user. Otherwise, the script is run using the identity account used to apply your Terraform config. Changing this field forces the script to be run again.
final
project → Input<String?>?
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
script → Input<String?>?
The SQL script to provision database resources. Its execution time limit is 30 s and it will be canceled if it takes longer than 30 s. You can use patterns like create if not exists … or if not exists (select …) then … end if to avoid existence-related errors. If it's not possible to make a statement idempotent, you can run it once and then remove it from this script.
final
user → Input<String?>?
The name of the built-in database user to authenticate as. For MySQL user, omit '@' and the hostname. The user should exist as a built-in user in the database. When user and passwordSecretVersion are provided, the script is run using this user. Otherwise, the script is run using the identity account used to apply your Terraform config. Changing this forces the script to be run using the new user.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited