1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cloudfirewall
  5. getVpcCenTrFirewalls
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cloudfirewall.getVpcCenTrFirewalls

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides Cloud Firewall Vpc Cen Tr Firewall available to the user.What is Vpc Cen Tr Firewall

NOTE: Available since v1.243.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const description = config.get("description") || "Created by Terraform";
const firewallName = config.get("firewallName") || "tf-example";
const trAttachmentMasterCidr = config.get("trAttachmentMasterCidr") || "192.168.3.192/26";
const firewallSubnetCidr = config.get("firewallSubnetCidr") || "192.168.3.0/25";
const region = config.get("region") || "cn-hangzhou";
const trAttachmentSlaveCidr = config.get("trAttachmentSlaveCidr") || "192.168.3.128/26";
const firewallVpcCidr = config.get("firewallVpcCidr") || "192.168.3.0/24";
const zone1 = config.get("zone1") || "cn-hangzhou-h";
const firewallNameUpdate = config.get("firewallNameUpdate") || "tf-example-1";
const zone2 = config.get("zone2") || "cn-hangzhou-i";
const cen = new alicloud.cen.Instance("cen", {
    description: "terraform example",
    cenInstanceName: "Cen_Terraform_example01",
});
const tr = new alicloud.cen.TransitRouter("tr", {
    supportMulticast: false,
    transitRouterName: "CEN_TR_Terraform",
    transitRouterDescription: "tr-created-by-terraform",
    cenId: cen.id,
});
const vpc1 = new alicloud.vpc.Network("vpc1", {
    description: "created by terraform",
    cidrBlock: "192.168.1.0/24",
    vpcName: "vpc1-Terraform",
});
const vpc1vsw1 = new alicloud.vpc.Switch("vpc1vsw1", {
    cidrBlock: "192.168.1.0/25",
    vswitchName: "vpc1-vsw1",
    vpcId: vpc1.id,
    zoneId: zone1,
});
const vpc1vsw2 = new alicloud.vpc.Switch("vpc1vsw2", {
    vpcId: vpc1.id,
    cidrBlock: "192.168.1.128/26",
    vswitchName: "vpc1-vsw2",
    zoneId: zone2,
});
const vpc2 = new alicloud.vpc.Network("vpc2", {
    description: "created by terraform",
    cidrBlock: "192.168.2.0/24",
    vpcName: "vpc2-Terraform",
});
const vpc2vsw1 = new alicloud.vpc.Switch("vpc2vsw1", {
    cidrBlock: "192.168.2.0/25",
    vswitchName: "vpc2-vsw1",
    vpcId: vpc2.id,
    zoneId: zone1,
});
const vpc2vsw2 = new alicloud.vpc.Switch("vpc2vsw2", {
    cidrBlock: "192.168.2.128/26",
    vswitchName: "vpc2-vsw2",
    vpcId: vpc2.id,
    zoneId: zone2,
});
const tr_vpc1 = new alicloud.cen.TransitRouterVpcAttachment("tr-vpc1", {
    autoPublishRouteEnabled: false,
    zoneMappings: [
        {
            vswitchId: vpc1vsw1.id,
            zoneId: vpc1vsw1.zoneId,
        },
        {
            zoneId: vpc1vsw2.zoneId,
            vswitchId: vpc1vsw2.id,
        },
    ],
    vpcId: vpc1.id,
    cenId: cen.id,
});
const tr_vpc2 = new alicloud.cen.TransitRouterVpcAttachment("tr-vpc2", {
    autoPublishRouteEnabled: false,
    vpcId: vpc2.id,
    zoneMappings: [
        {
            vswitchId: vpc2vsw1.id,
            zoneId: vpc2vsw1.zoneId,
        },
        {
            vswitchId: vpc2vsw2.id,
            zoneId: vpc2vsw2.zoneId,
        },
    ],
    cenId: cen.id,
});
const defaultVpcCenTrFirewall = new alicloud.cloudfirewall.VpcCenTrFirewall("default", {
    firewallDescription: "VpcCenTrFirewall created by terraform",
    regionNo: region,
    routeMode: "managed",
    cenId: cen.id,
    firewallVpcCidr: firewallVpcCidr,
    transitRouterId: tr.transitRouterId,
    trAttachmentMasterCidr: trAttachmentMasterCidr,
    firewallName: firewallName,
    firewallSubnetCidr: firewallSubnetCidr,
    trAttachmentSlaveCidr: trAttachmentSlaveCidr,
});
const _default = alicloud.cloudfirewall.getVpcCenTrFirewallsOutput({
    ids: [defaultVpcCenTrFirewall.id],
    cenId: cen.id,
    firewallName: firewallName,
    regionNo: region,
    routeMode: "managed",
    transitRouterId: tr.transitRouterId,
});
export const alicloudCloudFirewallVpcCenTrFirewallExampleId = _default.apply(_default => _default.firewalls?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
description = config.get("description")
if description is None:
    description = "Created by Terraform"
firewall_name = config.get("firewallName")
if firewall_name is None:
    firewall_name = "tf-example"
tr_attachment_master_cidr = config.get("trAttachmentMasterCidr")
if tr_attachment_master_cidr is None:
    tr_attachment_master_cidr = "192.168.3.192/26"
firewall_subnet_cidr = config.get("firewallSubnetCidr")
if firewall_subnet_cidr is None:
    firewall_subnet_cidr = "192.168.3.0/25"
region = config.get("region")
if region is None:
    region = "cn-hangzhou"
tr_attachment_slave_cidr = config.get("trAttachmentSlaveCidr")
if tr_attachment_slave_cidr is None:
    tr_attachment_slave_cidr = "192.168.3.128/26"
firewall_vpc_cidr = config.get("firewallVpcCidr")
if firewall_vpc_cidr is None:
    firewall_vpc_cidr = "192.168.3.0/24"
zone1 = config.get("zone1")
if zone1 is None:
    zone1 = "cn-hangzhou-h"
firewall_name_update = config.get("firewallNameUpdate")
if firewall_name_update is None:
    firewall_name_update = "tf-example-1"
zone2 = config.get("zone2")
if zone2 is None:
    zone2 = "cn-hangzhou-i"
cen = alicloud.cen.Instance("cen",
    description="terraform example",
    cen_instance_name="Cen_Terraform_example01")
tr = alicloud.cen.TransitRouter("tr",
    support_multicast=False,
    transit_router_name="CEN_TR_Terraform",
    transit_router_description="tr-created-by-terraform",
    cen_id=cen.id)
vpc1 = alicloud.vpc.Network("vpc1",
    description="created by terraform",
    cidr_block="192.168.1.0/24",
    vpc_name="vpc1-Terraform")
vpc1vsw1 = alicloud.vpc.Switch("vpc1vsw1",
    cidr_block="192.168.1.0/25",
    vswitch_name="vpc1-vsw1",
    vpc_id=vpc1.id,
    zone_id=zone1)
vpc1vsw2 = alicloud.vpc.Switch("vpc1vsw2",
    vpc_id=vpc1.id,
    cidr_block="192.168.1.128/26",
    vswitch_name="vpc1-vsw2",
    zone_id=zone2)
vpc2 = alicloud.vpc.Network("vpc2",
    description="created by terraform",
    cidr_block="192.168.2.0/24",
    vpc_name="vpc2-Terraform")
vpc2vsw1 = alicloud.vpc.Switch("vpc2vsw1",
    cidr_block="192.168.2.0/25",
    vswitch_name="vpc2-vsw1",
    vpc_id=vpc2.id,
    zone_id=zone1)
vpc2vsw2 = alicloud.vpc.Switch("vpc2vsw2",
    cidr_block="192.168.2.128/26",
    vswitch_name="vpc2-vsw2",
    vpc_id=vpc2.id,
    zone_id=zone2)
tr_vpc1 = alicloud.cen.TransitRouterVpcAttachment("tr-vpc1",
    auto_publish_route_enabled=False,
    zone_mappings=[
        {
            "vswitch_id": vpc1vsw1.id,
            "zone_id": vpc1vsw1.zone_id,
        },
        {
            "zone_id": vpc1vsw2.zone_id,
            "vswitch_id": vpc1vsw2.id,
        },
    ],
    vpc_id=vpc1.id,
    cen_id=cen.id)
tr_vpc2 = alicloud.cen.TransitRouterVpcAttachment("tr-vpc2",
    auto_publish_route_enabled=False,
    vpc_id=vpc2.id,
    zone_mappings=[
        {
            "vswitch_id": vpc2vsw1.id,
            "zone_id": vpc2vsw1.zone_id,
        },
        {
            "vswitch_id": vpc2vsw2.id,
            "zone_id": vpc2vsw2.zone_id,
        },
    ],
    cen_id=cen.id)
default_vpc_cen_tr_firewall = alicloud.cloudfirewall.VpcCenTrFirewall("default",
    firewall_description="VpcCenTrFirewall created by terraform",
    region_no=region,
    route_mode="managed",
    cen_id=cen.id,
    firewall_vpc_cidr=firewall_vpc_cidr,
    transit_router_id=tr.transit_router_id,
    tr_attachment_master_cidr=tr_attachment_master_cidr,
    firewall_name=firewall_name,
    firewall_subnet_cidr=firewall_subnet_cidr,
    tr_attachment_slave_cidr=tr_attachment_slave_cidr)
default = alicloud.cloudfirewall.get_vpc_cen_tr_firewalls_output(ids=[default_vpc_cen_tr_firewall.id],
    cen_id=cen.id,
    firewall_name=firewall_name,
    region_no=region,
    route_mode="managed",
    transit_router_id=tr.transit_router_id)
pulumi.export("alicloudCloudFirewallVpcCenTrFirewallExampleId", default.firewalls[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudfirewall"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example";
if param := cfg.Get("name"); param != ""{
name = param
}
description := "Created by Terraform";
if param := cfg.Get("description"); param != ""{
description = param
}
firewallName := "tf-example";
if param := cfg.Get("firewallName"); param != ""{
firewallName = param
}
trAttachmentMasterCidr := "192.168.3.192/26";
if param := cfg.Get("trAttachmentMasterCidr"); param != ""{
trAttachmentMasterCidr = param
}
firewallSubnetCidr := "192.168.3.0/25";
if param := cfg.Get("firewallSubnetCidr"); param != ""{
firewallSubnetCidr = param
}
region := "cn-hangzhou";
if param := cfg.Get("region"); param != ""{
region = param
}
trAttachmentSlaveCidr := "192.168.3.128/26";
if param := cfg.Get("trAttachmentSlaveCidr"); param != ""{
trAttachmentSlaveCidr = param
}
firewallVpcCidr := "192.168.3.0/24";
if param := cfg.Get("firewallVpcCidr"); param != ""{
firewallVpcCidr = param
}
zone1 := "cn-hangzhou-h";
if param := cfg.Get("zone1"); param != ""{
zone1 = param
}
firewallNameUpdate := "tf-example-1";
if param := cfg.Get("firewallNameUpdate"); param != ""{
firewallNameUpdate = param
}
zone2 := "cn-hangzhou-i";
if param := cfg.Get("zone2"); param != ""{
zone2 = param
}
cen, err := cen.NewInstance(ctx, "cen", &cen.InstanceArgs{
Description: pulumi.String("terraform example"),
CenInstanceName: pulumi.String("Cen_Terraform_example01"),
})
if err != nil {
return err
}
tr, err := cen.NewTransitRouter(ctx, "tr", &cen.TransitRouterArgs{
SupportMulticast: pulumi.Bool(false),
TransitRouterName: pulumi.String("CEN_TR_Terraform"),
TransitRouterDescription: pulumi.String("tr-created-by-terraform"),
CenId: cen.ID(),
})
if err != nil {
return err
}
vpc1, err := vpc.NewNetwork(ctx, "vpc1", &vpc.NetworkArgs{
Description: pulumi.String("created by terraform"),
CidrBlock: pulumi.String("192.168.1.0/24"),
VpcName: pulumi.String("vpc1-Terraform"),
})
if err != nil {
return err
}
vpc1vsw1, err := vpc.NewSwitch(ctx, "vpc1vsw1", &vpc.SwitchArgs{
CidrBlock: pulumi.String("192.168.1.0/25"),
VswitchName: pulumi.String("vpc1-vsw1"),
VpcId: vpc1.ID(),
ZoneId: pulumi.String(zone1),
})
if err != nil {
return err
}
vpc1vsw2, err := vpc.NewSwitch(ctx, "vpc1vsw2", &vpc.SwitchArgs{
VpcId: vpc1.ID(),
CidrBlock: pulumi.String("192.168.1.128/26"),
VswitchName: pulumi.String("vpc1-vsw2"),
ZoneId: pulumi.String(zone2),
})
if err != nil {
return err
}
vpc2, err := vpc.NewNetwork(ctx, "vpc2", &vpc.NetworkArgs{
Description: pulumi.String("created by terraform"),
CidrBlock: pulumi.String("192.168.2.0/24"),
VpcName: pulumi.String("vpc2-Terraform"),
})
if err != nil {
return err
}
vpc2vsw1, err := vpc.NewSwitch(ctx, "vpc2vsw1", &vpc.SwitchArgs{
CidrBlock: pulumi.String("192.168.2.0/25"),
VswitchName: pulumi.String("vpc2-vsw1"),
VpcId: vpc2.ID(),
ZoneId: pulumi.String(zone1),
})
if err != nil {
return err
}
vpc2vsw2, err := vpc.NewSwitch(ctx, "vpc2vsw2", &vpc.SwitchArgs{
CidrBlock: pulumi.String("192.168.2.128/26"),
VswitchName: pulumi.String("vpc2-vsw2"),
VpcId: vpc2.ID(),
ZoneId: pulumi.String(zone2),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouterVpcAttachment(ctx, "tr-vpc1", &cen.TransitRouterVpcAttachmentArgs{
AutoPublishRouteEnabled: pulumi.Bool(false),
ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
&cen.TransitRouterVpcAttachmentZoneMappingArgs{
VswitchId: vpc1vsw1.ID(),
ZoneId: vpc1vsw1.ZoneId,
},
&cen.TransitRouterVpcAttachmentZoneMappingArgs{
ZoneId: vpc1vsw2.ZoneId,
VswitchId: vpc1vsw2.ID(),
},
},
VpcId: vpc1.ID(),
CenId: cen.ID(),
})
if err != nil {
return err
}
_, err = cen.NewTransitRouterVpcAttachment(ctx, "tr-vpc2", &cen.TransitRouterVpcAttachmentArgs{
AutoPublishRouteEnabled: pulumi.Bool(false),
VpcId: vpc2.ID(),
ZoneMappings: cen.TransitRouterVpcAttachmentZoneMappingArray{
&cen.TransitRouterVpcAttachmentZoneMappingArgs{
VswitchId: vpc2vsw1.ID(),
ZoneId: vpc2vsw1.ZoneId,
},
&cen.TransitRouterVpcAttachmentZoneMappingArgs{
VswitchId: vpc2vsw2.ID(),
ZoneId: vpc2vsw2.ZoneId,
},
},
CenId: cen.ID(),
})
if err != nil {
return err
}
defaultVpcCenTrFirewall, err := cloudfirewall.NewVpcCenTrFirewall(ctx, "default", &cloudfirewall.VpcCenTrFirewallArgs{
FirewallDescription: pulumi.String("VpcCenTrFirewall created by terraform"),
RegionNo: pulumi.String(region),
RouteMode: pulumi.String("managed"),
CenId: cen.ID(),
FirewallVpcCidr: pulumi.String(firewallVpcCidr),
TransitRouterId: tr.TransitRouterId,
TrAttachmentMasterCidr: pulumi.String(trAttachmentMasterCidr),
FirewallName: pulumi.String(firewallName),
FirewallSubnetCidr: pulumi.String(firewallSubnetCidr),
TrAttachmentSlaveCidr: pulumi.String(trAttachmentSlaveCidr),
})
if err != nil {
return err
}
_default := cloudfirewall.GetVpcCenTrFirewallsOutput(ctx, cloudfirewall.GetVpcCenTrFirewallsOutputArgs{
Ids: pulumi.StringArray{
defaultVpcCenTrFirewall.ID(),
},
CenId: cen.ID(),
FirewallName: pulumi.String(firewallName),
RegionNo: pulumi.String(region),
RouteMode: pulumi.String("managed"),
TransitRouterId: tr.TransitRouterId,
}, nil);
ctx.Export("alicloudCloudFirewallVpcCenTrFirewallExampleId", _default.ApplyT(func(_default cloudfirewall.GetVpcCenTrFirewallsResult) (*string, error) {
return &default.Firewalls[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var description = config.Get("description") ?? "Created by Terraform";
    var firewallName = config.Get("firewallName") ?? "tf-example";
    var trAttachmentMasterCidr = config.Get("trAttachmentMasterCidr") ?? "192.168.3.192/26";
    var firewallSubnetCidr = config.Get("firewallSubnetCidr") ?? "192.168.3.0/25";
    var region = config.Get("region") ?? "cn-hangzhou";
    var trAttachmentSlaveCidr = config.Get("trAttachmentSlaveCidr") ?? "192.168.3.128/26";
    var firewallVpcCidr = config.Get("firewallVpcCidr") ?? "192.168.3.0/24";
    var zone1 = config.Get("zone1") ?? "cn-hangzhou-h";
    var firewallNameUpdate = config.Get("firewallNameUpdate") ?? "tf-example-1";
    var zone2 = config.Get("zone2") ?? "cn-hangzhou-i";
    var cen = new AliCloud.Cen.Instance("cen", new()
    {
        Description = "terraform example",
        CenInstanceName = "Cen_Terraform_example01",
    });

    var tr = new AliCloud.Cen.TransitRouter("tr", new()
    {
        SupportMulticast = false,
        TransitRouterName = "CEN_TR_Terraform",
        TransitRouterDescription = "tr-created-by-terraform",
        CenId = cen.Id,
    });

    var vpc1 = new AliCloud.Vpc.Network("vpc1", new()
    {
        Description = "created by terraform",
        CidrBlock = "192.168.1.0/24",
        VpcName = "vpc1-Terraform",
    });

    var vpc1vsw1 = new AliCloud.Vpc.Switch("vpc1vsw1", new()
    {
        CidrBlock = "192.168.1.0/25",
        VswitchName = "vpc1-vsw1",
        VpcId = vpc1.Id,
        ZoneId = zone1,
    });

    var vpc1vsw2 = new AliCloud.Vpc.Switch("vpc1vsw2", new()
    {
        VpcId = vpc1.Id,
        CidrBlock = "192.168.1.128/26",
        VswitchName = "vpc1-vsw2",
        ZoneId = zone2,
    });

    var vpc2 = new AliCloud.Vpc.Network("vpc2", new()
    {
        Description = "created by terraform",
        CidrBlock = "192.168.2.0/24",
        VpcName = "vpc2-Terraform",
    });

    var vpc2vsw1 = new AliCloud.Vpc.Switch("vpc2vsw1", new()
    {
        CidrBlock = "192.168.2.0/25",
        VswitchName = "vpc2-vsw1",
        VpcId = vpc2.Id,
        ZoneId = zone1,
    });

    var vpc2vsw2 = new AliCloud.Vpc.Switch("vpc2vsw2", new()
    {
        CidrBlock = "192.168.2.128/26",
        VswitchName = "vpc2-vsw2",
        VpcId = vpc2.Id,
        ZoneId = zone2,
    });

    var tr_vpc1 = new AliCloud.Cen.TransitRouterVpcAttachment("tr-vpc1", new()
    {
        AutoPublishRouteEnabled = false,
        ZoneMappings = new[]
        {
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                VswitchId = vpc1vsw1.Id,
                ZoneId = vpc1vsw1.ZoneId,
            },
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                ZoneId = vpc1vsw2.ZoneId,
                VswitchId = vpc1vsw2.Id,
            },
        },
        VpcId = vpc1.Id,
        CenId = cen.Id,
    });

    var tr_vpc2 = new AliCloud.Cen.TransitRouterVpcAttachment("tr-vpc2", new()
    {
        AutoPublishRouteEnabled = false,
        VpcId = vpc2.Id,
        ZoneMappings = new[]
        {
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                VswitchId = vpc2vsw1.Id,
                ZoneId = vpc2vsw1.ZoneId,
            },
            new AliCloud.Cen.Inputs.TransitRouterVpcAttachmentZoneMappingArgs
            {
                VswitchId = vpc2vsw2.Id,
                ZoneId = vpc2vsw2.ZoneId,
            },
        },
        CenId = cen.Id,
    });

    var defaultVpcCenTrFirewall = new AliCloud.CloudFirewall.VpcCenTrFirewall("default", new()
    {
        FirewallDescription = "VpcCenTrFirewall created by terraform",
        RegionNo = region,
        RouteMode = "managed",
        CenId = cen.Id,
        FirewallVpcCidr = firewallVpcCidr,
        TransitRouterId = tr.TransitRouterId,
        TrAttachmentMasterCidr = trAttachmentMasterCidr,
        FirewallName = firewallName,
        FirewallSubnetCidr = firewallSubnetCidr,
        TrAttachmentSlaveCidr = trAttachmentSlaveCidr,
    });

    var @default = AliCloud.CloudFirewall.GetVpcCenTrFirewalls.Invoke(new()
    {
        Ids = new[]
        {
            defaultVpcCenTrFirewall.Id,
        },
        CenId = cen.Id,
        FirewallName = firewallName,
        RegionNo = region,
        RouteMode = "managed",
        TransitRouterId = tr.TransitRouterId,
    });

    return new Dictionary<string, object?>
    {
        ["alicloudCloudFirewallVpcCenTrFirewallExampleId"] = @default.Apply(@default => @default.Apply(getVpcCenTrFirewallsResult => getVpcCenTrFirewallsResult.Firewalls[0]?.Id)),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.TransitRouter;
import com.pulumi.alicloud.cen.TransitRouterArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.cen.TransitRouterVpcAttachment;
import com.pulumi.alicloud.cen.TransitRouterVpcAttachmentArgs;
import com.pulumi.alicloud.cen.inputs.TransitRouterVpcAttachmentZoneMappingArgs;
import com.pulumi.alicloud.cloudfirewall.VpcCenTrFirewall;
import com.pulumi.alicloud.cloudfirewall.VpcCenTrFirewallArgs;
import com.pulumi.alicloud.cloudfirewall.CloudfirewallFunctions;
import com.pulumi.alicloud.cloudfirewall.inputs.GetVpcCenTrFirewallsArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var description = config.get("description").orElse("Created by Terraform");
        final var firewallName = config.get("firewallName").orElse("tf-example");
        final var trAttachmentMasterCidr = config.get("trAttachmentMasterCidr").orElse("192.168.3.192/26");
        final var firewallSubnetCidr = config.get("firewallSubnetCidr").orElse("192.168.3.0/25");
        final var region = config.get("region").orElse("cn-hangzhou");
        final var trAttachmentSlaveCidr = config.get("trAttachmentSlaveCidr").orElse("192.168.3.128/26");
        final var firewallVpcCidr = config.get("firewallVpcCidr").orElse("192.168.3.0/24");
        final var zone1 = config.get("zone1").orElse("cn-hangzhou-h");
        final var firewallNameUpdate = config.get("firewallNameUpdate").orElse("tf-example-1");
        final var zone2 = config.get("zone2").orElse("cn-hangzhou-i");
        var cen = new Instance("cen", InstanceArgs.builder()
            .description("terraform example")
            .cenInstanceName("Cen_Terraform_example01")
            .build());

        var tr = new TransitRouter("tr", TransitRouterArgs.builder()
            .supportMulticast(false)
            .transitRouterName("CEN_TR_Terraform")
            .transitRouterDescription("tr-created-by-terraform")
            .cenId(cen.id())
            .build());

        var vpc1 = new Network("vpc1", NetworkArgs.builder()
            .description("created by terraform")
            .cidrBlock("192.168.1.0/24")
            .vpcName("vpc1-Terraform")
            .build());

        var vpc1vsw1 = new Switch("vpc1vsw1", SwitchArgs.builder()
            .cidrBlock("192.168.1.0/25")
            .vswitchName("vpc1-vsw1")
            .vpcId(vpc1.id())
            .zoneId(zone1)
            .build());

        var vpc1vsw2 = new Switch("vpc1vsw2", SwitchArgs.builder()
            .vpcId(vpc1.id())
            .cidrBlock("192.168.1.128/26")
            .vswitchName("vpc1-vsw2")
            .zoneId(zone2)
            .build());

        var vpc2 = new Network("vpc2", NetworkArgs.builder()
            .description("created by terraform")
            .cidrBlock("192.168.2.0/24")
            .vpcName("vpc2-Terraform")
            .build());

        var vpc2vsw1 = new Switch("vpc2vsw1", SwitchArgs.builder()
            .cidrBlock("192.168.2.0/25")
            .vswitchName("vpc2-vsw1")
            .vpcId(vpc2.id())
            .zoneId(zone1)
            .build());

        var vpc2vsw2 = new Switch("vpc2vsw2", SwitchArgs.builder()
            .cidrBlock("192.168.2.128/26")
            .vswitchName("vpc2-vsw2")
            .vpcId(vpc2.id())
            .zoneId(zone2)
            .build());

        var tr_vpc1 = new TransitRouterVpcAttachment("tr-vpc1", TransitRouterVpcAttachmentArgs.builder()
            .autoPublishRouteEnabled(false)
            .zoneMappings(            
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .vswitchId(vpc1vsw1.id())
                    .zoneId(vpc1vsw1.zoneId())
                    .build(),
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .zoneId(vpc1vsw2.zoneId())
                    .vswitchId(vpc1vsw2.id())
                    .build())
            .vpcId(vpc1.id())
            .cenId(cen.id())
            .build());

        var tr_vpc2 = new TransitRouterVpcAttachment("tr-vpc2", TransitRouterVpcAttachmentArgs.builder()
            .autoPublishRouteEnabled(false)
            .vpcId(vpc2.id())
            .zoneMappings(            
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .vswitchId(vpc2vsw1.id())
                    .zoneId(vpc2vsw1.zoneId())
                    .build(),
                TransitRouterVpcAttachmentZoneMappingArgs.builder()
                    .vswitchId(vpc2vsw2.id())
                    .zoneId(vpc2vsw2.zoneId())
                    .build())
            .cenId(cen.id())
            .build());

        var defaultVpcCenTrFirewall = new VpcCenTrFirewall("defaultVpcCenTrFirewall", VpcCenTrFirewallArgs.builder()
            .firewallDescription("VpcCenTrFirewall created by terraform")
            .regionNo(region)
            .routeMode("managed")
            .cenId(cen.id())
            .firewallVpcCidr(firewallVpcCidr)
            .transitRouterId(tr.transitRouterId())
            .trAttachmentMasterCidr(trAttachmentMasterCidr)
            .firewallName(firewallName)
            .firewallSubnetCidr(firewallSubnetCidr)
            .trAttachmentSlaveCidr(trAttachmentSlaveCidr)
            .build());

        final var default = CloudfirewallFunctions.getVpcCenTrFirewalls(GetVpcCenTrFirewallsArgs.builder()
            .ids(defaultVpcCenTrFirewall.id())
            .cenId(cen.id())
            .firewallName(firewallName)
            .regionNo(region)
            .routeMode("managed")
            .transitRouterId(tr.transitRouterId())
            .build());

        ctx.export("alicloudCloudFirewallVpcCenTrFirewallExampleId", default_.applyValue(default_ -> default_.firewalls()[0].id()));
    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
  description:
    type: string
    default: Created by Terraform
  firewallName:
    type: string
    default: tf-example
  trAttachmentMasterCidr:
    type: string
    default: 192.168.3.192/26
  firewallSubnetCidr:
    type: string
    default: 192.168.3.0/25
  region:
    type: string
    default: cn-hangzhou
  trAttachmentSlaveCidr:
    type: string
    default: 192.168.3.128/26
  firewallVpcCidr:
    type: string
    default: 192.168.3.0/24
  zone1:
    type: string
    default: cn-hangzhou-h
  firewallNameUpdate:
    type: string
    default: tf-example-1
  zone2:
    type: string
    default: cn-hangzhou-i
resources:
  cen:
    type: alicloud:cen:Instance
    properties:
      description: terraform example
      cenInstanceName: Cen_Terraform_example01
  tr:
    type: alicloud:cen:TransitRouter
    properties:
      supportMulticast: false
      transitRouterName: CEN_TR_Terraform
      transitRouterDescription: tr-created-by-terraform
      cenId: ${cen.id}
  vpc1:
    type: alicloud:vpc:Network
    properties:
      description: created by terraform
      cidrBlock: 192.168.1.0/24
      vpcName: vpc1-Terraform
  vpc1vsw1:
    type: alicloud:vpc:Switch
    properties:
      cidrBlock: 192.168.1.0/25
      vswitchName: vpc1-vsw1
      vpcId: ${vpc1.id}
      zoneId: ${zone1}
  vpc1vsw2:
    type: alicloud:vpc:Switch
    properties:
      vpcId: ${vpc1.id}
      cidrBlock: 192.168.1.128/26
      vswitchName: vpc1-vsw2
      zoneId: ${zone2}
  vpc2:
    type: alicloud:vpc:Network
    properties:
      description: created by terraform
      cidrBlock: 192.168.2.0/24
      vpcName: vpc2-Terraform
  vpc2vsw1:
    type: alicloud:vpc:Switch
    properties:
      cidrBlock: 192.168.2.0/25
      vswitchName: vpc2-vsw1
      vpcId: ${vpc2.id}
      zoneId: ${zone1}
  vpc2vsw2:
    type: alicloud:vpc:Switch
    properties:
      cidrBlock: 192.168.2.128/26
      vswitchName: vpc2-vsw2
      vpcId: ${vpc2.id}
      zoneId: ${zone2}
  tr-vpc1:
    type: alicloud:cen:TransitRouterVpcAttachment
    properties:
      autoPublishRouteEnabled: false
      zoneMappings:
        - vswitchId: ${vpc1vsw1.id}
          zoneId: ${vpc1vsw1.zoneId}
        - zoneId: ${vpc1vsw2.zoneId}
          vswitchId: ${vpc1vsw2.id}
      vpcId: ${vpc1.id}
      cenId: ${cen.id}
  tr-vpc2:
    type: alicloud:cen:TransitRouterVpcAttachment
    properties:
      autoPublishRouteEnabled: false
      vpcId: ${vpc2.id}
      zoneMappings:
        - vswitchId: ${vpc2vsw1.id}
          zoneId: ${vpc2vsw1.zoneId}
        - vswitchId: ${vpc2vsw2.id}
          zoneId: ${vpc2vsw2.zoneId}
      cenId: ${cen.id}
  defaultVpcCenTrFirewall:
    type: alicloud:cloudfirewall:VpcCenTrFirewall
    name: default
    properties:
      firewallDescription: VpcCenTrFirewall created by terraform
      regionNo: ${region}
      routeMode: managed
      cenId: ${cen.id}
      firewallVpcCidr: ${firewallVpcCidr}
      transitRouterId: ${tr.transitRouterId}
      trAttachmentMasterCidr: ${trAttachmentMasterCidr}
      firewallName: ${firewallName}
      firewallSubnetCidr: ${firewallSubnetCidr}
      trAttachmentSlaveCidr: ${trAttachmentSlaveCidr}
variables:
  default:
    fn::invoke:
      function: alicloud:cloudfirewall:getVpcCenTrFirewalls
      arguments:
        ids:
          - ${defaultVpcCenTrFirewall.id}
        cenId: ${cen.id}
        firewallName: ${firewallName}
        regionNo: ${region}
        routeMode: managed
        transitRouterId: ${tr.transitRouterId}
outputs:
  alicloudCloudFirewallVpcCenTrFirewallExampleId: ${default.firewalls[0].id}
Copy

Using getVpcCenTrFirewalls

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 getVpcCenTrFirewalls(args: GetVpcCenTrFirewallsArgs, opts?: InvokeOptions): Promise<GetVpcCenTrFirewallsResult>
function getVpcCenTrFirewallsOutput(args: GetVpcCenTrFirewallsOutputArgs, opts?: InvokeOptions): Output<GetVpcCenTrFirewallsResult>
Copy
def get_vpc_cen_tr_firewalls(cen_id: Optional[str] = None,
                             current_page: Optional[int] = None,
                             firewall_id: Optional[str] = None,
                             firewall_name: Optional[str] = None,
                             firewall_switch_status: Optional[str] = None,
                             ids: Optional[Sequence[str]] = None,
                             output_file: Optional[str] = None,
                             page_number: Optional[int] = None,
                             page_size: Optional[int] = None,
                             region_no: Optional[str] = None,
                             route_mode: Optional[str] = None,
                             transit_router_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetVpcCenTrFirewallsResult
def get_vpc_cen_tr_firewalls_output(cen_id: Optional[pulumi.Input[str]] = None,
                             current_page: Optional[pulumi.Input[int]] = None,
                             firewall_id: Optional[pulumi.Input[str]] = None,
                             firewall_name: Optional[pulumi.Input[str]] = None,
                             firewall_switch_status: Optional[pulumi.Input[str]] = None,
                             ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             page_number: Optional[pulumi.Input[int]] = None,
                             page_size: Optional[pulumi.Input[int]] = None,
                             region_no: Optional[pulumi.Input[str]] = None,
                             route_mode: Optional[pulumi.Input[str]] = None,
                             transit_router_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetVpcCenTrFirewallsResult]
Copy
func GetVpcCenTrFirewalls(ctx *Context, args *GetVpcCenTrFirewallsArgs, opts ...InvokeOption) (*GetVpcCenTrFirewallsResult, error)
func GetVpcCenTrFirewallsOutput(ctx *Context, args *GetVpcCenTrFirewallsOutputArgs, opts ...InvokeOption) GetVpcCenTrFirewallsResultOutput
Copy

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

public static class GetVpcCenTrFirewalls 
{
    public static Task<GetVpcCenTrFirewallsResult> InvokeAsync(GetVpcCenTrFirewallsArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcCenTrFirewallsResult> Invoke(GetVpcCenTrFirewallsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetVpcCenTrFirewallsResult> getVpcCenTrFirewalls(GetVpcCenTrFirewallsArgs args, InvokeOptions options)
public static Output<GetVpcCenTrFirewallsResult> getVpcCenTrFirewalls(GetVpcCenTrFirewallsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cloudfirewall/getVpcCenTrFirewalls:getVpcCenTrFirewalls
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CenId Changes to this property will trigger replacement. string
The ID of the CEN instance.
CurrentPage Changes to this property will trigger replacement. int
The page number of the pagination query. The default value is 1.
FirewallId Changes to this property will trigger replacement. string
Firewall ID
FirewallName Changes to this property will trigger replacement. string
The name of Cloud Firewall.
FirewallSwitchStatus Changes to this property will trigger replacement. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
Ids Changes to this property will trigger replacement. List<string>
A list of Vpc Cen Tr Firewall IDs.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
PageNumber Changes to this property will trigger replacement. int
Current page number.
PageSize Changes to this property will trigger replacement. int
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
RegionNo Changes to this property will trigger replacement. string
The region ID of the transit router instance.
RouteMode Changes to this property will trigger replacement. string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId Changes to this property will trigger replacement. string
The ID of the transit router instance.
CenId Changes to this property will trigger replacement. string
The ID of the CEN instance.
CurrentPage Changes to this property will trigger replacement. int
The page number of the pagination query. The default value is 1.
FirewallId Changes to this property will trigger replacement. string
Firewall ID
FirewallName Changes to this property will trigger replacement. string
The name of Cloud Firewall.
FirewallSwitchStatus Changes to this property will trigger replacement. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
Ids Changes to this property will trigger replacement. []string
A list of Vpc Cen Tr Firewall IDs.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
PageNumber Changes to this property will trigger replacement. int
Current page number.
PageSize Changes to this property will trigger replacement. int
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
RegionNo Changes to this property will trigger replacement. string
The region ID of the transit router instance.
RouteMode Changes to this property will trigger replacement. string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId Changes to this property will trigger replacement. string
The ID of the transit router instance.
cenId Changes to this property will trigger replacement. String
The ID of the CEN instance.
currentPage Changes to this property will trigger replacement. Integer
The page number of the pagination query. The default value is 1.
firewallId Changes to this property will trigger replacement. String
Firewall ID
firewallName Changes to this property will trigger replacement. String
The name of Cloud Firewall.
firewallSwitchStatus Changes to this property will trigger replacement. String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
ids Changes to this property will trigger replacement. List<String>
A list of Vpc Cen Tr Firewall IDs.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. Integer
Current page number.
pageSize Changes to this property will trigger replacement. Integer
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
regionNo Changes to this property will trigger replacement. String
The region ID of the transit router instance.
routeMode Changes to this property will trigger replacement. String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId Changes to this property will trigger replacement. String
The ID of the transit router instance.
cenId Changes to this property will trigger replacement. string
The ID of the CEN instance.
currentPage Changes to this property will trigger replacement. number
The page number of the pagination query. The default value is 1.
firewallId Changes to this property will trigger replacement. string
Firewall ID
firewallName Changes to this property will trigger replacement. string
The name of Cloud Firewall.
firewallSwitchStatus Changes to this property will trigger replacement. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
ids Changes to this property will trigger replacement. string[]
A list of Vpc Cen Tr Firewall IDs.
outputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. number
Current page number.
pageSize Changes to this property will trigger replacement. number
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
regionNo Changes to this property will trigger replacement. string
The region ID of the transit router instance.
routeMode Changes to this property will trigger replacement. string
The routing pattern. Value: managed: indicates automatic mode
transitRouterId Changes to this property will trigger replacement. string
The ID of the transit router instance.
cen_id Changes to this property will trigger replacement. str
The ID of the CEN instance.
current_page Changes to this property will trigger replacement. int
The page number of the pagination query. The default value is 1.
firewall_id Changes to this property will trigger replacement. str
Firewall ID
firewall_name Changes to this property will trigger replacement. str
The name of Cloud Firewall.
firewall_switch_status Changes to this property will trigger replacement. str
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Vpc Cen Tr Firewall IDs.
output_file Changes to this property will trigger replacement. str
File name where to save data source results (after running pulumi preview).
page_number Changes to this property will trigger replacement. int
Current page number.
page_size Changes to this property will trigger replacement. int
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
region_no Changes to this property will trigger replacement. str
The region ID of the transit router instance.
route_mode Changes to this property will trigger replacement. str
The routing pattern. Value: managed: indicates automatic mode
transit_router_id Changes to this property will trigger replacement. str
The ID of the transit router instance.
cenId Changes to this property will trigger replacement. String
The ID of the CEN instance.
currentPage Changes to this property will trigger replacement. Number
The page number of the pagination query. The default value is 1.
firewallId Changes to this property will trigger replacement. String
Firewall ID
firewallName Changes to this property will trigger replacement. String
The name of Cloud Firewall.
firewallSwitchStatus Changes to this property will trigger replacement. String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
ids Changes to this property will trigger replacement. List<String>
A list of Vpc Cen Tr Firewall IDs.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).
pageNumber Changes to this property will trigger replacement. Number
Current page number.
pageSize Changes to this property will trigger replacement. Number
The maximum number of pieces of data per page that are displayed during a paged query. The default value is 10.
regionNo Changes to this property will trigger replacement. String
The region ID of the transit router instance.
routeMode Changes to this property will trigger replacement. String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId Changes to this property will trigger replacement. String
The ID of the transit router instance.

getVpcCenTrFirewalls Result

The following output properties are available:

Firewalls List<Pulumi.AliCloud.CloudFirewall.Outputs.GetVpcCenTrFirewallsFirewall>
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of Vpc Cen Tr Firewall IDs.
CenId string
The ID of the CEN instance.
CurrentPage int
FirewallId string
Firewall ID
FirewallName string
The name of Cloud Firewall.
FirewallSwitchStatus string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
OutputFile string
PageNumber int
PageSize int
RegionNo string
The region ID of the transit router instance.
RouteMode string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId string
The ID of the transit router instance.
Firewalls []GetVpcCenTrFirewallsFirewall
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Vpc Cen Tr Firewall IDs.
CenId string
The ID of the CEN instance.
CurrentPage int
FirewallId string
Firewall ID
FirewallName string
The name of Cloud Firewall.
FirewallSwitchStatus string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
OutputFile string
PageNumber int
PageSize int
RegionNo string
The region ID of the transit router instance.
RouteMode string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId string
The ID of the transit router instance.
firewalls List<GetVpcCenTrFirewallsFirewall>
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Vpc Cen Tr Firewall IDs.
cenId String
The ID of the CEN instance.
currentPage Integer
firewallId String
Firewall ID
firewallName String
The name of Cloud Firewall.
firewallSwitchStatus String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
outputFile String
pageNumber Integer
pageSize Integer
regionNo String
The region ID of the transit router instance.
routeMode String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId String
The ID of the transit router instance.
firewalls GetVpcCenTrFirewallsFirewall[]
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Vpc Cen Tr Firewall IDs.
cenId string
The ID of the CEN instance.
currentPage number
firewallId string
Firewall ID
firewallName string
The name of Cloud Firewall.
firewallSwitchStatus string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
outputFile string
pageNumber number
pageSize number
regionNo string
The region ID of the transit router instance.
routeMode string
The routing pattern. Value: managed: indicates automatic mode
transitRouterId string
The ID of the transit router instance.
firewalls Sequence[GetVpcCenTrFirewallsFirewall]
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Vpc Cen Tr Firewall IDs.
cen_id str
The ID of the CEN instance.
current_page int
firewall_id str
Firewall ID
firewall_name str
The name of Cloud Firewall.
firewall_switch_status str
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
output_file str
page_number int
page_size int
region_no str
The region ID of the transit router instance.
route_mode str
The routing pattern. Value: managed: indicates automatic mode
transit_router_id str
The ID of the transit router instance.
firewalls List<Property Map>
A list of Vpc Cen Tr Firewall Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Vpc Cen Tr Firewall IDs.
cenId String
The ID of the CEN instance.
currentPage Number
firewallId String
Firewall ID
firewallName String
The name of Cloud Firewall.
firewallSwitchStatus String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
outputFile String
pageNumber Number
pageSize Number
regionNo String
The region ID of the transit router instance.
routeMode String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId String
The ID of the transit router instance.

Supporting Types

GetVpcCenTrFirewallsFirewall

CenId This property is required. string
The ID of the CEN instance.
CenName This property is required. string
The name of the CEN instance.
FirewallId This property is required. string
Firewall ID
FirewallName This property is required. string
The name of Cloud Firewall.
FirewallSwitchStatus This property is required. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
Id This property is required. string
The ID of the resource supplied above.
IpsConfig This property is required. Pulumi.AliCloud.CloudFirewall.Inputs.GetVpcCenTrFirewallsFirewallIpsConfig
IPS configuration information.
PrecheckStatus This property is required. string
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
RegionNo This property is required. string
The region ID of the transit router instance.
RegionStatus This property is required. string
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
ResultCode This property is required. string
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
RouteMode This property is required. string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId This property is required. string
The ID of the transit router instance.
CenId This property is required. string
The ID of the CEN instance.
CenName This property is required. string
The name of the CEN instance.
FirewallId This property is required. string
Firewall ID
FirewallName This property is required. string
The name of Cloud Firewall.
FirewallSwitchStatus This property is required. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
Id This property is required. string
The ID of the resource supplied above.
IpsConfig This property is required. GetVpcCenTrFirewallsFirewallIpsConfig
IPS configuration information.
PrecheckStatus This property is required. string
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
RegionNo This property is required. string
The region ID of the transit router instance.
RegionStatus This property is required. string
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
ResultCode This property is required. string
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
RouteMode This property is required. string
The routing pattern. Value: managed: indicates automatic mode
TransitRouterId This property is required. string
The ID of the transit router instance.
cenId This property is required. String
The ID of the CEN instance.
cenName This property is required. String
The name of the CEN instance.
firewallId This property is required. String
Firewall ID
firewallName This property is required. String
The name of Cloud Firewall.
firewallSwitchStatus This property is required. String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
id This property is required. String
The ID of the resource supplied above.
ipsConfig This property is required. GetVpcCenTrFirewallsFirewallIpsConfig
IPS configuration information.
precheckStatus This property is required. String
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
regionNo This property is required. String
The region ID of the transit router instance.
regionStatus This property is required. String
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
resultCode This property is required. String
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
routeMode This property is required. String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId This property is required. String
The ID of the transit router instance.
cenId This property is required. string
The ID of the CEN instance.
cenName This property is required. string
The name of the CEN instance.
firewallId This property is required. string
Firewall ID
firewallName This property is required. string
The name of Cloud Firewall.
firewallSwitchStatus This property is required. string
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
id This property is required. string
The ID of the resource supplied above.
ipsConfig This property is required. GetVpcCenTrFirewallsFirewallIpsConfig
IPS configuration information.
precheckStatus This property is required. string
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
regionNo This property is required. string
The region ID of the transit router instance.
regionStatus This property is required. string
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
resultCode This property is required. string
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
routeMode This property is required. string
The routing pattern. Value: managed: indicates automatic mode
transitRouterId This property is required. string
The ID of the transit router instance.
cen_id This property is required. str
The ID of the CEN instance.
cen_name This property is required. str
The name of the CEN instance.
firewall_id This property is required. str
Firewall ID
firewall_name This property is required. str
The name of Cloud Firewall.
firewall_switch_status This property is required. str
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
id This property is required. str
The ID of the resource supplied above.
ips_config This property is required. GetVpcCenTrFirewallsFirewallIpsConfig
IPS configuration information.
precheck_status This property is required. str
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
region_no This property is required. str
The region ID of the transit router instance.
region_status This property is required. str
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
result_code This property is required. str
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
route_mode This property is required. str
The routing pattern. Value: managed: indicates automatic mode
transit_router_id This property is required. str
The ID of the transit router instance.
cenId This property is required. String
The ID of the CEN instance.
cenName This property is required. String
The name of the CEN instance.
firewallId This property is required. String
Firewall ID
firewallName This property is required. String
The name of Cloud Firewall.
firewallSwitchStatus This property is required. String
The status of the VPC boundary firewall. Value:-opened: opened-closed: closed-notconfigured: indicates that the VPC boundary firewall has not been configured yet.-configured: indicates that the VPC boundary firewall has been configured.-creating: indicates that a VPC boundary firewall is being created.-opening: indicates that the VPC border firewall is being enabled.-deleting: indicates that the VPC boundary firewall is being deleted.> If this parameter is not set, the VPC boundary firewall in all states is queried.
id This property is required. String
The ID of the resource supplied above.
ipsConfig This property is required. Property Map
IPS configuration information.
precheckStatus This property is required. String
Whether the wall can be opened automatically. Value:-passed: can automatically open the wall-failed: The wall cannot be opened automatically-unknown: unknown status
regionNo This property is required. String
The region ID of the transit router instance.
regionStatus This property is required. String
Geographically open. Value:-enable: enabled, indicating that the VPC border firewall can be configured for the region.-disable: Not enabled, indicating that the VPC boundary firewall is not allowed for the region.
resultCode This property is required. String
The operation result code of creating the VPC boundary firewall. Value:-RegionDisable: indicates that the region where the network instance is located is not supported by the VPC border firewall. You cannot create a VPC border firewall.-Empty string, indicating that the network instance can create a VPC firewall.
routeMode This property is required. String
The routing pattern. Value: managed: indicates automatic mode
transitRouterId This property is required. String
The ID of the transit router instance.

GetVpcCenTrFirewallsFirewallIpsConfig

BasicRules This property is required. int
Basic rule switch. Value:-1: On-0: Closed state.
EnableAllPatch This property is required. int
Virtual patch switch. Value:-1: On-0: Closed state.
RunMode This property is required. int
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.
BasicRules This property is required. int
Basic rule switch. Value:-1: On-0: Closed state.
EnableAllPatch This property is required. int
Virtual patch switch. Value:-1: On-0: Closed state.
RunMode This property is required. int
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.
basicRules This property is required. Integer
Basic rule switch. Value:-1: On-0: Closed state.
enableAllPatch This property is required. Integer
Virtual patch switch. Value:-1: On-0: Closed state.
runMode This property is required. Integer
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.
basicRules This property is required. number
Basic rule switch. Value:-1: On-0: Closed state.
enableAllPatch This property is required. number
Virtual patch switch. Value:-1: On-0: Closed state.
runMode This property is required. number
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.
basic_rules This property is required. int
Basic rule switch. Value:-1: On-0: Closed state.
enable_all_patch This property is required. int
Virtual patch switch. Value:-1: On-0: Closed state.
run_mode This property is required. int
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.
basicRules This property is required. Number
Basic rule switch. Value:-1: On-0: Closed state.
enableAllPatch This property is required. Number
Virtual patch switch. Value:-1: On-0: Closed state.
runMode This property is required. Number
IPS defense mode. Value:-1: Intercept mode-0: Observation mode.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi