permalink |
---|
/sql_user/ |
sql_user
represents the google_sql_user
Terraform resource.
This package contains functions and utilities for setting up the resource using Jsonnet code.
fn new()
fn newAttrs()
fn withDeletionPolicy()
fn withHost()
fn withInstance()
fn withName()
fn withPassword()
fn withPasswordPolicy()
fn withPasswordPolicyMixin()
fn withProject()
fn withTimeouts()
fn withTimeoutsMixin()
fn withType()
obj password_policy
obj timeouts
new()
google.sql_user.new
injects a new google_sql_user
Terraform resource
block into the root module document.
Additionally, this inserts a private function into the _ref
attribute that generates references to attributes of the
resource. For example, if you added a new instance to the root using:
# arguments omitted for brevity
google.sql_user.new('some_id')
You can get the reference to the id
field of the created google.sql_user
using the reference:
$._ref.google_sql_user.some_id.get('id')
This is the same as directly entering "${ google_sql_user.some_id.id }"
as the value.
NOTE: if you are chaining multiple resources together in a merge operation, you may not be able to use super
, self
,
or $
to refer to the root object. Instead, make an explicit outer object using local
.
Args:
resourceLabel
(string
): The name label of the block.deletion_policy
(string
): The deletion policy for the user. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. Possible values are: "ABANDON". Whennull
, thedeletion_policy
field will be omitted from the resulting object.host
(string
): The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. Whennull
, thehost
field will be omitted from the resulting object.instance
(string
): The name of the Cloud SQL instance. Changing this forces a new resource to be created.name
(string
): The name of the user. Changing this forces a new resource to be created.password
(string
): The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. Whennull
, thepassword
field will be omitted from the resulting object.project
(string
): The ID of the project in which the resource belongs. If it is not provided, the provider project is used. Whennull
, theproject
field will be omitted from the resulting object.type
(string
): The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". Whennull
, thetype
field will be omitted from the resulting object.password_policy
(list[obj]
): Set thepassword_policy
field on the resulting resource block. Whennull
, thepassword_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.sql_user.password_policy.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting resource block. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.sql_user.timeouts.new constructor.
Returns:
- A mixin object that injects the new resource into the root Terraform configuration.
newAttrs()
google.sql_user.newAttrs
constructs a new object with attributes and blocks configured for the sql_user
Terraform resource.
Unlike google.sql_user.new, this function will not inject the resource
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withResource function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
deletion_policy
(string
): The deletion policy for the user. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. Possible values are: "ABANDON". Whennull
, thedeletion_policy
field will be omitted from the resulting object.host
(string
): The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. Whennull
, thehost
field will be omitted from the resulting object.instance
(string
): The name of the Cloud SQL instance. Changing this forces a new resource to be created.name
(string
): The name of the user. Changing this forces a new resource to be created.password
(string
): The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. Whennull
, thepassword
field will be omitted from the resulting object.project
(string
): The ID of the project in which the resource belongs. If it is not provided, the provider project is used. Whennull
, theproject
field will be omitted from the resulting object.type
(string
): The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". Whennull
, thetype
field will be omitted from the resulting object.password_policy
(list[obj]
): Set thepassword_policy
field on the resulting object. Whennull
, thepassword_policy
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.sql_user.password_policy.new constructor.timeouts
(obj
): Set thetimeouts
field on the resulting object. Whennull
, thetimeouts
sub block will be omitted from the resulting object. When setting the sub block, it is recommended to construct the object using the google.sql_user.timeouts.new constructor.
Returns:
- An attribute object that can be used with tf.withResource to construct a new
sql_user
resource into the root Terraform configuration.
withDeletionPolicy()
google.string.withDeletionPolicy
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the deletion_policy field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thedeletion_policy
field.
withHost()
google.string.withHost
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the host field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thehost
field.
withInstance()
google.string.withInstance
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the instance field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theinstance
field.
withName()
google.string.withName
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the name field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thename
field.
withPassword()
google.string.withPassword
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the password field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thepassword
field.
withPasswordPolicy()
google.list[obj].withPasswordPolicy
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the password_policy field.
This function will replace the array with the passed in value
. If you wish to instead append the
passed in value to the existing array, use the google.list[obj].withPasswordPolicyMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thepassword_policy
field.
withPasswordPolicyMixin()
google.list[obj].withPasswordPolicyMixin
constructs a mixin object that can be merged into the list[obj]
Terraform resource block to set or update the password_policy field.
This function will append the passed in array or object to the existing array. If you wish
to instead replace the array with the passed in value
, use the google.list[obj].withPasswordPolicy
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(list[obj]
): The value to set for thepassword_policy
field.
withProject()
google.string.withProject
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the project field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for theproject
field.
withTimeouts()
google.obj.withTimeouts
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will replace the map with the passed in value
. If you wish to instead merge the
passed in value to the existing map, use the google.obj.withTimeoutsMixin function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withTimeoutsMixin()
google.obj.withTimeoutsMixin
constructs a mixin object that can be merged into the obj
Terraform resource block to set or update the timeouts field.
This function will merge the passed in value to the existing map. If you wish
to instead replace the entire map with the passed in value
, use the google.obj.withTimeouts
function.
Args:
resourceLabel
(string
): The name label of the block to update.value
(obj
): The value to set for thetimeouts
field.
withType()
google.string.withType
constructs a mixin object that can be merged into the string
Terraform resource block to set or update the type field.
Args:
resourceLabel
(string
): The name label of the block to update.value
(string
): The value to set for thetype
field.
new()
google.sql_user.password_policy.new
constructs a new object with attributes and blocks configured for the password_policy
Terraform sub block.
Args:
allowed_failed_attempts
(number
): Number of failed attempts allowed before the user get locked. Whennull
, theallowed_failed_attempts
field will be omitted from the resulting object.enable_failed_attempts_check
(bool
): If true, the check that will lock user after too many failed login attempts will be enabled. Whennull
, theenable_failed_attempts_check
field will be omitted from the resulting object.enable_password_verification
(bool
): If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. Whennull
, theenable_password_verification
field will be omitted from the resulting object.password_expiration_duration
(string
): Password expiration duration with one week grace period. Whennull
, thepassword_expiration_duration
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
password_policy
sub block.
new()
google.sql_user.timeouts.new
constructs a new object with attributes and blocks configured for the timeouts
Terraform sub block.
Args:
create
(string
): Set thecreate
field on the resulting object. Whennull
, thecreate
field will be omitted from the resulting object.delete
(string
): Set thedelete
field on the resulting object. Whennull
, thedelete
field will be omitted from the resulting object.update
(string
): Set theupdate
field on the resulting object. Whennull
, theupdate
field will be omitted from the resulting object.
Returns:
- An attribute object that represents the
timeouts
sub block.