Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.vedb_mysql.Allowlists
Explore with Pulumi AI
Use this data source to query detailed information of vedb mysql allowlists
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooAllowlist = new volcengine.vedb_mysql.Allowlist("fooAllowlist", {
    allowListName: "acc-test-allowlist",
    allowListDesc: "acc-test",
    allowListType: "IPv4",
    allowLists: [
        "192.168.0.0/24",
        "192.168.1.0/24",
        "192.168.2.0/24",
    ],
});
const fooZones = volcengine.ecs.Zones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
    vpcName: "acc-test-vpc",
    cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
    subnetName: "acc-test-subnet",
    cidrBlock: "172.16.0.0/24",
    zoneId: fooZones.then(fooZones => fooZones.zones?.[2]?.id),
    vpcId: fooVpc.id,
});
const fooInstance = new volcengine.vedb_mysql.Instance("fooInstance", {
    chargeType: "PostPaid",
    storageChargeType: "PostPaid",
    dbEngineVersion: "MySQL_8_0",
    dbMinorVersion: "3.0",
    nodeNumber: 2,
    nodeSpec: "vedb.mysql.x4.large",
    subnetId: fooSubnet.id,
    instanceName: "tf-test",
    projectName: "testA",
    tags: [
        {
            key: "tftest",
            value: "tftest",
        },
        {
            key: "tftest2",
            value: "tftest2",
        },
    ],
});
const fooAllowlistAssociate = new volcengine.vedb_mysql.AllowlistAssociate("fooAllowlistAssociate", {
    allowListId: fooAllowlist.id,
    instanceId: fooInstance.id,
});
const fooAllowlists = volcengine.vedb_mysql.AllowlistsOutput({
    instanceId: fooInstance.id,
});
import pulumi
import pulumi_volcengine as volcengine
foo_allowlist = volcengine.vedb_mysql.Allowlist("fooAllowlist",
    allow_list_name="acc-test-allowlist",
    allow_list_desc="acc-test",
    allow_list_type="IPv4",
    allow_lists=[
        "192.168.0.0/24",
        "192.168.1.0/24",
        "192.168.2.0/24",
    ])
foo_zones = volcengine.ecs.zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
    vpc_name="acc-test-vpc",
    cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
    subnet_name="acc-test-subnet",
    cidr_block="172.16.0.0/24",
    zone_id=foo_zones.zones[2].id,
    vpc_id=foo_vpc.id)
foo_instance = volcengine.vedb_mysql.Instance("fooInstance",
    charge_type="PostPaid",
    storage_charge_type="PostPaid",
    db_engine_version="MySQL_8_0",
    db_minor_version="3.0",
    node_number=2,
    node_spec="vedb.mysql.x4.large",
    subnet_id=foo_subnet.id,
    instance_name="tf-test",
    project_name="testA",
    tags=[
        volcengine.vedb_mysql.InstanceTagArgs(
            key="tftest",
            value="tftest",
        ),
        volcengine.vedb_mysql.InstanceTagArgs(
            key="tftest2",
            value="tftest2",
        ),
    ])
foo_allowlist_associate = volcengine.vedb_mysql.AllowlistAssociate("fooAllowlistAssociate",
    allow_list_id=foo_allowlist.id,
    instance_id=foo_instance.id)
foo_allowlists = volcengine.vedb_mysql.allowlists_output(instance_id=foo_instance.id)
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vedb_mysql"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooAllowlist, err := vedb_mysql.NewAllowlist(ctx, "fooAllowlist", &vedb_mysql.AllowlistArgs{
			AllowListName: pulumi.String("acc-test-allowlist"),
			AllowListDesc: pulumi.String("acc-test"),
			AllowListType: pulumi.String("IPv4"),
			AllowLists: pulumi.StringArray{
				pulumi.String("192.168.0.0/24"),
				pulumi.String("192.168.1.0/24"),
				pulumi.String("192.168.2.0/24"),
			},
		})
		if err != nil {
			return err
		}
		fooZones, err := ecs.Zones(ctx, nil, nil)
		if err != nil {
			return err
		}
		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
			VpcName:   pulumi.String("acc-test-vpc"),
			CidrBlock: pulumi.String("172.16.0.0/16"),
		})
		if err != nil {
			return err
		}
		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
			SubnetName: pulumi.String("acc-test-subnet"),
			CidrBlock:  pulumi.String("172.16.0.0/24"),
			ZoneId:     pulumi.String(fooZones.Zones[2].Id),
			VpcId:      fooVpc.ID(),
		})
		if err != nil {
			return err
		}
		fooInstance, err := vedb_mysql.NewInstance(ctx, "fooInstance", &vedb_mysql.InstanceArgs{
			ChargeType:        pulumi.String("PostPaid"),
			StorageChargeType: pulumi.String("PostPaid"),
			DbEngineVersion:   pulumi.String("MySQL_8_0"),
			DbMinorVersion:    pulumi.String("3.0"),
			NodeNumber:        pulumi.Int(2),
			NodeSpec:          pulumi.String("vedb.mysql.x4.large"),
			SubnetId:          fooSubnet.ID(),
			InstanceName:      pulumi.String("tf-test"),
			ProjectName:       pulumi.String("testA"),
			Tags: vedb_mysql.InstanceTagArray{
				&vedb_mysql.InstanceTagArgs{
					Key:   pulumi.String("tftest"),
					Value: pulumi.String("tftest"),
				},
				&vedb_mysql.InstanceTagArgs{
					Key:   pulumi.String("tftest2"),
					Value: pulumi.String("tftest2"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = vedb_mysql.NewAllowlistAssociate(ctx, "fooAllowlistAssociate", &vedb_mysql.AllowlistAssociateArgs{
			AllowListId: fooAllowlist.ID(),
			InstanceId:  fooInstance.ID(),
		})
		if err != nil {
			return err
		}
		_ = vedb_mysql.AllowlistsOutput(ctx, vedb_mysql.AllowlistsOutputArgs{
			InstanceId: fooInstance.ID(),
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var fooAllowlist = new Volcengine.Vedb_mysql.Allowlist("fooAllowlist", new()
    {
        AllowListName = "acc-test-allowlist",
        AllowListDesc = "acc-test",
        AllowListType = "IPv4",
        AllowLists = new[]
        {
            "192.168.0.0/24",
            "192.168.1.0/24",
            "192.168.2.0/24",
        },
    });
    var fooZones = Volcengine.Ecs.Zones.Invoke();
    var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
    {
        VpcName = "acc-test-vpc",
        CidrBlock = "172.16.0.0/16",
    });
    var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
    {
        SubnetName = "acc-test-subnet",
        CidrBlock = "172.16.0.0/24",
        ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[2]?.Id),
        VpcId = fooVpc.Id,
    });
    var fooInstance = new Volcengine.Vedb_mysql.Instance("fooInstance", new()
    {
        ChargeType = "PostPaid",
        StorageChargeType = "PostPaid",
        DbEngineVersion = "MySQL_8_0",
        DbMinorVersion = "3.0",
        NodeNumber = 2,
        NodeSpec = "vedb.mysql.x4.large",
        SubnetId = fooSubnet.Id,
        InstanceName = "tf-test",
        ProjectName = "testA",
        Tags = new[]
        {
            new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
            {
                Key = "tftest",
                Value = "tftest",
            },
            new Volcengine.Vedb_mysql.Inputs.InstanceTagArgs
            {
                Key = "tftest2",
                Value = "tftest2",
            },
        },
    });
    var fooAllowlistAssociate = new Volcengine.Vedb_mysql.AllowlistAssociate("fooAllowlistAssociate", new()
    {
        AllowListId = fooAllowlist.Id,
        InstanceId = fooInstance.Id,
    });
    var fooAllowlists = Volcengine.Vedb_mysql.Allowlists.Invoke(new()
    {
        InstanceId = fooInstance.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vedb_mysql.Allowlist;
import com.pulumi.volcengine.vedb_mysql.AllowlistArgs;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.ZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.vedb_mysql.Instance;
import com.pulumi.volcengine.vedb_mysql.InstanceArgs;
import com.pulumi.volcengine.vedb_mysql.inputs.InstanceTagArgs;
import com.pulumi.volcengine.vedb_mysql.AllowlistAssociate;
import com.pulumi.volcengine.vedb_mysql.AllowlistAssociateArgs;
import com.pulumi.volcengine.vedb_mysql.Vedb_mysqlFunctions;
import com.pulumi.volcengine.vedb_mysql.inputs.AllowlistsArgs;
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 fooAllowlist = new Allowlist("fooAllowlist", AllowlistArgs.builder()        
            .allowListName("acc-test-allowlist")
            .allowListDesc("acc-test")
            .allowListType("IPv4")
            .allowLists(            
                "192.168.0.0/24",
                "192.168.1.0/24",
                "192.168.2.0/24")
            .build());
        final var fooZones = EcsFunctions.Zones();
        var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
            .vpcName("acc-test-vpc")
            .cidrBlock("172.16.0.0/16")
            .build());
        var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
            .subnetName("acc-test-subnet")
            .cidrBlock("172.16.0.0/24")
            .zoneId(fooZones.applyValue(zonesResult -> zonesResult.zones()[2].id()))
            .vpcId(fooVpc.id())
            .build());
        var fooInstance = new Instance("fooInstance", InstanceArgs.builder()        
            .chargeType("PostPaid")
            .storageChargeType("PostPaid")
            .dbEngineVersion("MySQL_8_0")
            .dbMinorVersion("3.0")
            .nodeNumber(2)
            .nodeSpec("vedb.mysql.x4.large")
            .subnetId(fooSubnet.id())
            .instanceName("tf-test")
            .projectName("testA")
            .tags(            
                InstanceTagArgs.builder()
                    .key("tftest")
                    .value("tftest")
                    .build(),
                InstanceTagArgs.builder()
                    .key("tftest2")
                    .value("tftest2")
                    .build())
            .build());
        var fooAllowlistAssociate = new AllowlistAssociate("fooAllowlistAssociate", AllowlistAssociateArgs.builder()        
            .allowListId(fooAllowlist.id())
            .instanceId(fooInstance.id())
            .build());
        final var fooAllowlists = Vedb_mysqlFunctions.Allowlists(AllowlistsArgs.builder()
            .instanceId(fooInstance.id())
            .build());
    }
}
resources:
  fooAllowlist:
    type: volcengine:vedb_mysql:Allowlist
    properties:
      allowListName: acc-test-allowlist
      allowListDesc: acc-test
      allowListType: IPv4
      allowLists:
        - 192.168.0.0/24
        - 192.168.1.0/24
        - 192.168.2.0/24
  fooVpc:
    type: volcengine:vpc:Vpc
    properties:
      vpcName: acc-test-vpc
      cidrBlock: 172.16.0.0/16
  fooSubnet:
    type: volcengine:vpc:Subnet
    properties:
      subnetName: acc-test-subnet
      cidrBlock: 172.16.0.0/24
      zoneId: ${fooZones.zones[2].id}
      vpcId: ${fooVpc.id}
  fooInstance:
    type: volcengine:vedb_mysql:Instance
    properties:
      chargeType: PostPaid
      storageChargeType: PostPaid
      dbEngineVersion: MySQL_8_0
      dbMinorVersion: '3.0'
      nodeNumber: 2
      nodeSpec: vedb.mysql.x4.large
      subnetId: ${fooSubnet.id}
      instanceName: tf-test
      projectName: testA
      tags:
        - key: tftest
          value: tftest
        - key: tftest2
          value: tftest2
  fooAllowlistAssociate:
    type: volcengine:vedb_mysql:AllowlistAssociate
    properties:
      allowListId: ${fooAllowlist.id}
      instanceId: ${fooInstance.id}
variables:
  fooZones:
    fn::invoke:
      Function: volcengine:ecs:Zones
      Arguments: {}
  fooAllowlists:
    fn::invoke:
      Function: volcengine:vedb_mysql:Allowlists
      Arguments:
        instanceId: ${fooInstance.id}
Using Allowlists
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 allowlists(args: AllowlistsArgs, opts?: InvokeOptions): Promise<AllowlistsResult>
function allowlistsOutput(args: AllowlistsOutputArgs, opts?: InvokeOptions): Output<AllowlistsResult>def allowlists(instance_id: Optional[str] = None,
               name_regex: Optional[str] = None,
               output_file: Optional[str] = None,
               region_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> AllowlistsResult
def allowlists_output(instance_id: Optional[pulumi.Input[str]] = None,
               name_regex: Optional[pulumi.Input[str]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               region_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[AllowlistsResult]func Allowlists(ctx *Context, args *AllowlistsArgs, opts ...InvokeOption) (*AllowlistsResult, error)
func AllowlistsOutput(ctx *Context, args *AllowlistsOutputArgs, opts ...InvokeOption) AllowlistsResultOutputpublic static class Allowlists 
{
    public static Task<AllowlistsResult> InvokeAsync(AllowlistsArgs args, InvokeOptions? opts = null)
    public static Output<AllowlistsResult> Invoke(AllowlistsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<AllowlistsResult> allowlists(AllowlistsArgs args, InvokeOptions options)
public static Output<AllowlistsResult> allowlists(AllowlistsArgs args, InvokeOptions options)
fn::invoke:
  function: volcengine:vedb_mysql:Allowlists
  arguments:
    # arguments dictionaryThe following arguments are supported:
- RegionId string
- The region of the allow lists.
- InstanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- NameRegex string
- A Name Regex of Resource.
- OutputFile string
- File name where to save data source results.
- RegionId string
- The region of the allow lists.
- InstanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- NameRegex string
- A Name Regex of Resource.
- OutputFile string
- File name where to save data source results.
- regionId String
- The region of the allow lists.
- instanceId String
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- nameRegex String
- A Name Regex of Resource.
- outputFile String
- File name where to save data source results.
- regionId string
- The region of the allow lists.
- instanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- nameRegex string
- A Name Regex of Resource.
- outputFile string
- File name where to save data source results.
- region_id str
- The region of the allow lists.
- instance_id str
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- name_regex str
- A Name Regex of Resource.
- output_file str
- File name where to save data source results.
- regionId String
- The region of the allow lists.
- instanceId String
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- nameRegex String
- A Name Regex of Resource.
- outputFile String
- File name where to save data source results.
Allowlists Result
The following output properties are available:
- AllowLists List<AllowlistsAllow List> 
- The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- RegionId string
- TotalCount int
- The total count of query.
- InstanceId string
- The id of the instance.
- NameRegex string
- OutputFile string
- AllowLists []AllowlistsAllow List 
- The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- RegionId string
- TotalCount int
- The total count of query.
- InstanceId string
- The id of the instance.
- NameRegex string
- OutputFile string
- allowLists List<AllowlistsAllow List> 
- The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- regionId String
- totalCount Integer
- The total count of query.
- instanceId String
- The id of the instance.
- nameRegex String
- outputFile String
- allowLists AllowlistsAllow List[] 
- The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- regionId string
- totalCount number
- The total count of query.
- instanceId string
- The id of the instance.
- nameRegex string
- outputFile string
- allow_lists Sequence[AllowlistsAllow List] 
- The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- region_id str
- total_count int
- The total count of query.
- instance_id str
- The id of the instance.
- name_regex str
- output_file str
- allowLists List<Property Map>
- The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- regionId String
- totalCount Number
- The total count of query.
- instanceId String
- The id of the instance.
- nameRegex String
- outputFile String
Supporting Types
AllowlistsAllowList  
- AllowList stringDesc 
- The description of the allow list.
- AllowList stringId 
- The id of the allow list.
- AllowList intIp Num 
- The total number of IP addresses (or address ranges) in the whitelist.
- AllowList stringName 
- The name of the allow list.
- AllowList stringType 
- The type of the allow list.
- AllowLists List<string>
- The IP address or a range of IP addresses in CIDR format.
- AssociatedInstance intNum 
- The total number of instances bound under the whitelist.
- AssociatedInstances List<AllowlistsAllow List Associated Instance> 
- The list of instances.
- AllowList stringDesc 
- The description of the allow list.
- AllowList stringId 
- The id of the allow list.
- AllowList intIp Num 
- The total number of IP addresses (or address ranges) in the whitelist.
- AllowList stringName 
- The name of the allow list.
- AllowList stringType 
- The type of the allow list.
- AllowLists []string
- The IP address or a range of IP addresses in CIDR format.
- AssociatedInstance intNum 
- The total number of instances bound under the whitelist.
- AssociatedInstances []AllowlistsAllow List Associated Instance 
- The list of instances.
- allowList StringDesc 
- The description of the allow list.
- allowList StringId 
- The id of the allow list.
- allowList IntegerIp Num 
- The total number of IP addresses (or address ranges) in the whitelist.
- allowList StringName 
- The name of the allow list.
- allowList StringType 
- The type of the allow list.
- allowLists List<String>
- The IP address or a range of IP addresses in CIDR format.
- associatedInstance IntegerNum 
- The total number of instances bound under the whitelist.
- associatedInstances List<AllowlistsAllow List Associated Instance> 
- The list of instances.
- allowList stringDesc 
- The description of the allow list.
- allowList stringId 
- The id of the allow list.
- allowList numberIp Num 
- The total number of IP addresses (or address ranges) in the whitelist.
- allowList stringName 
- The name of the allow list.
- allowList stringType 
- The type of the allow list.
- allowLists string[]
- The IP address or a range of IP addresses in CIDR format.
- associatedInstance numberNum 
- The total number of instances bound under the whitelist.
- associatedInstances AllowlistsAllow List Associated Instance[] 
- The list of instances.
- allow_list_ strdesc 
- The description of the allow list.
- allow_list_ strid 
- The id of the allow list.
- allow_list_ intip_ num 
- The total number of IP addresses (or address ranges) in the whitelist.
- allow_list_ strname 
- The name of the allow list.
- allow_list_ strtype 
- The type of the allow list.
- allow_lists Sequence[str]
- The IP address or a range of IP addresses in CIDR format.
- associated_instance_ intnum 
- The total number of instances bound under the whitelist.
- associated_instances Sequence[AllowlistsAllow List Associated Instance] 
- The list of instances.
- allowList StringDesc 
- The description of the allow list.
- allowList StringId 
- The id of the allow list.
- allowList NumberIp Num 
- The total number of IP addresses (or address ranges) in the whitelist.
- allowList StringName 
- The name of the allow list.
- allowList StringType 
- The type of the allow list.
- allowLists List<String>
- The IP address or a range of IP addresses in CIDR format.
- associatedInstance NumberNum 
- The total number of instances bound under the whitelist.
- associatedInstances List<Property Map>
- The list of instances.
AllowlistsAllowListAssociatedInstance    
- InstanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- InstanceName string
- The name of the instance.
- Vpc string
- The id of the vpc.
- InstanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- InstanceName string
- The name of the instance.
- Vpc string
- The id of the vpc.
- instanceId String
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- instanceName String
- The name of the instance.
- vpc String
- The id of the vpc.
- instanceId string
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- instanceName string
- The name of the instance.
- vpc string
- The id of the vpc.
- instance_id str
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- instance_name str
- The name of the instance.
- vpc str
- The id of the vpc.
- instanceId String
- Instance ID. When an InstanceId is specified, the DescribeAllowLists interface will return the whitelist bound to the specified instance.
- instanceName String
- The name of the instance.
- vpc String
- The id of the vpc.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.