Database
Represents a SQL database inside the Cloud SQL instance, hosted in Google’s cloud.
Create a Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);def Database(resource_name, opts=None, charset=None, collation=None, instance=None, name=None, project=None, __props__=None);func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Database resource accepts the following input properties:
- Instance string
The name of the Cloud SQL instance. This does not include the project ID.
- Charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- Collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Instance string
The name of the Cloud SQL instance. This does not include the project ID.
- Charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- Collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- instance string
The name of the Cloud SQL instance. This does not include the project ID.
- charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- instance str
The name of the Cloud SQL instance. This does not include the project ID.
- charset str
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- collation str
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- name str
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
Look up an Existing Database Resource
Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Databasestatic get(resource_name, id, opts=None, charset=None, collation=None, instance=None, name=None, project=None, self_link=None, __props__=None);func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- Collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- Instance string
The name of the Cloud SQL instance. This does not include the project ID.
- Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string The URI of the created resource.
- Charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- Collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- Instance string
The name of the Cloud SQL instance. This does not include the project ID.
- Name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Self
Link string The URI of the created resource.
- charset string
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- collation string
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- instance string
The name of the Cloud SQL instance. This does not include the project ID.
- name string
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self
Link string The URI of the created resource.
- charset str
The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases only support a value of
UTF8at creation time.- collation str
The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases only support a value of
en_US.UTF8at creation time.- instance str
The name of the Cloud SQL instance. This does not include the project ID.
- name str
The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- self_
link str The URI of the created resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.