"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.RouteTablePropagation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage transit router route table propagation
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@pulumi/volcengine";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const fooTransitRouter = new volcengine.transit_router.TransitRouter("fooTransitRouter", {
 *     transitRouterName: "test-tf-acc",
 *     description: "test-tf-acc",
 * });
 * const fooRouteTable = new volcengine.transit_router.RouteTable("fooRouteTable", {
 *     description: "tf-test-acc-description",
 *     transitRouterRouteTableName: "tf-table-test-acc",
 *     transitRouterId: fooTransitRouter.id,
 * });
 * const fooZones = volcengine.ecs.getZones({});
 * const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
 *     vpcName: "acc-test-vpc-acc",
 *     cidrBlock: "172.16.0.0/16",
 * });
 * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
 *     vpcId: fooVpc.id,
 *     cidrBlock: "172.16.0.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
 *     subnetName: "acc-test-subnet",
 * });
 * const foo2 = new volcengine.vpc.Subnet("foo2", {
 *     vpcId: fooVpc.id,
 *     cidrBlock: "172.16.255.0/24",
 *     zoneId: fooZones.then(fooZones => fooZones.zones?.[1]?.id),
 *     subnetName: "acc-test-subnet2",
 * });
 * const fooVpcAttachment = new volcengine.transit_router.VpcAttachment("fooVpcAttachment", {
 *     transitRouterId: fooTransitRouter.id,
 *     vpcId: fooVpc.id,
 *     attachPoints: [
 *         {
 *             subnetId: fooSubnet.id,
 *             zoneId: "cn-beijing-a",
 *         },
 *         {
 *             subnetId: foo2.id,
 *             zoneId: "cn-beijing-b",
 *         },
 *     ],
 *     transitRouterAttachmentName: "tf-test-acc-name1",
 *     description: "tf-test-acc-description",
 * });
 * const fooRouteTablePropagation = new volcengine.transit_router.RouteTablePropagation("fooRouteTablePropagation", {
 *     transitRouterAttachmentId: fooVpcAttachment.transitRouterAttachmentId,
 *     transitRouterRouteTableId: fooRouteTable.transitRouterRouteTableId,
 * });
 * ```
 *
 * ## Import
 *
 * TransitRouterRouteTablePropagation can be imported using the propagation:TransitRouterAttachmentId:TransitRouterRouteTableId, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:transit_router/routeTablePropagation:RouteTablePropagation default propagation:tr-attach-13n2l4c****:tr-rt-1i5i8khf9m58gae5kcx6****
 * ```
 */
class RouteTablePropagation extends pulumi.CustomResource {
    /**
     * Get an existing RouteTablePropagation resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name, id, state, opts) {
        return new RouteTablePropagation(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of RouteTablePropagation.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === RouteTablePropagation.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["transitRouterAttachmentId"] = state ? state.transitRouterAttachmentId : undefined;
            resourceInputs["transitRouterRouteTableId"] = state ? state.transitRouterRouteTableId : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.transitRouterAttachmentId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'transitRouterAttachmentId'");
            }
            if ((!args || args.transitRouterRouteTableId === undefined) && !opts.urn) {
                throw new Error("Missing required property 'transitRouterRouteTableId'");
            }
            resourceInputs["transitRouterAttachmentId"] = args ? args.transitRouterAttachmentId : undefined;
            resourceInputs["transitRouterRouteTableId"] = args ? args.transitRouterRouteTableId : undefined;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(RouteTablePropagation.__pulumiType, name, resourceInputs, opts);
    }
}
exports.RouteTablePropagation = RouteTablePropagation;
/** @internal */
RouteTablePropagation.__pulumiType = 'volcengine:transit_router/routeTablePropagation:RouteTablePropagation';
//# sourceMappingURL=routeTablePropagation.js.map