tencentcloud.ElasticsearchSecurityGroup
Explore with Pulumi AI
Provides a resource to create a elasticsearch security_group
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const securityGroup = new tencentcloud.ElasticsearchSecurityGroup("securityGroup", {
instanceId: "es-5wn36he6",
securityGroupIds: [
"sg-mayqdlt1",
"sg-po2q8cg7",
],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
security_group = tencentcloud.ElasticsearchSecurityGroup("securityGroup",
instance_id="es-5wn36he6",
security_group_ids=[
"sg-mayqdlt1",
"sg-po2q8cg7",
])
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.NewElasticsearchSecurityGroup(ctx, "securityGroup", &tencentcloud.ElasticsearchSecurityGroupArgs{
InstanceId: pulumi.String("es-5wn36he6"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-mayqdlt1"),
pulumi.String("sg-po2q8cg7"),
},
})
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 securityGroup = new Tencentcloud.ElasticsearchSecurityGroup("securityGroup", new()
{
InstanceId = "es-5wn36he6",
SecurityGroupIds = new[]
{
"sg-mayqdlt1",
"sg-po2q8cg7",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ElasticsearchSecurityGroup;
import com.pulumi.tencentcloud.ElasticsearchSecurityGroupArgs;
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 securityGroup = new ElasticsearchSecurityGroup("securityGroup", ElasticsearchSecurityGroupArgs.builder()
.instanceId("es-5wn36he6")
.securityGroupIds(
"sg-mayqdlt1",
"sg-po2q8cg7")
.build());
}
}
resources:
securityGroup:
type: tencentcloud:ElasticsearchSecurityGroup
properties:
instanceId: es-5wn36he6
securityGroupIds:
- sg-mayqdlt1
- sg-po2q8cg7
Create ElasticsearchSecurityGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ElasticsearchSecurityGroup(name: string, args: ElasticsearchSecurityGroupArgs, opts?: CustomResourceOptions);
@overload
def ElasticsearchSecurityGroup(resource_name: str,
args: ElasticsearchSecurityGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ElasticsearchSecurityGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
elasticsearch_security_group_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None)
func NewElasticsearchSecurityGroup(ctx *Context, name string, args ElasticsearchSecurityGroupArgs, opts ...ResourceOption) (*ElasticsearchSecurityGroup, error)
public ElasticsearchSecurityGroup(string name, ElasticsearchSecurityGroupArgs args, CustomResourceOptions? opts = null)
public ElasticsearchSecurityGroup(String name, ElasticsearchSecurityGroupArgs args)
public ElasticsearchSecurityGroup(String name, ElasticsearchSecurityGroupArgs args, CustomResourceOptions options)
type: tencentcloud:ElasticsearchSecurityGroup
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 ElasticsearchSecurityGroupArgs
- 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 ElasticsearchSecurityGroupArgs
- 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 ElasticsearchSecurityGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ElasticsearchSecurityGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ElasticsearchSecurityGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ElasticsearchSecurityGroup 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 ElasticsearchSecurityGroup resource accepts the following input properties:
- Instance
Id string - Instance Id.
- Elasticsearch
Security stringGroup Id - ID of the resource.
- Security
Group List<string>Ids - Security group id list.
- Instance
Id string - Instance Id.
- Elasticsearch
Security stringGroup Id - ID of the resource.
- Security
Group []stringIds - Security group id list.
- instance
Id String - Instance Id.
- elasticsearch
Security StringGroup Id - ID of the resource.
- security
Group List<String>Ids - Security group id list.
- instance
Id string - Instance Id.
- elasticsearch
Security stringGroup Id - ID of the resource.
- security
Group string[]Ids - Security group id list.
- instance_
id str - Instance Id.
- elasticsearch_
security_ strgroup_ id - ID of the resource.
- security_
group_ Sequence[str]ids - Security group id list.
- instance
Id String - Instance Id.
- elasticsearch
Security StringGroup Id - ID of the resource.
- security
Group List<String>Ids - Security group id list.
Outputs
All input properties are implicitly available as output properties. Additionally, the ElasticsearchSecurityGroup 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 ElasticsearchSecurityGroup Resource
Get an existing ElasticsearchSecurityGroup 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?: ElasticsearchSecurityGroupState, opts?: CustomResourceOptions): ElasticsearchSecurityGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
elasticsearch_security_group_id: Optional[str] = None,
instance_id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None) -> ElasticsearchSecurityGroup
func GetElasticsearchSecurityGroup(ctx *Context, name string, id IDInput, state *ElasticsearchSecurityGroupState, opts ...ResourceOption) (*ElasticsearchSecurityGroup, error)
public static ElasticsearchSecurityGroup Get(string name, Input<string> id, ElasticsearchSecurityGroupState? state, CustomResourceOptions? opts = null)
public static ElasticsearchSecurityGroup get(String name, Output<String> id, ElasticsearchSecurityGroupState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ElasticsearchSecurityGroup 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.
- Elasticsearch
Security stringGroup Id - ID of the resource.
- Instance
Id string - Instance Id.
- Security
Group List<string>Ids - Security group id list.
- Elasticsearch
Security stringGroup Id - ID of the resource.
- Instance
Id string - Instance Id.
- Security
Group []stringIds - Security group id list.
- elasticsearch
Security StringGroup Id - ID of the resource.
- instance
Id String - Instance Id.
- security
Group List<String>Ids - Security group id list.
- elasticsearch
Security stringGroup Id - ID of the resource.
- instance
Id string - Instance Id.
- security
Group string[]Ids - Security group id list.
- elasticsearch_
security_ strgroup_ id - ID of the resource.
- instance_
id str - Instance Id.
- security_
group_ Sequence[str]ids - Security group id list.
- elasticsearch
Security StringGroup Id - ID of the resource.
- instance
Id String - Instance Id.
- security
Group List<String>Ids - Security group id list.
Import
elasticsearch security_group can be imported using the id, e.g.
$ pulumi import tencentcloud:index/elasticsearchSecurityGroup:ElasticsearchSecurityGroup security_group instance_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.