1. Packages
  2. Snowflake
  3. API Docs
  4. getSystemGetPrivateLinkConfig
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

snowflake.getSystemGetPrivateLinkConfig

Explore with Pulumi AI

snowflake logo
Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as snowflake from "@pulumi/snowflake";
    
    const snowflakePrivateLink = snowflake.getSystemGetPrivateLinkConfig({});
    const snowflakePrivateLinkSecurityGroup = new aws.index.SecurityGroup("snowflake_private_link", {
        vpcId: vpcId,
        ingress: [
            {
                fromPort: 80,
                toPort: 80,
                cidrBlocks: vpcCidr,
                protocol: "tcp",
            },
            {
                fromPort: 443,
                toPort: 443,
                cidrBlocks: vpcCidr,
                protocol: "tcp",
            },
        ],
    });
    const snowflakePrivateLinkVpcEndpoint = new aws.index.VpcEndpoint("snowflake_private_link", {
        vpcId: vpcId,
        serviceName: snowflakePrivateLink.awsVpceId,
        vpcEndpointType: "Interface",
        securityGroupIds: [snowflakePrivateLinkSecurityGroup.id],
        subnetIds: subnetIds,
        privateDnsEnabled: false,
    });
    const snowflakePrivateLinkRoute53Zone = new aws.index.Route53Zone("snowflake_private_link", {
        name: "privatelink.snowflakecomputing.com",
        vpc: [{
            vpcId: vpcId,
        }],
    });
    const snowflakePrivateLinkUrl = new aws.index.Route53Record("snowflake_private_link_url", {
        zoneId: snowflakePrivateLinkRoute53Zone.zoneId,
        name: snowflakePrivateLink.accountUrl,
        type: "CNAME",
        ttl: "300",
        records: [snowflakePrivateLinkVpcEndpoint.dnsEntry[0].dns_name],
    });
    const snowflakePrivateLinkOcspUrl = new aws.index.Route53Record("snowflake_private_link_ocsp_url", {
        zoneId: snowflakePrivateLinkRoute53Zone.zoneId,
        name: snowflakePrivateLink.ocspUrl,
        type: "CNAME",
        ttl: "300",
        records: [snowflakePrivateLinkVpcEndpoint.dnsEntry[0].dns_name],
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_snowflake as snowflake
    
    snowflake_private_link = snowflake.get_system_get_private_link_config()
    snowflake_private_link_security_group = aws.index.SecurityGroup("snowflake_private_link",
        vpc_id=vpc_id,
        ingress=[
            {
                fromPort: 80,
                toPort: 80,
                cidrBlocks: vpc_cidr,
                protocol: tcp,
            },
            {
                fromPort: 443,
                toPort: 443,
                cidrBlocks: vpc_cidr,
                protocol: tcp,
            },
        ])
    snowflake_private_link_vpc_endpoint = aws.index.VpcEndpoint("snowflake_private_link",
        vpc_id=vpc_id,
        service_name=snowflake_private_link.aws_vpce_id,
        vpc_endpoint_type=Interface,
        security_group_ids=[snowflake_private_link_security_group.id],
        subnet_ids=subnet_ids,
        private_dns_enabled=False)
    snowflake_private_link_route53_zone = aws.index.Route53Zone("snowflake_private_link",
        name=privatelink.snowflakecomputing.com,
        vpc=[{
            vpcId: vpc_id,
        }])
    snowflake_private_link_url = aws.index.Route53Record("snowflake_private_link_url",
        zone_id=snowflake_private_link_route53_zone.zone_id,
        name=snowflake_private_link.account_url,
        type=CNAME,
        ttl=300,
        records=[snowflake_private_link_vpc_endpoint.dns_entry[0].dns_name])
    snowflake_private_link_ocsp_url = aws.index.Route53Record("snowflake_private_link_ocsp_url",
        zone_id=snowflake_private_link_route53_zone.zone_id,
        name=snowflake_private_link.ocsp_url,
        type=CNAME,
        ttl=300,
        records=[snowflake_private_link_vpc_endpoint.dns_entry[0].dns_name])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws"
    	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		snowflakePrivateLink, err := snowflake.GetSystemGetPrivateLinkConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		snowflakePrivateLinkSecurityGroup, err := aws.NewSecurityGroup(ctx, "snowflake_private_link", &aws.SecurityGroupArgs{
    			VpcId: vpcId,
    			Ingress: []interface{}{
    				map[string]interface{}{
    					"fromPort":   80,
    					"toPort":     80,
    					"cidrBlocks": vpcCidr,
    					"protocol":   "tcp",
    				},
    				map[string]interface{}{
    					"fromPort":   443,
    					"toPort":     443,
    					"cidrBlocks": vpcCidr,
    					"protocol":   "tcp",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		snowflakePrivateLinkVpcEndpoint, err := aws.NewVpcEndpoint(ctx, "snowflake_private_link", &aws.VpcEndpointArgs{
    			VpcId:           vpcId,
    			ServiceName:     snowflakePrivateLink.AwsVpceId,
    			VpcEndpointType: "Interface",
    			SecurityGroupIds: []interface{}{
    				snowflakePrivateLinkSecurityGroup.Id,
    			},
    			SubnetIds:         subnetIds,
    			PrivateDnsEnabled: false,
    		})
    		if err != nil {
    			return err
    		}
    		snowflakePrivateLinkRoute53Zone, err := aws.NewRoute53Zone(ctx, "snowflake_private_link", &aws.Route53ZoneArgs{
    			Name: "privatelink.snowflakecomputing.com",
    			Vpc: []map[string]interface{}{
    				map[string]interface{}{
    					"vpcId": vpcId,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewRoute53Record(ctx, "snowflake_private_link_url", &aws.Route53RecordArgs{
    			ZoneId: snowflakePrivateLinkRoute53Zone.ZoneId,
    			Name:   snowflakePrivateLink.AccountUrl,
    			Type:   "CNAME",
    			Ttl:    "300",
    			Records: []interface{}{
    				snowflakePrivateLinkVpcEndpoint.DnsEntry[0].Dns_name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = aws.NewRoute53Record(ctx, "snowflake_private_link_ocsp_url", &aws.Route53RecordArgs{
    			ZoneId: snowflakePrivateLinkRoute53Zone.ZoneId,
    			Name:   snowflakePrivateLink.OcspUrl,
    			Type:   "CNAME",
    			Ttl:    "300",
    			Records: []interface{}{
    				snowflakePrivateLinkVpcEndpoint.DnsEntry[0].Dns_name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        var snowflakePrivateLink = Snowflake.GetSystemGetPrivateLinkConfig.Invoke();
    
        var snowflakePrivateLinkSecurityGroup = new Aws.Index.SecurityGroup("snowflake_private_link", new()
        {
            VpcId = vpcId,
            Ingress = new[]
            {
                
                {
                    { "fromPort", 80 },
                    { "toPort", 80 },
                    { "cidrBlocks", vpcCidr },
                    { "protocol", "tcp" },
                },
                
                {
                    { "fromPort", 443 },
                    { "toPort", 443 },
                    { "cidrBlocks", vpcCidr },
                    { "protocol", "tcp" },
                },
            },
        });
    
        var snowflakePrivateLinkVpcEndpoint = new Aws.Index.VpcEndpoint("snowflake_private_link", new()
        {
            VpcId = vpcId,
            ServiceName = snowflakePrivateLink.Apply(getSystemGetPrivateLinkConfigResult => getSystemGetPrivateLinkConfigResult.AwsVpceId),
            VpcEndpointType = "Interface",
            SecurityGroupIds = new[]
            {
                snowflakePrivateLinkSecurityGroup.Id,
            },
            SubnetIds = subnetIds,
            PrivateDnsEnabled = false,
        });
    
        var snowflakePrivateLinkRoute53Zone = new Aws.Index.Route53Zone("snowflake_private_link", new()
        {
            Name = "privatelink.snowflakecomputing.com",
            Vpc = new[]
            {
                
                {
                    { "vpcId", vpcId },
                },
            },
        });
    
        var snowflakePrivateLinkUrl = new Aws.Index.Route53Record("snowflake_private_link_url", new()
        {
            ZoneId = snowflakePrivateLinkRoute53Zone.ZoneId,
            Name = snowflakePrivateLink.Apply(getSystemGetPrivateLinkConfigResult => getSystemGetPrivateLinkConfigResult.AccountUrl),
            Type = "CNAME",
            Ttl = "300",
            Records = new[]
            {
                snowflakePrivateLinkVpcEndpoint.DnsEntry[0].Dns_name,
            },
        });
    
        var snowflakePrivateLinkOcspUrl = new Aws.Index.Route53Record("snowflake_private_link_ocsp_url", new()
        {
            ZoneId = snowflakePrivateLinkRoute53Zone.ZoneId,
            Name = snowflakePrivateLink.Apply(getSystemGetPrivateLinkConfigResult => getSystemGetPrivateLinkConfigResult.OcspUrl),
            Type = "CNAME",
            Ttl = "300",
            Records = new[]
            {
                snowflakePrivateLinkVpcEndpoint.DnsEntry[0].Dns_name,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.SnowflakeFunctions;
    import com.pulumi.aws.securityGroup;
    import com.pulumi.aws.SecurityGroupArgs;
    import com.pulumi.aws.vpcEndpoint;
    import com.pulumi.aws.VpcEndpointArgs;
    import com.pulumi.aws.route53Zone;
    import com.pulumi.aws.Route53ZoneArgs;
    import com.pulumi.aws.route53Record;
    import com.pulumi.aws.Route53RecordArgs;
    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 snowflakePrivateLink = SnowflakeFunctions.getSystemGetPrivateLinkConfig();
    
            var snowflakePrivateLinkSecurityGroup = new SecurityGroup("snowflakePrivateLinkSecurityGroup", SecurityGroupArgs.builder()
                .vpcId(vpcId)
                .ingress(            
                    %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
                    %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
            var snowflakePrivateLinkVpcEndpoint = new VpcEndpoint("snowflakePrivateLinkVpcEndpoint", VpcEndpointArgs.builder()
                .vpcId(vpcId)
                .serviceName(snowflakePrivateLink.applyValue(getSystemGetPrivateLinkConfigResult -> getSystemGetPrivateLinkConfigResult.awsVpceId()))
                .vpcEndpointType("Interface")
                .securityGroupIds(snowflakePrivateLinkSecurityGroup.id())
                .subnetIds(subnetIds)
                .privateDnsEnabled(false)
                .build());
    
            var snowflakePrivateLinkRoute53Zone = new Route53Zone("snowflakePrivateLinkRoute53Zone", Route53ZoneArgs.builder()
                .name("privatelink.snowflakecomputing.com")
                .vpc(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                .build());
    
            var snowflakePrivateLinkUrl = new Route53Record("snowflakePrivateLinkUrl", Route53RecordArgs.builder()
                .zoneId(snowflakePrivateLinkRoute53Zone.zoneId())
                .name(snowflakePrivateLink.applyValue(getSystemGetPrivateLinkConfigResult -> getSystemGetPrivateLinkConfigResult.accountUrl()))
                .type("CNAME")
                .ttl("300")
                .records(snowflakePrivateLinkVpcEndpoint.dnsEntry()[0].dns_name())
                .build());
    
            var snowflakePrivateLinkOcspUrl = new Route53Record("snowflakePrivateLinkOcspUrl", Route53RecordArgs.builder()
                .zoneId(snowflakePrivateLinkRoute53Zone.zoneId())
                .name(snowflakePrivateLink.applyValue(getSystemGetPrivateLinkConfigResult -> getSystemGetPrivateLinkConfigResult.ocspUrl()))
                .type("CNAME")
                .ttl("300")
                .records(snowflakePrivateLinkVpcEndpoint.dnsEntry()[0].dns_name())
                .build());
    
        }
    }
    
    resources:
      snowflakePrivateLinkSecurityGroup:
        type: aws:securityGroup
        name: snowflake_private_link
        properties:
          vpcId: ${vpcId}
          ingress:
            - fromPort: 80
              toPort: 80
              cidrBlocks: ${vpcCidr}
              protocol: tcp
            - fromPort: 443
              toPort: 443
              cidrBlocks: ${vpcCidr}
              protocol: tcp
      snowflakePrivateLinkVpcEndpoint:
        type: aws:vpcEndpoint
        name: snowflake_private_link
        properties:
          vpcId: ${vpcId}
          serviceName: ${snowflakePrivateLink.awsVpceId}
          vpcEndpointType: Interface
          securityGroupIds:
            - ${snowflakePrivateLinkSecurityGroup.id}
          subnetIds: ${subnetIds}
          privateDnsEnabled: false
      snowflakePrivateLinkRoute53Zone:
        type: aws:route53Zone
        name: snowflake_private_link
        properties:
          name: privatelink.snowflakecomputing.com
          vpc:
            - vpcId: ${vpcId}
      snowflakePrivateLinkUrl:
        type: aws:route53Record
        name: snowflake_private_link_url
        properties:
          zoneId: ${snowflakePrivateLinkRoute53Zone.zoneId}
          name: ${snowflakePrivateLink.accountUrl}
          type: CNAME
          ttl: '300'
          records:
            - ${snowflakePrivateLinkVpcEndpoint.dnsEntry[0].dns_name}
      snowflakePrivateLinkOcspUrl:
        type: aws:route53Record
        name: snowflake_private_link_ocsp_url
        properties:
          zoneId: ${snowflakePrivateLinkRoute53Zone.zoneId}
          name: ${snowflakePrivateLink.ocspUrl}
          type: CNAME
          ttl: '300'
          records:
            - ${snowflakePrivateLinkVpcEndpoint.dnsEntry[0].dns_name}
    variables:
      snowflakePrivateLink:
        fn::invoke:
          Function: snowflake:getSystemGetPrivateLinkConfig
          Arguments: {}
    

    Using getSystemGetPrivateLinkConfig

    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 getSystemGetPrivateLinkConfig(opts?: InvokeOptions): Promise<GetSystemGetPrivateLinkConfigResult>
    function getSystemGetPrivateLinkConfigOutput(opts?: InvokeOptions): Output<GetSystemGetPrivateLinkConfigResult>
    def get_system_get_private_link_config(opts: Optional[InvokeOptions] = None) -> GetSystemGetPrivateLinkConfigResult
    def get_system_get_private_link_config_output(opts: Optional[InvokeOptions] = None) -> Output[GetSystemGetPrivateLinkConfigResult]
    func GetSystemGetPrivateLinkConfig(ctx *Context, opts ...InvokeOption) (*GetSystemGetPrivateLinkConfigResult, error)
    func GetSystemGetPrivateLinkConfigOutput(ctx *Context, opts ...InvokeOption) GetSystemGetPrivateLinkConfigResultOutput

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

    public static class GetSystemGetPrivateLinkConfig 
    {
        public static Task<GetSystemGetPrivateLinkConfigResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetSystemGetPrivateLinkConfigResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSystemGetPrivateLinkConfigResult> getSystemGetPrivateLinkConfig(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: snowflake:index/getSystemGetPrivateLinkConfig:getSystemGetPrivateLinkConfig
      arguments:
        # arguments dictionary

    getSystemGetPrivateLinkConfig Result

    The following output properties are available:

    AccountName string
    The name of your Snowflake account.
    AccountUrl string
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    AwsVpceId string
    The AWS VPCE ID for your account.
    AzurePlsId string
    The Azure Private Link Service ID for your account.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalStage string
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    OcspUrl string
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    RegionlessAccountUrl string
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    RegionlessSnowsightUrl string
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    SnowsightUrl string
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.
    AccountName string
    The name of your Snowflake account.
    AccountUrl string
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    AwsVpceId string
    The AWS VPCE ID for your account.
    AzurePlsId string
    The Azure Private Link Service ID for your account.
    Id string
    The provider-assigned unique ID for this managed resource.
    InternalStage string
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    OcspUrl string
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    RegionlessAccountUrl string
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    RegionlessSnowsightUrl string
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    SnowsightUrl string
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.
    accountName String
    The name of your Snowflake account.
    accountUrl String
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    awsVpceId String
    The AWS VPCE ID for your account.
    azurePlsId String
    The Azure Private Link Service ID for your account.
    id String
    The provider-assigned unique ID for this managed resource.
    internalStage String
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    ocspUrl String
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    regionlessAccountUrl String
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    regionlessSnowsightUrl String
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    snowsightUrl String
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.
    accountName string
    The name of your Snowflake account.
    accountUrl string
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    awsVpceId string
    The AWS VPCE ID for your account.
    azurePlsId string
    The Azure Private Link Service ID for your account.
    id string
    The provider-assigned unique ID for this managed resource.
    internalStage string
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    ocspUrl string
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    regionlessAccountUrl string
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    regionlessSnowsightUrl string
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    snowsightUrl string
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.
    account_name str
    The name of your Snowflake account.
    account_url str
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    aws_vpce_id str
    The AWS VPCE ID for your account.
    azure_pls_id str
    The Azure Private Link Service ID for your account.
    id str
    The provider-assigned unique ID for this managed resource.
    internal_stage str
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    ocsp_url str
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    regionless_account_url str
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    regionless_snowsight_url str
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    snowsight_url str
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.
    accountName String
    The name of your Snowflake account.
    accountUrl String
    The URL used to connect to Snowflake through AWS PrivateLink or Azure Private Link.
    awsVpceId String
    The AWS VPCE ID for your account.
    azurePlsId String
    The Azure Private Link Service ID for your account.
    id String
    The provider-assigned unique ID for this managed resource.
    internalStage String
    The endpoint to connect to your Snowflake internal stage using AWS PrivateLink or Azure Private Link.
    ocspUrl String
    The OCSP URL corresponding to your Snowflake account that uses AWS PrivateLink or Azure Private Link.
    regionlessAccountUrl String
    The regionless URL to connect to your Snowflake account using AWS PrivateLink, Azure Private Link, or Google Cloud Private Service Connect.
    regionlessSnowsightUrl String
    The URL for your organization to access Snowsight using Private Connectivity to the Snowflake Service.
    snowsightUrl String
    The URL containing the cloud region to access Snowsight and the Snowflake Marketplace using Private Connectivity to the Snowflake Service.

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v0.59.0 published on Friday, Sep 20, 2024 by Pulumi