1. Packages
  2. Cyral Provider
  3. API Docs
  4. getSidecarCftTemplate
cyral 4.16.3 published on Monday, Apr 14, 2025 by cyralinc

cyral.getSidecarCftTemplate

Explore with Pulumi AI

cyral logo
cyral 4.16.3 published on Monday, Apr 14, 2025 by cyralinc

    # cyral.getSidecarCftTemplate (Data Source)

    DEPRECATED This data source has been deprecated. It will be removed in the next major version of the provider and no longer works for control planes v4.13 and later.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cyral from "@pulumi/cyral";
    
    const someDataSourceName = cyral.getSidecarCftTemplate({
        sidecarId: cyral_sidecar.SOME_SIDECAR_RESOURCE_NAME.id,
        logIntegrationId: SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.id,
        metricsIntegrationId: SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.id,
        awsConfigurations: [{
            publiclyAccessible: false,
            keyName: "some-ec2-key-name",
        }],
    });
    
    import pulumi
    import pulumi_cyral as cyral
    
    some_data_source_name = cyral.get_sidecar_cft_template(sidecar_id=cyral_sidecar["SOME_SIDECAR_RESOURCE_NAME"]["id"],
        log_integration_id=som_e__cyra_l__integration["SOME_INTEGRATION_NAME"]["id"],
        metrics_integration_id=som_e__cyra_l__integration["SOME_INTEGRATION_NAME"]["id"],
        aws_configurations=[{
            "publicly_accessible": False,
            "key_name": "some-ec2-key-name",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cyral/v4/cyral"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cyral.GetSidecarCftTemplate(ctx, &cyral.GetSidecarCftTemplateArgs{
    			SidecarId:            cyral_sidecar.SOME_SIDECAR_RESOURCE_NAME.Id,
    			LogIntegrationId:     pulumi.StringRef(SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.Id),
    			MetricsIntegrationId: pulumi.StringRef(SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.Id),
    			AwsConfigurations: []cyral.GetSidecarCftTemplateAwsConfiguration{
    				{
    					PubliclyAccessible: false,
    					KeyName:            pulumi.StringRef("some-ec2-key-name"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cyral = Pulumi.Cyral;
    
    return await Deployment.RunAsync(() => 
    {
        var someDataSourceName = Cyral.GetSidecarCftTemplate.Invoke(new()
        {
            SidecarId = cyral_sidecar.SOME_SIDECAR_RESOURCE_NAME.Id,
            LogIntegrationId = SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.Id,
            MetricsIntegrationId = SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.Id,
            AwsConfigurations = new[]
            {
                new Cyral.Inputs.GetSidecarCftTemplateAwsConfigurationInputArgs
                {
                    PubliclyAccessible = false,
                    KeyName = "some-ec2-key-name",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cyral.CyralFunctions;
    import com.pulumi.cyral.inputs.GetSidecarCftTemplateArgs;
    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 someDataSourceName = CyralFunctions.getSidecarCftTemplate(GetSidecarCftTemplateArgs.builder()
                .sidecarId(cyral_sidecar.SOME_SIDECAR_RESOURCE_NAME().id())
                .logIntegrationId(SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME().id())
                .metricsIntegrationId(SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME().id())
                .awsConfigurations(GetSidecarCftTemplateAwsConfigurationArgs.builder()
                    .publiclyAccessible(false)
                    .keyName("some-ec2-key-name")
                    .build())
                .build());
    
        }
    }
    
    variables:
      someDataSourceName:
        fn::invoke:
          function: cyral:getSidecarCftTemplate
          arguments:
            sidecarId: ${cyral_sidecar.SOME_SIDECAR_RESOURCE_NAME.id}
            logIntegrationId: ${SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.id}
            metricsIntegrationId: ${SOME_CYRAL_INTEGRATION.SOME_INTEGRATION_NAME.id}
            awsConfigurations:
              - publiclyAccessible: false
                keyName: some-ec2-key-name
    

    To configure credentials for the parameters SidecarClientID and SidecarClientSecret of the template, see the Sidecar Credentials Resource.

    Using getSidecarCftTemplate

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSidecarCftTemplate(args: GetSidecarCftTemplateArgs, opts?: InvokeOptions): Promise<GetSidecarCftTemplateResult>
    function getSidecarCftTemplateOutput(args: GetSidecarCftTemplateOutputArgs, opts?: InvokeOptions): Output<GetSidecarCftTemplateResult>
    def get_sidecar_cft_template(aws_configurations: Optional[Sequence[GetSidecarCftTemplateAwsConfiguration]] = None,
                                 log_integration_id: Optional[str] = None,
                                 metrics_integration_id: Optional[str] = None,
                                 sidecar_id: Optional[str] = None,
                                 template: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetSidecarCftTemplateResult
    def get_sidecar_cft_template_output(aws_configurations: Optional[pulumi.Input[Sequence[pulumi.Input[GetSidecarCftTemplateAwsConfigurationArgs]]]] = None,
                                 log_integration_id: Optional[pulumi.Input[str]] = None,
                                 metrics_integration_id: Optional[pulumi.Input[str]] = None,
                                 sidecar_id: Optional[pulumi.Input[str]] = None,
                                 template: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetSidecarCftTemplateResult]
    func GetSidecarCftTemplate(ctx *Context, args *GetSidecarCftTemplateArgs, opts ...InvokeOption) (*GetSidecarCftTemplateResult, error)
    func GetSidecarCftTemplateOutput(ctx *Context, args *GetSidecarCftTemplateOutputArgs, opts ...InvokeOption) GetSidecarCftTemplateResultOutput

    > Note: This function is named GetSidecarCftTemplate in the Go SDK.

    public static class GetSidecarCftTemplate 
    {
        public static Task<GetSidecarCftTemplateResult> InvokeAsync(GetSidecarCftTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetSidecarCftTemplateResult> Invoke(GetSidecarCftTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSidecarCftTemplateResult> getSidecarCftTemplate(GetSidecarCftTemplateArgs args, InvokeOptions options)
    public static Output<GetSidecarCftTemplateResult> getSidecarCftTemplate(GetSidecarCftTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cyral:index/getSidecarCftTemplate:getSidecarCftTemplate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AwsConfigurations List<GetSidecarCftTemplateAwsConfiguration>
    AWS parameters for cft-ec2 deployment method.
    SidecarId string
    ID of the sidecar which the template will be generated.
    LogIntegrationId string
    ID of the log integration that will be used by this template.
    MetricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    Template string
    Output variable with the template.
    AwsConfigurations []GetSidecarCftTemplateAwsConfiguration
    AWS parameters for cft-ec2 deployment method.
    SidecarId string
    ID of the sidecar which the template will be generated.
    LogIntegrationId string
    ID of the log integration that will be used by this template.
    MetricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    Template string
    Output variable with the template.
    awsConfigurations List<GetSidecarCftTemplateAwsConfiguration>
    AWS parameters for cft-ec2 deployment method.
    sidecarId String
    ID of the sidecar which the template will be generated.
    logIntegrationId String
    ID of the log integration that will be used by this template.
    metricsIntegrationId String
    ID of the metrics integration that will be used by this template.
    template String
    Output variable with the template.
    awsConfigurations GetSidecarCftTemplateAwsConfiguration[]
    AWS parameters for cft-ec2 deployment method.
    sidecarId string
    ID of the sidecar which the template will be generated.
    logIntegrationId string
    ID of the log integration that will be used by this template.
    metricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    template string
    Output variable with the template.
    aws_configurations Sequence[GetSidecarCftTemplateAwsConfiguration]
    AWS parameters for cft-ec2 deployment method.
    sidecar_id str
    ID of the sidecar which the template will be generated.
    log_integration_id str
    ID of the log integration that will be used by this template.
    metrics_integration_id str
    ID of the metrics integration that will be used by this template.
    template str
    Output variable with the template.
    awsConfigurations List<Property Map>
    AWS parameters for cft-ec2 deployment method.
    sidecarId String
    ID of the sidecar which the template will be generated.
    logIntegrationId String
    ID of the log integration that will be used by this template.
    metricsIntegrationId String
    ID of the metrics integration that will be used by this template.
    template String
    Output variable with the template.

    getSidecarCftTemplate Result

    The following output properties are available:

    AwsConfigurations List<GetSidecarCftTemplateAwsConfiguration>
    AWS parameters for cft-ec2 deployment method.
    Id string
    Same as sidecar_id.
    SidecarId string
    ID of the sidecar which the template will be generated.
    Template string
    Output variable with the template.
    LogIntegrationId string
    ID of the log integration that will be used by this template.
    MetricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    AwsConfigurations []GetSidecarCftTemplateAwsConfiguration
    AWS parameters for cft-ec2 deployment method.
    Id string
    Same as sidecar_id.
    SidecarId string
    ID of the sidecar which the template will be generated.
    Template string
    Output variable with the template.
    LogIntegrationId string
    ID of the log integration that will be used by this template.
    MetricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    awsConfigurations List<GetSidecarCftTemplateAwsConfiguration>
    AWS parameters for cft-ec2 deployment method.
    id String
    Same as sidecar_id.
    sidecarId String
    ID of the sidecar which the template will be generated.
    template String
    Output variable with the template.
    logIntegrationId String
    ID of the log integration that will be used by this template.
    metricsIntegrationId String
    ID of the metrics integration that will be used by this template.
    awsConfigurations GetSidecarCftTemplateAwsConfiguration[]
    AWS parameters for cft-ec2 deployment method.
    id string
    Same as sidecar_id.
    sidecarId string
    ID of the sidecar which the template will be generated.
    template string
    Output variable with the template.
    logIntegrationId string
    ID of the log integration that will be used by this template.
    metricsIntegrationId string
    ID of the metrics integration that will be used by this template.
    aws_configurations Sequence[GetSidecarCftTemplateAwsConfiguration]
    AWS parameters for cft-ec2 deployment method.
    id str
    Same as sidecar_id.
    sidecar_id str
    ID of the sidecar which the template will be generated.
    template str
    Output variable with the template.
    log_integration_id str
    ID of the log integration that will be used by this template.
    metrics_integration_id str
    ID of the metrics integration that will be used by this template.
    awsConfigurations List<Property Map>
    AWS parameters for cft-ec2 deployment method.
    id String
    Same as sidecar_id.
    sidecarId String
    ID of the sidecar which the template will be generated.
    template String
    Output variable with the template.
    logIntegrationId String
    ID of the log integration that will be used by this template.
    metricsIntegrationId String
    ID of the metrics integration that will be used by this template.

    Supporting Types

    GetSidecarCftTemplateAwsConfiguration

    PubliclyAccessible bool
    Defines a public IP and an internet-facing LB if set to true.
    KeyName string
    Key-pair name that will be associated to the sidecar EC2 instances.
    PubliclyAccessible bool
    Defines a public IP and an internet-facing LB if set to true.
    KeyName string
    Key-pair name that will be associated to the sidecar EC2 instances.
    publiclyAccessible Boolean
    Defines a public IP and an internet-facing LB if set to true.
    keyName String
    Key-pair name that will be associated to the sidecar EC2 instances.
    publiclyAccessible boolean
    Defines a public IP and an internet-facing LB if set to true.
    keyName string
    Key-pair name that will be associated to the sidecar EC2 instances.
    publicly_accessible bool
    Defines a public IP and an internet-facing LB if set to true.
    key_name str
    Key-pair name that will be associated to the sidecar EC2 instances.
    publiclyAccessible Boolean
    Defines a public IP and an internet-facing LB if set to true.
    keyName String
    Key-pair name that will be associated to the sidecar EC2 instances.

    Package Details

    Repository
    cyral cyralinc/terraform-provider-cyral
    License
    Notes
    This Pulumi package is based on the cyral Terraform Provider.
    cyral logo
    cyral 4.16.3 published on Monday, Apr 14, 2025 by cyralinc