1. Packages
  2. Ec Provider
  3. API Docs
  4. DeploymentExtension
ElasticCloud (EC) v0.10.2 published on Wednesday, Oct 2, 2024 by Pulumi

ec.DeploymentExtension

Explore with Pulumi AI

ec logo
ElasticCloud (EC) v0.10.2 published on Wednesday, Oct 2, 2024 by Pulumi

    Provides an Elastic Cloud extension resource, which allows extensions to be created, updated, and deleted.

    Extensions allow users of Elastic Cloud to use custom plugins, scripts, or dictionaries to enhance the core functionality of Elasticsearch. Before you install an extension, be sure to check out the supported and official Elasticsearch plugins already available.

    Tip : If you experience timeouts when uploading an extension through a slow network, you might need to increase the timeout setting.

    Example Usage

    With extension file

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ec.DeploymentExtension;
    import com.pulumi.ec.DeploymentExtensionArgs;
    import com.pulumi.ec.EcFunctions;
    import com.pulumi.ec.inputs.GetStackArgs;
    import com.pulumi.ec.Deployment;
    import com.pulumi.ec.DeploymentArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchHotArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchHotAutoscalingArgs;
    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) {
            final var filePath = "/path/to/plugin.zip";
    
            var exampleExtension = new DeploymentExtension("exampleExtension", DeploymentExtensionArgs.builder()
                .name("my_extension")
                .description("my extension")
                .version("*")
                .extensionType("bundle")
                .filePath(filePath)
                .fileHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()
                    .input(filePath)
                    .build()).result())
                .build());
    
            final var latest = EcFunctions.getStack(GetStackArgs.builder()
                .versionRegex("latest")
                .region("us-east-1")
                .build());
    
            var withExtension = new Deployment("withExtension", DeploymentArgs.builder()
                .name("my_example_deployment")
                .region("us-east-1")
                .version(latest.applyValue(getStackResult -> getStackResult.version()))
                .deploymentTemplateId("aws-io-optimized-v2")
                .elasticsearch(DeploymentElasticsearchArgs.builder()
                    .hot(DeploymentElasticsearchHotArgs.builder()
                        .autoscaling()
                        .build())
                    .extension(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleExtension:
        type: ec:DeploymentExtension
        name: example_extension
        properties:
          name: my_extension
          description: my extension
          version: '*'
          extensionType: bundle
          filePath: ${filePath}
          fileHash:
            fn::invoke:
              Function: std:filebase64sha256
              Arguments:
                input: ${filePath}
              Return: result
      withExtension:
        type: ec:Deployment
        name: with_extension
        properties:
          name: my_example_deployment
          region: us-east-1
          version: ${latest.version}
          deploymentTemplateId: aws-io-optimized-v2
          elasticsearch:
            hot:
              autoscaling: {}
            extension:
              - name: ${exampleExtension.name}
                type: bundle
                version: ${latest.version}
                url: ${exampleExtension.url}
    variables:
      filePath: /path/to/plugin.zip
      latest:
        fn::invoke:
          Function: ec:getStack
          Arguments:
            versionRegex: latest
            region: us-east-1
    

    With download URL

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ec.DeploymentExtension;
    import com.pulumi.ec.DeploymentExtensionArgs;
    import com.pulumi.ec.EcFunctions;
    import com.pulumi.ec.inputs.GetStackArgs;
    import com.pulumi.ec.Deployment;
    import com.pulumi.ec.DeploymentArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchHotArgs;
    import com.pulumi.ec.inputs.DeploymentElasticsearchHotAutoscalingArgs;
    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 exampleExtension = new DeploymentExtension("exampleExtension", DeploymentExtensionArgs.builder()
                .name("my_extension")
                .description("my extension")
                .version("*")
                .extensionType("bundle")
                .downloadUrl("https://example.net")
                .build());
    
            final var latest = EcFunctions.getStack(GetStackArgs.builder()
                .versionRegex("latest")
                .region("us-east-1")
                .build());
    
            var withExtension = new Deployment("withExtension", DeploymentArgs.builder()
                .name("my_example_deployment")
                .region("us-east-1")
                .version(latest.applyValue(getStackResult -> getStackResult.version()))
                .deploymentTemplateId("aws-io-optimized-v2")
                .elasticsearch(DeploymentElasticsearchArgs.builder()
                    .hot(DeploymentElasticsearchHotArgs.builder()
                        .autoscaling()
                        .build())
                    .extension(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleExtension:
        type: ec:DeploymentExtension
        name: example_extension
        properties:
          name: my_extension
          description: my extension
          version: '*'
          extensionType: bundle
          downloadUrl: https://example.net
      withExtension:
        type: ec:Deployment
        name: with_extension
        properties:
          name: my_example_deployment
          region: us-east-1
          version: ${latest.version}
          deploymentTemplateId: aws-io-optimized-v2
          elasticsearch:
            hot:
              autoscaling: {}
            extension:
              - name: ${exampleExtension.name}
                type: bundle
                version: ${latest.version}
                url: ${exampleExtension.url}
    variables:
      latest:
        fn::invoke:
          Function: ec:getStack
          Arguments:
            versionRegex: latest
            region: us-east-1
    

    Create DeploymentExtension Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DeploymentExtension(name: string, args: DeploymentExtensionArgs, opts?: CustomResourceOptions);
    @overload
    def DeploymentExtension(resource_name: str,
                            args: DeploymentExtensionArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeploymentExtension(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            extension_type: Optional[str] = None,
                            version: Optional[str] = None,
                            description: Optional[str] = None,
                            download_url: Optional[str] = None,
                            file_hash: Optional[str] = None,
                            file_path: Optional[str] = None,
                            name: Optional[str] = None)
    func NewDeploymentExtension(ctx *Context, name string, args DeploymentExtensionArgs, opts ...ResourceOption) (*DeploymentExtension, error)
    public DeploymentExtension(string name, DeploymentExtensionArgs args, CustomResourceOptions? opts = null)
    public DeploymentExtension(String name, DeploymentExtensionArgs args)
    public DeploymentExtension(String name, DeploymentExtensionArgs args, CustomResourceOptions options)
    
    type: ec:DeploymentExtension
    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 DeploymentExtensionArgs
    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 DeploymentExtensionArgs
    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 DeploymentExtensionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeploymentExtensionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeploymentExtensionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var deploymentExtensionResource = new ElasticCloud.DeploymentExtension("deploymentExtensionResource", new()
    {
        ExtensionType = "string",
        Version = "string",
        Description = "string",
        DownloadUrl = "string",
        FileHash = "string",
        FilePath = "string",
        Name = "string",
    });
    
    example, err := ec.NewDeploymentExtension(ctx, "deploymentExtensionResource", &ec.DeploymentExtensionArgs{
    	ExtensionType: pulumi.String("string"),
    	Version:       pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	DownloadUrl:   pulumi.String("string"),
    	FileHash:      pulumi.String("string"),
    	FilePath:      pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var deploymentExtensionResource = new DeploymentExtension("deploymentExtensionResource", DeploymentExtensionArgs.builder()
        .extensionType("string")
        .version("string")
        .description("string")
        .downloadUrl("string")
        .fileHash("string")
        .filePath("string")
        .name("string")
        .build());
    
    deployment_extension_resource = ec.DeploymentExtension("deploymentExtensionResource",
        extension_type="string",
        version="string",
        description="string",
        download_url="string",
        file_hash="string",
        file_path="string",
        name="string")
    
    const deploymentExtensionResource = new ec.DeploymentExtension("deploymentExtensionResource", {
        extensionType: "string",
        version: "string",
        description: "string",
        downloadUrl: "string",
        fileHash: "string",
        filePath: "string",
        name: "string",
    });
    
    type: ec:DeploymentExtension
    properties:
        description: string
        downloadUrl: string
        extensionType: string
        fileHash: string
        filePath: string
        name: string
        version: string
    

    DeploymentExtension 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 DeploymentExtension resource accepts the following input properties:

    ExtensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    Version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    Description string
    Description for the extension
    DownloadUrl string
    The URL to download the extension archive.
    FileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    FilePath string
    Local file path to upload as the extension.
    Name string
    Name of the extension
    ExtensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    Version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    Description string
    Description for the extension
    DownloadUrl string
    The URL to download the extension archive.
    FileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    FilePath string
    Local file path to upload as the extension.
    Name string
    Name of the extension
    extensionType String
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    version String
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description String
    Description for the extension
    downloadUrl String
    The URL to download the extension archive.
    fileHash String
    Hash value of the file. Triggers re-uploading the file on change.
    filePath String
    Local file path to upload as the extension.
    name String
    Name of the extension
    extensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description string
    Description for the extension
    downloadUrl string
    The URL to download the extension archive.
    fileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    filePath string
    Local file path to upload as the extension.
    name string
    Name of the extension
    extension_type str
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    version str
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description str
    Description for the extension
    download_url str
    The URL to download the extension archive.
    file_hash str
    Hash value of the file. Triggers re-uploading the file on change.
    file_path str
    Local file path to upload as the extension.
    name str
    Name of the extension
    extensionType String
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    version String
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description String
    Description for the extension
    downloadUrl String
    The URL to download the extension archive.
    fileHash String
    Hash value of the file. Triggers re-uploading the file on change.
    filePath String
    Local file path to upload as the extension.
    name String
    Name of the extension

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DeploymentExtension resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The datatime the extension was last modified.
    Size int
    The size of the extension file in bytes.
    Url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The datatime the extension was last modified.
    Size int
    The size of the extension file in bytes.
    Url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The datatime the extension was last modified.
    size Integer
    The size of the extension file in bytes.
    url String
    The extension URL which will be used in the Elastic Cloud deployment plan.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    The datatime the extension was last modified.
    size number
    The size of the extension file in bytes.
    url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    The datatime the extension was last modified.
    size int
    The size of the extension file in bytes.
    url str
    The extension URL which will be used in the Elastic Cloud deployment plan.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The datatime the extension was last modified.
    size Number
    The size of the extension file in bytes.
    url String
    The extension URL which will be used in the Elastic Cloud deployment plan.

    Look up Existing DeploymentExtension Resource

    Get an existing DeploymentExtension 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?: DeploymentExtensionState, opts?: CustomResourceOptions): DeploymentExtension
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            download_url: Optional[str] = None,
            extension_type: Optional[str] = None,
            file_hash: Optional[str] = None,
            file_path: Optional[str] = None,
            last_modified: Optional[str] = None,
            name: Optional[str] = None,
            size: Optional[int] = None,
            url: Optional[str] = None,
            version: Optional[str] = None) -> DeploymentExtension
    func GetDeploymentExtension(ctx *Context, name string, id IDInput, state *DeploymentExtensionState, opts ...ResourceOption) (*DeploymentExtension, error)
    public static DeploymentExtension Get(string name, Input<string> id, DeploymentExtensionState? state, CustomResourceOptions? opts = null)
    public static DeploymentExtension get(String name, Output<String> id, DeploymentExtensionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    Description for the extension
    DownloadUrl string
    The URL to download the extension archive.
    ExtensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    FileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    FilePath string
    Local file path to upload as the extension.
    LastModified string
    The datatime the extension was last modified.
    Name string
    Name of the extension
    Size int
    The size of the extension file in bytes.
    Url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    Version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    Description string
    Description for the extension
    DownloadUrl string
    The URL to download the extension archive.
    ExtensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    FileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    FilePath string
    Local file path to upload as the extension.
    LastModified string
    The datatime the extension was last modified.
    Name string
    Name of the extension
    Size int
    The size of the extension file in bytes.
    Url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    Version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description String
    Description for the extension
    downloadUrl String
    The URL to download the extension archive.
    extensionType String
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    fileHash String
    Hash value of the file. Triggers re-uploading the file on change.
    filePath String
    Local file path to upload as the extension.
    lastModified String
    The datatime the extension was last modified.
    name String
    Name of the extension
    size Integer
    The size of the extension file in bytes.
    url String
    The extension URL which will be used in the Elastic Cloud deployment plan.
    version String
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description string
    Description for the extension
    downloadUrl string
    The URL to download the extension archive.
    extensionType string
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    fileHash string
    Hash value of the file. Triggers re-uploading the file on change.
    filePath string
    Local file path to upload as the extension.
    lastModified string
    The datatime the extension was last modified.
    name string
    Name of the extension
    size number
    The size of the extension file in bytes.
    url string
    The extension URL which will be used in the Elastic Cloud deployment plan.
    version string
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description str
    Description for the extension
    download_url str
    The URL to download the extension archive.
    extension_type str
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    file_hash str
    Hash value of the file. Triggers re-uploading the file on change.
    file_path str
    Local file path to upload as the extension.
    last_modified str
    The datatime the extension was last modified.
    name str
    Name of the extension
    size int
    The size of the extension file in bytes.
    url str
    The extension URL which will be used in the Elastic Cloud deployment plan.
    version str
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.
    description String
    Description for the extension
    downloadUrl String
    The URL to download the extension archive.
    extensionType String
    Extension type. Must be bundle or plugin. A bundle will usually contain a dictionary or script, where a plugin is compiled from source.
    fileHash String
    Hash value of the file. Triggers re-uploading the file on change.
    filePath String
    Local file path to upload as the extension.
    lastModified String
    The datatime the extension was last modified.
    name String
    Name of the extension
    size Number
    The size of the extension file in bytes.
    url String
    The extension URL which will be used in the Elastic Cloud deployment plan.
    version String
    Elastic stack version. A full version (e.g 8.7.0) should be set for plugins. A wildcard (e.g 8.*) may be used for bundles.

    Import

    Extensions can be imported using the id, for example:

    $ pulumi import ec:index/deploymentExtension:DeploymentExtension name 320b7b540dfc967a7a649c18e2fce4ed
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ec pulumi/pulumi-ec
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ec Terraform Provider.
    ec logo
    ElasticCloud (EC) v0.10.2 published on Wednesday, Oct 2, 2024 by Pulumi