tencentcloud.CynosdbSecurityGroup
Explore with Pulumi AI
Provides a resource to create a cynosdb security_group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const test = new tencentcloud.CynosdbSecurityGroup("test", {
clusterId: "cynosdbmysql-bws8h88b",
instanceGroupType: "RO",
securityGroupIds: ["sg-baxfiao5"],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
test = tencentcloud.CynosdbSecurityGroup("test",
cluster_id="cynosdbmysql-bws8h88b",
instance_group_type="RO",
security_group_ids=["sg-baxfiao5"])
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.NewCynosdbSecurityGroup(ctx, "test", &tencentcloud.CynosdbSecurityGroupArgs{
ClusterId: pulumi.String("cynosdbmysql-bws8h88b"),
InstanceGroupType: pulumi.String("RO"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-baxfiao5"),
},
})
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 test = new Tencentcloud.CynosdbSecurityGroup("test", new()
{
ClusterId = "cynosdbmysql-bws8h88b",
InstanceGroupType = "RO",
SecurityGroupIds = new[]
{
"sg-baxfiao5",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CynosdbSecurityGroup;
import com.pulumi.tencentcloud.CynosdbSecurityGroupArgs;
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 test = new CynosdbSecurityGroup("test", CynosdbSecurityGroupArgs.builder()
.clusterId("cynosdbmysql-bws8h88b")
.instanceGroupType("RO")
.securityGroupIds("sg-baxfiao5")
.build());
}
}
resources:
test:
type: tencentcloud:CynosdbSecurityGroup
properties:
clusterId: cynosdbmysql-bws8h88b
instanceGroupType: RO
securityGroupIds:
- sg-baxfiao5
Create CynosdbSecurityGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CynosdbSecurityGroup(name: string, args: CynosdbSecurityGroupArgs, opts?: CustomResourceOptions);
@overload
def CynosdbSecurityGroup(resource_name: str,
args: CynosdbSecurityGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CynosdbSecurityGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
instance_group_type: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
cynosdb_security_group_id: Optional[str] = None)
func NewCynosdbSecurityGroup(ctx *Context, name string, args CynosdbSecurityGroupArgs, opts ...ResourceOption) (*CynosdbSecurityGroup, error)
public CynosdbSecurityGroup(string name, CynosdbSecurityGroupArgs args, CustomResourceOptions? opts = null)
public CynosdbSecurityGroup(String name, CynosdbSecurityGroupArgs args)
public CynosdbSecurityGroup(String name, CynosdbSecurityGroupArgs args, CustomResourceOptions options)
type: tencentcloud:CynosdbSecurityGroup
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 CynosdbSecurityGroupArgs
- 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 CynosdbSecurityGroupArgs
- 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 CynosdbSecurityGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CynosdbSecurityGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CynosdbSecurityGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CynosdbSecurityGroup 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 CynosdbSecurityGroup resource accepts the following input properties:
- Cluster
Id string - Cluster id.
- Instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - Security
Group List<string>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- Cynosdb
Security stringGroup Id - ID of the resource.
- Cluster
Id string - Cluster id.
- Instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - Security
Group []stringIds - A list of security group IDs to be modified, an array of one or more security group IDs.
- Cynosdb
Security stringGroup Id - ID of the resource.
- cluster
Id String - Cluster id.
- instance
Group StringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group List<String>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cynosdb
Security StringGroup Id - ID of the resource.
- cluster
Id string - Cluster id.
- instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group string[]Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cynosdb
Security stringGroup Id - ID of the resource.
- cluster_
id str - Cluster id.
- instance_
group_ strtype - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security_
group_ Sequence[str]ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cynosdb_
security_ strgroup_ id - ID of the resource.
- cluster
Id String - Cluster id.
- instance
Group StringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group List<String>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cynosdb
Security StringGroup Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the CynosdbSecurityGroup 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 CynosdbSecurityGroup Resource
Get an existing CynosdbSecurityGroup 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?: CynosdbSecurityGroupState, opts?: CustomResourceOptions): CynosdbSecurityGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
cynosdb_security_group_id: Optional[str] = None,
instance_group_type: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None) -> CynosdbSecurityGroup
func GetCynosdbSecurityGroup(ctx *Context, name string, id IDInput, state *CynosdbSecurityGroupState, opts ...ResourceOption) (*CynosdbSecurityGroup, error)
public static CynosdbSecurityGroup Get(string name, Input<string> id, CynosdbSecurityGroupState? state, CustomResourceOptions? opts = null)
public static CynosdbSecurityGroup get(String name, Output<String> id, CynosdbSecurityGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CynosdbSecurityGroup 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.
- Cluster
Id string - Cluster id.
- Cynosdb
Security stringGroup Id - ID of the resource.
- Instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - Security
Group List<string>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- Cluster
Id string - Cluster id.
- Cynosdb
Security stringGroup Id - ID of the resource.
- Instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - Security
Group []stringIds - A list of security group IDs to be modified, an array of one or more security group IDs.
- cluster
Id String - Cluster id.
- cynosdb
Security StringGroup Id - ID of the resource.
- instance
Group StringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group List<String>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cluster
Id string - Cluster id.
- cynosdb
Security stringGroup Id - ID of the resource.
- instance
Group stringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group string[]Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cluster_
id str - Cluster id.
- cynosdb_
security_ strgroup_ id - ID of the resource.
- instance_
group_ strtype - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security_
group_ Sequence[str]ids - A list of security group IDs to be modified, an array of one or more security group IDs.
- cluster
Id String - Cluster id.
- cynosdb
Security StringGroup Id - ID of the resource.
- instance
Group StringType - Instance group type. Available values:
-
HA
- HA group; -RO
- Read-only group; -ALL
- HA and RO group. - security
Group List<String>Ids - A list of security group IDs to be modified, an array of one or more security group IDs.
Import
cynosdb security_group can be imported using the id, e.g.
$ pulumi import tencentcloud:index/cynosdbSecurityGroup:CynosdbSecurityGroup security_group ${cluster_id}#${instance_group_type}
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.