Represents a {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script google_sql_provision_script}.
using Io.Cdktn.Providers.Google;
new SqlProvisionScript(Construct Scope, string Id, SqlProvisionScriptConfig Config);| Name | Type | Description |
|---|---|---|
Scope |
Constructs.Construct |
The scope in which to define this construct. |
Id |
string |
The scoped construct ID. |
Config |
SqlProvisionScriptConfig |
No description. |
- Type: Constructs.Construct
The scope in which to define this construct.
- Type: string
The scoped construct ID.
Must be unique amongst siblings in the same scope
- Type: SqlProvisionScriptConfig
| Name | Description |
|---|---|
ToString |
Returns a string representation of this construct. |
With |
Applies one or more mixins to this construct. |
AddOverride |
No description. |
OverrideLogicalId |
Overrides the auto-generated logical ID with a specific ID. |
ResetOverrideLogicalId |
Resets a previously passed logical Id to use the auto-generated logical id again. |
ToHclTerraform |
No description. |
ToMetadata |
No description. |
ToTerraform |
Adds this resource to the terraform JSON output. |
AddMoveTarget |
Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move. |
GetAnyMapAttribute |
No description. |
GetBooleanAttribute |
No description. |
GetBooleanMapAttribute |
No description. |
GetListAttribute |
No description. |
GetNumberAttribute |
No description. |
GetNumberListAttribute |
No description. |
GetNumberMapAttribute |
No description. |
GetStringAttribute |
No description. |
GetStringMapAttribute |
No description. |
HasResourceMove |
No description. |
ImportFrom |
No description. |
InterpolationForAttribute |
No description. |
MoveFromId |
Move the resource corresponding to "id" to this resource. |
MoveTo |
Moves this resource to the target resource given by moveTarget. |
MoveToId |
Moves this resource to the resource corresponding to "id". |
ResetDatabase |
No description. |
ResetDeletionPolicy |
No description. |
ResetDescription |
No description. |
ResetId |
No description. |
ResetProject |
No description. |
private string ToString()Returns a string representation of this construct.
private IConstruct With(params IMixin[] Mixins)Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
- Type: params Constructs.IMixin[]
The mixins to apply.
private void AddOverride(string Path, object Value)- Type: string
- Type: object
private void OverrideLogicalId(string NewLogicalId)Overrides the auto-generated logical ID with a specific ID.
- Type: string
The new logical ID to use for this stack element.
private void ResetOverrideLogicalId()Resets a previously passed logical Id to use the auto-generated logical id again.
private object ToHclTerraform()private object ToMetadata()private object ToTerraform()Adds this resource to the terraform JSON output.
private void AddMoveTarget(string MoveTarget)Adds a user defined moveTarget string to this resource to be later used in .moveTo(moveTarget) to resolve the location of the move.
- Type: string
The string move target that will correspond to this resource.
private System.Collections.Generic.IDictionary<string, object> GetAnyMapAttribute(string TerraformAttribute)- Type: string
private IResolvable GetBooleanAttribute(string TerraformAttribute)- Type: string
private System.Collections.Generic.IDictionary<string, bool> GetBooleanMapAttribute(string TerraformAttribute)- Type: string
private string[] GetListAttribute(string TerraformAttribute)- Type: string
private double GetNumberAttribute(string TerraformAttribute)- Type: string
private double[] GetNumberListAttribute(string TerraformAttribute)- Type: string
private System.Collections.Generic.IDictionary<string, double> GetNumberMapAttribute(string TerraformAttribute)- Type: string
private string GetStringAttribute(string TerraformAttribute)- Type: string
private System.Collections.Generic.IDictionary<string, string> GetStringMapAttribute(string TerraformAttribute)- Type: string
private TerraformResourceMoveByTarget|TerraformResourceMoveById HasResourceMove()private void ImportFrom(string Id, TerraformProvider Provider = null)- Type: string
- Type: Io.Cdktn.TerraformProvider
private IResolvable InterpolationForAttribute(string TerraformAttribute)- Type: string
private void MoveFromId(string Id)Move the resource corresponding to "id" to this resource.
Note that the resource being moved from must be marked as moved using it's instance function.
- Type: string
Full id of resource being moved from, e.g. "aws_s3_bucket.example".
private void MoveTo(string MoveTarget, string|double Index = null)Moves this resource to the target resource given by moveTarget.
- Type: string
The previously set user defined string set by .addMoveTarget() corresponding to the resource to move to.
- Type: string|double
Optional The index corresponding to the key the resource is to appear in the foreach of a resource to move to.
private void MoveToId(string Id)Moves this resource to the resource corresponding to "id".
- Type: string
Full id of resource to move to, e.g. "aws_s3_bucket.example".
private void ResetDatabase()private void ResetDeletionPolicy()private void ResetDescription()private void ResetId()private void ResetProject()| Name | Description |
|---|---|
IsConstruct |
Checks if x is a construct. |
IsTerraformElement |
No description. |
IsTerraformResource |
No description. |
GenerateConfigForImport |
Generates CDKTN code for importing a SqlProvisionScript resource upon running "cdktn plan ". |
using Io.Cdktn.Providers.Google;
SqlProvisionScript.IsConstruct(object X);Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
- Type: object
Any object.
using Io.Cdktn.Providers.Google;
SqlProvisionScript.IsTerraformElement(object X);- Type: object
using Io.Cdktn.Providers.Google;
SqlProvisionScript.IsTerraformResource(object X);- Type: object
using Io.Cdktn.Providers.Google;
SqlProvisionScript.GenerateConfigForImport(Construct Scope, string ImportToId, string ImportFromId, TerraformProvider Provider = null);Generates CDKTN code for importing a SqlProvisionScript resource upon running "cdktn plan ".
- Type: Constructs.Construct
The scope in which to define this construct.
- Type: string
The construct id used in the generated config for the SqlProvisionScript to import.
- Type: string
The id of the existing SqlProvisionScript that should be imported.
Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#import import section} in the documentation of this resource for the id to use
- Type: Io.Cdktn.TerraformProvider
? Optional instance of the provider where the SqlProvisionScript to import is found.
| Name | Type | Description |
|---|---|---|
Node |
Constructs.Node |
The tree node. |
CdktfStack |
Io.Cdktn.TerraformStack |
No description. |
Fqn |
string |
No description. |
FriendlyUniqueId |
string |
No description. |
TerraformMetaArguments |
System.Collections.Generic.IDictionary<string, object> |
No description. |
TerraformResourceType |
string |
No description. |
TerraformGeneratorMetadata |
Io.Cdktn.TerraformProviderGeneratorMetadata |
No description. |
Connection |
Io.Cdktn.SSHProvisionerConnection|Io.Cdktn.WinrmProvisionerConnection |
No description. |
Count |
double|Io.Cdktn.TerraformCount |
No description. |
DependsOn |
string[] |
No description. |
ForEach |
Io.Cdktn.ITerraformIterator |
No description. |
Lifecycle |
Io.Cdktn.TerraformResourceLifecycle |
No description. |
Provider |
Io.Cdktn.TerraformProvider |
No description. |
Provisioners |
Io.Cdktn.FileProvisioner|Io.Cdktn.LocalExecProvisioner|Io.Cdktn.RemoteExecProvisioner[] |
No description. |
DatabaseInput |
string |
No description. |
DeletionPolicyInput |
string |
No description. |
DescriptionInput |
string |
No description. |
IdInput |
string |
No description. |
InstanceInput |
string |
No description. |
ProjectInput |
string |
No description. |
ScriptInput |
string |
No description. |
Database |
string |
No description. |
DeletionPolicy |
string |
No description. |
Description |
string |
No description. |
Id |
string |
No description. |
Instance |
string |
No description. |
Project |
string |
No description. |
Script |
string |
No description. |
public Node Node { get; }- Type: Constructs.Node
The tree node.
public TerraformStack CdktfStack { get; }- Type: Io.Cdktn.TerraformStack
public string Fqn { get; }- Type: string
public string FriendlyUniqueId { get; }- Type: string
public System.Collections.Generic.IDictionary<string, object> TerraformMetaArguments { get; }- Type: System.Collections.Generic.IDictionary<string, object>
public string TerraformResourceType { get; }- Type: string
public TerraformProviderGeneratorMetadata TerraformGeneratorMetadata { get; }- Type: Io.Cdktn.TerraformProviderGeneratorMetadata
public SSHProvisionerConnection|WinrmProvisionerConnection Connection { get; }- Type: Io.Cdktn.SSHProvisionerConnection|Io.Cdktn.WinrmProvisionerConnection
public double|TerraformCount Count { get; }- Type: double|Io.Cdktn.TerraformCount
public string[] DependsOn { get; }- Type: string[]
public ITerraformIterator ForEach { get; }- Type: Io.Cdktn.ITerraformIterator
public TerraformResourceLifecycle Lifecycle { get; }- Type: Io.Cdktn.TerraformResourceLifecycle
public TerraformProvider Provider { get; }- Type: Io.Cdktn.TerraformProvider
public (FileProvisioner|LocalExecProvisioner|RemoteExecProvisioner)[] Provisioners { get; }- Type: Io.Cdktn.FileProvisioner|Io.Cdktn.LocalExecProvisioner|Io.Cdktn.RemoteExecProvisioner[]
public string DatabaseInput { get; }- Type: string
public string DeletionPolicyInput { get; }- Type: string
public string DescriptionInput { get; }- Type: string
public string IdInput { get; }- Type: string
public string InstanceInput { get; }- Type: string
public string ProjectInput { get; }- Type: string
public string ScriptInput { get; }- Type: string
public string Database { get; }- Type: string
public string DeletionPolicy { get; }- Type: string
public string Description { get; }- Type: string
public string Id { get; }- Type: string
public string Instance { get; }- Type: string
public string Project { get; }- Type: string
public string Script { get; }- Type: string
| Name | Type | Description |
|---|---|---|
TfResourceType |
string |
No description. |
public string TfResourceType { get; }- Type: string
using Io.Cdktn.Providers.Google;
new SqlProvisionScriptConfig {
SSHProvisionerConnection|WinrmProvisionerConnection Connection = null,
double|TerraformCount Count = null,
ITerraformDependable[] DependsOn = null,
ITerraformIterator ForEach = null,
TerraformResourceLifecycle Lifecycle = null,
TerraformProvider Provider = null,
(FileProvisioner|LocalExecProvisioner|RemoteExecProvisioner)[] Provisioners = null,
string Instance,
string Script,
string Database = null,
string DeletionPolicy = null,
string Description = null,
string Id = null,
string Project = null
};| Name | Type | Description |
|---|---|---|
Connection |
Io.Cdktn.SSHProvisionerConnection|Io.Cdktn.WinrmProvisionerConnection |
No description. |
Count |
double|Io.Cdktn.TerraformCount |
No description. |
DependsOn |
Io.Cdktn.ITerraformDependable[] |
No description. |
ForEach |
Io.Cdktn.ITerraformIterator |
No description. |
Lifecycle |
Io.Cdktn.TerraformResourceLifecycle |
No description. |
Provider |
Io.Cdktn.TerraformProvider |
No description. |
Provisioners |
Io.Cdktn.FileProvisioner|Io.Cdktn.LocalExecProvisioner|Io.Cdktn.RemoteExecProvisioner[] |
No description. |
Instance |
string |
The name of the Cloud SQL instance. Changing this forces the script to be run on the new instance. |
Script |
string |
The SQL script to provision database resources. |
Database |
string |
The name of the database to which Terraform connects. |
DeletionPolicy |
string |
The deletion policy for the resources created by the script. |
Description |
string |
The description of the provision script. |
Id |
string |
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#id SqlProvisionScript#id}. |
Project |
string |
The ID of the project in which the resource belongs. |
public SSHProvisionerConnection|WinrmProvisionerConnection Connection { get; set; }- Type: Io.Cdktn.SSHProvisionerConnection|Io.Cdktn.WinrmProvisionerConnection
public double|TerraformCount Count { get; set; }- Type: double|Io.Cdktn.TerraformCount
public ITerraformDependable[] DependsOn { get; set; }- Type: Io.Cdktn.ITerraformDependable[]
public ITerraformIterator ForEach { get; set; }- Type: Io.Cdktn.ITerraformIterator
public TerraformResourceLifecycle Lifecycle { get; set; }- Type: Io.Cdktn.TerraformResourceLifecycle
public TerraformProvider Provider { get; set; }- Type: Io.Cdktn.TerraformProvider
public (FileProvisioner|LocalExecProvisioner|RemoteExecProvisioner)[] Provisioners { get; set; }- Type: Io.Cdktn.FileProvisioner|Io.Cdktn.LocalExecProvisioner|Io.Cdktn.RemoteExecProvisioner[]
public string Instance { get; set; }- Type: string
The name of the Cloud SQL instance. Changing this forces the script to be run on the new instance.
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#instance SqlProvisionScript#instance}
public string Script { get; set; }- Type: string
The SQL script to provision database resources.
Its execution time limit is 30 s. Changing this forces the script to be rerun. Make sure the script is idempotent. You can use statements like "create if not exists …" or "if not exists (select …) then … end if" to prevent 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.
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#script SqlProvisionScript#script}
public string Database { get; set; }- Type: 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.
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#database SqlProvisionScript#database}
public string DeletionPolicy { get; set; }- Type: 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".
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#deletion_policy SqlProvisionScript#deletion_policy}
public string Description { get; set; }- Type: string
The description of the provision script.
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#description SqlProvisionScript#description}
public string Id { get; set; }- Type: string
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#id SqlProvisionScript#id}.
Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
public string Project { get; set; }- Type: string
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/7.36.0/docs/resources/sql_provision_script#project SqlProvisionScript#project}