tencentcloud.PostgresqlParameterTemplate
Explore with Pulumi AI
Provides a resource to create a postgresql parameter_template
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const parameterTemplate = new tencentcloud.PostgresqlParameterTemplate("parameterTemplate", {
dbEngine: "postgresql",
dbMajorVersion: "13",
deleteParamSets: ["lc_time"],
modifyParamEntrySets: [
{
expectedValue: "UTC",
name: "timezone",
},
{
expectedValue: "123",
name: "lock_timeout",
},
],
templateDescription: "For_tf_test",
templateName: "your_temp_name",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
parameter_template = tencentcloud.PostgresqlParameterTemplate("parameterTemplate",
db_engine="postgresql",
db_major_version="13",
delete_param_sets=["lc_time"],
modify_param_entry_sets=[
{
"expected_value": "UTC",
"name": "timezone",
},
{
"expected_value": "123",
"name": "lock_timeout",
},
],
template_description="For_tf_test",
template_name="your_temp_name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewPostgresqlParameterTemplate(ctx, "parameterTemplate", &tencentcloud.PostgresqlParameterTemplateArgs{
DbEngine: pulumi.String("postgresql"),
DbMajorVersion: pulumi.String("13"),
DeleteParamSets: pulumi.StringArray{
pulumi.String("lc_time"),
},
ModifyParamEntrySets: tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArray{
&tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArgs{
ExpectedValue: pulumi.String("UTC"),
Name: pulumi.String("timezone"),
},
&tencentcloud.PostgresqlParameterTemplateModifyParamEntrySetArgs{
ExpectedValue: pulumi.String("123"),
Name: pulumi.String("lock_timeout"),
},
},
TemplateDescription: pulumi.String("For_tf_test"),
TemplateName: pulumi.String("your_temp_name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var parameterTemplate = new Tencentcloud.PostgresqlParameterTemplate("parameterTemplate", new()
{
DbEngine = "postgresql",
DbMajorVersion = "13",
DeleteParamSets = new[]
{
"lc_time",
},
ModifyParamEntrySets = new[]
{
new Tencentcloud.Inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs
{
ExpectedValue = "UTC",
Name = "timezone",
},
new Tencentcloud.Inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs
{
ExpectedValue = "123",
Name = "lock_timeout",
},
},
TemplateDescription = "For_tf_test",
TemplateName = "your_temp_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlParameterTemplate;
import com.pulumi.tencentcloud.PostgresqlParameterTemplateArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlParameterTemplateModifyParamEntrySetArgs;
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 parameterTemplate = new PostgresqlParameterTemplate("parameterTemplate", PostgresqlParameterTemplateArgs.builder()
.dbEngine("postgresql")
.dbMajorVersion("13")
.deleteParamSets("lc_time")
.modifyParamEntrySets(
PostgresqlParameterTemplateModifyParamEntrySetArgs.builder()
.expectedValue("UTC")
.name("timezone")
.build(),
PostgresqlParameterTemplateModifyParamEntrySetArgs.builder()
.expectedValue("123")
.name("lock_timeout")
.build())
.templateDescription("For_tf_test")
.templateName("your_temp_name")
.build());
}
}
resources:
parameterTemplate:
type: tencentcloud:PostgresqlParameterTemplate
properties:
dbEngine: postgresql
dbMajorVersion: '13'
deleteParamSets:
- lc_time
modifyParamEntrySets:
- expectedValue: UTC
name: timezone
- expectedValue: '123'
name: lock_timeout
templateDescription: For_tf_test
templateName: your_temp_name
Create PostgresqlParameterTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlParameterTemplate(name: string, args: PostgresqlParameterTemplateArgs, opts?: CustomResourceOptions);
@overload
def PostgresqlParameterTemplate(resource_name: str,
args: PostgresqlParameterTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlParameterTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_engine: Optional[str] = None,
db_major_version: Optional[str] = None,
template_name: Optional[str] = None,
delete_param_sets: Optional[Sequence[str]] = None,
modify_param_entry_sets: Optional[Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]] = None,
postgresql_parameter_template_id: Optional[str] = None,
template_description: Optional[str] = None)
func NewPostgresqlParameterTemplate(ctx *Context, name string, args PostgresqlParameterTemplateArgs, opts ...ResourceOption) (*PostgresqlParameterTemplate, error)
public PostgresqlParameterTemplate(string name, PostgresqlParameterTemplateArgs args, CustomResourceOptions? opts = null)
public PostgresqlParameterTemplate(String name, PostgresqlParameterTemplateArgs args)
public PostgresqlParameterTemplate(String name, PostgresqlParameterTemplateArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlParameterTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PostgresqlParameterTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PostgresqlParameterTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PostgresqlParameterTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlParameterTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlParameterTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlParameterTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PostgresqlParameterTemplate resource accepts the following input properties:
- Db
Engine string - Database engine, such as postgresql, mssql_compatible.
- Db
Major stringVersion - The major database version number, such as 11, 12, 13.
- Template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Delete
Param List<string>Sets - The set of parameters that need to be deleted.
- Modify
Param List<PostgresqlEntry Sets Parameter Template Modify Param Entry Set> - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- Postgresql
Parameter stringTemplate Id - ID of the resource.
- Template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Db
Engine string - Database engine, such as postgresql, mssql_compatible.
- Db
Major stringVersion - The major database version number, such as 11, 12, 13.
- Template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Delete
Param []stringSets - The set of parameters that need to be deleted.
- Modify
Param []PostgresqlEntry Sets Parameter Template Modify Param Entry Set Args - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- Postgresql
Parameter stringTemplate Id - ID of the resource.
- Template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine String - Database engine, such as postgresql, mssql_compatible.
- db
Major StringVersion - The major database version number, such as 11, 12, 13.
- template
Name String - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- delete
Param List<String>Sets - The set of parameters that need to be deleted.
- modify
Param List<PostgresqlEntry Sets Parameter Template Modify Param Entry Set> - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter StringTemplate Id - ID of the resource.
- template
Description String - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine string - Database engine, such as postgresql, mssql_compatible.
- db
Major stringVersion - The major database version number, such as 11, 12, 13.
- template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- delete
Param string[]Sets - The set of parameters that need to be deleted.
- modify
Param PostgresqlEntry Sets Parameter Template Modify Param Entry Set[] - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter stringTemplate Id - ID of the resource.
- template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db_
engine str - Database engine, such as postgresql, mssql_compatible.
- db_
major_ strversion - The major database version number, such as 11, 12, 13.
- template_
name str - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- delete_
param_ Sequence[str]sets - The set of parameters that need to be deleted.
- modify_
param_ Sequence[Postgresqlentry_ sets Parameter Template Modify Param Entry Set Args] - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql_
parameter_ strtemplate_ id - ID of the resource.
- template_
description str - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine String - Database engine, such as postgresql, mssql_compatible.
- db
Major StringVersion - The major database version number, such as 11, 12, 13.
- template
Name String - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- delete
Param List<String>Sets - The set of parameters that need to be deleted.
- modify
Param List<Property Map>Entry Sets - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter StringTemplate Id - ID of the resource.
- template
Description String - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlParameterTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PostgresqlParameterTemplate Resource
Get an existing PostgresqlParameterTemplate 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?: PostgresqlParameterTemplateState, opts?: CustomResourceOptions): PostgresqlParameterTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
db_engine: Optional[str] = None,
db_major_version: Optional[str] = None,
delete_param_sets: Optional[Sequence[str]] = None,
modify_param_entry_sets: Optional[Sequence[PostgresqlParameterTemplateModifyParamEntrySetArgs]] = None,
postgresql_parameter_template_id: Optional[str] = None,
template_description: Optional[str] = None,
template_name: Optional[str] = None) -> PostgresqlParameterTemplate
func GetPostgresqlParameterTemplate(ctx *Context, name string, id IDInput, state *PostgresqlParameterTemplateState, opts ...ResourceOption) (*PostgresqlParameterTemplate, error)
public static PostgresqlParameterTemplate Get(string name, Input<string> id, PostgresqlParameterTemplateState? state, CustomResourceOptions? opts = null)
public static PostgresqlParameterTemplate get(String name, Output<String> id, PostgresqlParameterTemplateState state, CustomResourceOptions options)
resources: _: type: tencentcloud:PostgresqlParameterTemplate get: id: ${id}
- 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.
- 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.
- Db
Engine string - Database engine, such as postgresql, mssql_compatible.
- Db
Major stringVersion - The major database version number, such as 11, 12, 13.
- Delete
Param List<string>Sets - The set of parameters that need to be deleted.
- Modify
Param List<PostgresqlEntry Sets Parameter Template Modify Param Entry Set> - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- Postgresql
Parameter stringTemplate Id - ID of the resource.
- Template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Db
Engine string - Database engine, such as postgresql, mssql_compatible.
- Db
Major stringVersion - The major database version number, such as 11, 12, 13.
- Delete
Param []stringSets - The set of parameters that need to be deleted.
- Modify
Param []PostgresqlEntry Sets Parameter Template Modify Param Entry Set Args - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- Postgresql
Parameter stringTemplate Id - ID of the resource.
- Template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- Template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine String - Database engine, such as postgresql, mssql_compatible.
- db
Major StringVersion - The major database version number, such as 11, 12, 13.
- delete
Param List<String>Sets - The set of parameters that need to be deleted.
- modify
Param List<PostgresqlEntry Sets Parameter Template Modify Param Entry Set> - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter StringTemplate Id - ID of the resource.
- template
Description String - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- template
Name String - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine string - Database engine, such as postgresql, mssql_compatible.
- db
Major stringVersion - The major database version number, such as 11, 12, 13.
- delete
Param string[]Sets - The set of parameters that need to be deleted.
- modify
Param PostgresqlEntry Sets Parameter Template Modify Param Entry Set[] - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter stringTemplate Id - ID of the resource.
- template
Description string - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- template
Name string - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db_
engine str - Database engine, such as postgresql, mssql_compatible.
- db_
major_ strversion - The major database version number, such as 11, 12, 13.
- delete_
param_ Sequence[str]sets - The set of parameters that need to be deleted.
- modify_
param_ Sequence[Postgresqlentry_ sets Parameter Template Modify Param Entry Set Args] - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql_
parameter_ strtemplate_ id - ID of the resource.
- template_
description str - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- template_
name str - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- db
Engine String - Database engine, such as postgresql, mssql_compatible.
- db
Major StringVersion - The major database version number, such as 11, 12, 13.
- delete
Param List<String>Sets - The set of parameters that need to be deleted.
- modify
Param List<Property Map>Entry Sets - The set of parameters that need to be modified or added. Note: the same parameter cannot appear in the set of modifying and adding and deleting at the same time.
- postgresql
Parameter StringTemplate Id - ID of the resource.
- template
Description String - Parameter template description, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
- template
Name String - Template name, which can contain 1-60 letters, digits, and symbols (-_./()+=:@).
Supporting Types
PostgresqlParameterTemplateModifyParamEntrySet, PostgresqlParameterTemplateModifyParamEntrySetArgs
- Expected
Value string - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - Name string
- The parameter name.
- Expected
Value string - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - Name string
- The parameter name.
- expected
Value String - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - name String
- The parameter name.
- expected
Value string - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - name string
- The parameter name.
- expected_
value str - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - name str
- The parameter name.
- expected
Value String - Modify the parameter value. The input parameters are passed in the form of strings, for example: decimal
0.1
, integer1000
, enumerationreplica
. - name String
- The parameter name.
Import
postgresql parameter_template can be imported using the id, e.g.
Notice: modify_param_entry_set
and delete_param_set
do not support import.
$ pulumi import tencentcloud:index/postgresqlParameterTemplate:PostgresqlParameterTemplate parameter_template parameter_template_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.