package cen

import (
	"context"
	"reflect"

	"github.com/pkg/errors"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

type TransitRouterVpcAttachment struct {
	pulumi.CustomResourceState

	AutoCreateVpcRoute pulumi.BoolPtrOutput `pulumi:"autoCreateVpcRoute"`

	CenId pulumi.StringOutput `pulumi:"cenId"`

	DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`

	ResourceType pulumi.StringPtrOutput `pulumi:"resourceType"`

	RouteTableAssociationEnabled pulumi.BoolPtrOutput `pulumi:"routeTableAssociationEnabled"`

	RouteTablePropagationEnabled pulumi.BoolPtrOutput `pulumi:"routeTablePropagationEnabled"`

	Status pulumi.StringOutput `pulumi:"status"`

	TransitRouterAttachmentDescription pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentDescription"`

	TransitRouterAttachmentId pulumi.StringOutput `pulumi:"transitRouterAttachmentId"`

	TransitRouterAttachmentName pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentName"`

	TransitRouterId pulumi.StringPtrOutput `pulumi:"transitRouterId"`

	VpcId pulumi.StringOutput `pulumi:"vpcId"`

	VpcOwnerId   pulumi.StringOutput                              `pulumi:"vpcOwnerId"`
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayOutput `pulumi:"zoneMappings"`
}

func NewTransitRouterVpcAttachment(ctx *pulumi.Context,
	name string, args *TransitRouterVpcAttachmentArgs, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.CenId == nil {
		return nil, errors.New("invalid value for required argument 'CenId'")
	}
	if args.VpcId == nil {
		return nil, errors.New("invalid value for required argument 'VpcId'")
	}
	if args.ZoneMappings == nil {
		return nil, errors.New("invalid value for required argument 'ZoneMappings'")
	}
	var resource TransitRouterVpcAttachment
	err := ctx.RegisterResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

func GetTransitRouterVpcAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TransitRouterVpcAttachmentState, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
	var resource TransitRouterVpcAttachment
	err := ctx.ReadResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

type transitRouterVpcAttachmentState struct {

	AutoCreateVpcRoute *bool `pulumi:"autoCreateVpcRoute"`

	CenId *string `pulumi:"cenId"`

	DryRun *bool `pulumi:"dryRun"`

	ResourceType *string `pulumi:"resourceType"`

	RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`

	RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`

	Status *string `pulumi:"status"`

	TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`

	TransitRouterAttachmentId *string `pulumi:"transitRouterAttachmentId"`

	TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`

	TransitRouterId *string `pulumi:"transitRouterId"`

	VpcId *string `pulumi:"vpcId"`

	VpcOwnerId   *string                                 `pulumi:"vpcOwnerId"`
	ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}

type TransitRouterVpcAttachmentState struct {

	AutoCreateVpcRoute pulumi.BoolPtrInput

	CenId pulumi.StringPtrInput

	DryRun pulumi.BoolPtrInput

	ResourceType pulumi.StringPtrInput

	RouteTableAssociationEnabled pulumi.BoolPtrInput

	RouteTablePropagationEnabled pulumi.BoolPtrInput

	Status pulumi.StringPtrInput

	TransitRouterAttachmentDescription pulumi.StringPtrInput

	TransitRouterAttachmentId pulumi.StringPtrInput

	TransitRouterAttachmentName pulumi.StringPtrInput

	TransitRouterId pulumi.StringPtrInput

	VpcId pulumi.StringPtrInput

	VpcOwnerId   pulumi.StringPtrInput
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}

func (TransitRouterVpcAttachmentState) ElementType() reflect.Type {
	return reflect.TypeOf((*transitRouterVpcAttachmentState)(nil)).Elem()
}

type transitRouterVpcAttachmentArgs struct {

	AutoCreateVpcRoute *bool `pulumi:"autoCreateVpcRoute"`

	CenId string `pulumi:"cenId"`

	DryRun *bool `pulumi:"dryRun"`

	ResourceType *string `pulumi:"resourceType"`

	RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`

	RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`

	TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`

	TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`

	TransitRouterId *string `pulumi:"transitRouterId"`

	VpcId string `pulumi:"vpcId"`

	VpcOwnerId   *string                                 `pulumi:"vpcOwnerId"`
	ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}

type TransitRouterVpcAttachmentArgs struct {

	AutoCreateVpcRoute pulumi.BoolPtrInput

	CenId pulumi.StringInput

	DryRun pulumi.BoolPtrInput

	ResourceType pulumi.StringPtrInput

	RouteTableAssociationEnabled pulumi.BoolPtrInput

	RouteTablePropagationEnabled pulumi.BoolPtrInput

	TransitRouterAttachmentDescription pulumi.StringPtrInput

	TransitRouterAttachmentName pulumi.StringPtrInput

	TransitRouterId pulumi.StringPtrInput

	VpcId pulumi.StringInput

	VpcOwnerId   pulumi.StringPtrInput
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}

func (TransitRouterVpcAttachmentArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*transitRouterVpcAttachmentArgs)(nil)).Elem()
}

type TransitRouterVpcAttachmentInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput
	ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput
}

func (*TransitRouterVpcAttachment) ElementType() reflect.Type {
	return reflect.TypeOf((*TransitRouterVpcAttachment)(nil))
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
	return i.ToTransitRouterVpcAttachmentOutputWithContext(context.Background())
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentOutput)
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return i.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentPtrOutput)
}

type TransitRouterVpcAttachmentPtrInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput
	ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput
}

type transitRouterVpcAttachmentPtrType TransitRouterVpcAttachmentArgs

func (*transitRouterVpcAttachmentPtrType) ElementType() reflect.Type {
	return reflect.TypeOf((**TransitRouterVpcAttachment)(nil))
}

func (i *transitRouterVpcAttachmentPtrType) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return i.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (i *transitRouterVpcAttachmentPtrType) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentPtrOutput)
}

type TransitRouterVpcAttachmentArrayInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput
	ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Context) TransitRouterVpcAttachmentArrayOutput
}

type TransitRouterVpcAttachmentArray []TransitRouterVpcAttachmentInput

func (TransitRouterVpcAttachmentArray) ElementType() reflect.Type {
	return reflect.TypeOf(([]*TransitRouterVpcAttachment)(nil))
}

func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
	return i.ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Background())
}

func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentArrayOutput)
}

type TransitRouterVpcAttachmentMapInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput
	ToTransitRouterVpcAttachmentMapOutputWithContext(context.Context) TransitRouterVpcAttachmentMapOutput
}

type TransitRouterVpcAttachmentMap map[string]TransitRouterVpcAttachmentInput

func (TransitRouterVpcAttachmentMap) ElementType() reflect.Type {
	return reflect.TypeOf((map[string]*TransitRouterVpcAttachment)(nil))
}

func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
	return i.ToTransitRouterVpcAttachmentMapOutputWithContext(context.Background())
}

func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentMapOutput)
}

type TransitRouterVpcAttachmentOutput struct {
	*pulumi.OutputState
}

func (TransitRouterVpcAttachmentOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
	return o
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
	return o
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return o.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return o.ApplyT(func(v TransitRouterVpcAttachment) *TransitRouterVpcAttachment {
		return &v
	}).(TransitRouterVpcAttachmentPtrOutput)
}

type TransitRouterVpcAttachmentPtrOutput struct {
	*pulumi.OutputState
}

func (TransitRouterVpcAttachmentPtrOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentPtrOutput) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return o
}

func (o TransitRouterVpcAttachmentPtrOutput) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return o
}

type TransitRouterVpcAttachmentArrayOutput struct{ *pulumi.OutputState }

func (TransitRouterVpcAttachmentArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
	return o
}

func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
	return o
}

func (o TransitRouterVpcAttachmentArrayOutput) Index(i pulumi.IntInput) TransitRouterVpcAttachmentOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) TransitRouterVpcAttachment {
		return vs[0].([]TransitRouterVpcAttachment)[vs[1].(int)]
	}).(TransitRouterVpcAttachmentOutput)
}

type TransitRouterVpcAttachmentMapOutput struct{ *pulumi.OutputState }

func (TransitRouterVpcAttachmentMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
	return o
}

func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
	return o
}

func (o TransitRouterVpcAttachmentMapOutput) MapIndex(k pulumi.StringInput) TransitRouterVpcAttachmentOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) TransitRouterVpcAttachment {
		return vs[0].(map[string]TransitRouterVpcAttachment)[vs[1].(string)]
	}).(TransitRouterVpcAttachmentOutput)
}

func init() {
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentPtrOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentArrayOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentMapOutput{})
}
// *** 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! ***

package cen

import (
	"context"
	"reflect"

	"github.com/pkg/errors"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

// Provides a CEN transit router VPC attachment resource that associate the VPC with the CEN instance. [What is Cen Transit Router VPC Attachment](https://help.aliyun.com/document_detail/261358.html)
//
// > **NOTE:** Available in 1.126.0+
//
// ## Import
//
// CEN instance can be imported using the id, e.g.
//
// ```sh
//  $ pulumi import alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment example tr-********:tr-attach-********
// ```
type TransitRouterVpcAttachment struct {
	pulumi.CustomResourceState

	// Whether to create vpc route automatically. The system default value is `true`.
	AutoCreateVpcRoute pulumi.BoolPtrOutput `pulumi:"autoCreateVpcRoute"`
	// The ID of the CEN.
	CenId pulumi.StringOutput `pulumi:"cenId"`
	// The dry run.
	DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
	// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
	ResourceType pulumi.StringPtrOutput `pulumi:"resourceType"`
	// Whether to enabled route table association. The system default value is `true`.
	RouteTableAssociationEnabled pulumi.BoolPtrOutput `pulumi:"routeTableAssociationEnabled"`
	// Whether to enabled route table propagation. The system default value is `true`.
	RouteTablePropagationEnabled pulumi.BoolPtrOutput `pulumi:"routeTablePropagationEnabled"`
	// The associating status of the network.
	Status pulumi.StringOutput `pulumi:"status"`
	// The description of the transit router vbr attachment.
	TransitRouterAttachmentDescription pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentDescription"`
	// The ID of transit router attachment.
	TransitRouterAttachmentId pulumi.StringOutput `pulumi:"transitRouterAttachmentId"`
	// The name of the transit router vbr attachment.
	TransitRouterAttachmentName pulumi.StringPtrOutput `pulumi:"transitRouterAttachmentName"`
	// The ID of the transit router.
	TransitRouterId pulumi.StringPtrOutput `pulumi:"transitRouterId"`
	// The ID of the VPC.
	VpcId pulumi.StringOutput `pulumi:"vpcId"`
	// The owner id of vpc.
	VpcOwnerId   pulumi.StringOutput                              `pulumi:"vpcOwnerId"`
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayOutput `pulumi:"zoneMappings"`
}

// NewTransitRouterVpcAttachment registers a new resource with the given unique name, arguments, and options.
func NewTransitRouterVpcAttachment(ctx *pulumi.Context,
	name string, args *TransitRouterVpcAttachmentArgs, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.CenId == nil {
		return nil, errors.New("invalid value for required argument 'CenId'")
	}
	if args.VpcId == nil {
		return nil, errors.New("invalid value for required argument 'VpcId'")
	}
	if args.ZoneMappings == nil {
		return nil, errors.New("invalid value for required argument 'ZoneMappings'")
	}
	var resource TransitRouterVpcAttachment
	err := ctx.RegisterResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// GetTransitRouterVpcAttachment gets an existing TransitRouterVpcAttachment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTransitRouterVpcAttachment(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *TransitRouterVpcAttachmentState, opts ...pulumi.ResourceOption) (*TransitRouterVpcAttachment, error) {
	var resource TransitRouterVpcAttachment
	err := ctx.ReadResource("alicloud:cen/transitRouterVpcAttachment:TransitRouterVpcAttachment", name, id, state, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}

// Input properties used for looking up and filtering TransitRouterVpcAttachment resources.
type transitRouterVpcAttachmentState struct {
	// Whether to create vpc route automatically. The system default value is `true`.
	AutoCreateVpcRoute *bool `pulumi:"autoCreateVpcRoute"`
	// The ID of the CEN.
	CenId *string `pulumi:"cenId"`
	// The dry run.
	DryRun *bool `pulumi:"dryRun"`
	// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
	ResourceType *string `pulumi:"resourceType"`
	// Whether to enabled route table association. The system default value is `true`.
	RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`
	// Whether to enabled route table propagation. The system default value is `true`.
	RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`
	// The associating status of the network.
	Status *string `pulumi:"status"`
	// The description of the transit router vbr attachment.
	TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`
	// The ID of transit router attachment.
	TransitRouterAttachmentId *string `pulumi:"transitRouterAttachmentId"`
	// The name of the transit router vbr attachment.
	TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`
	// The ID of the transit router.
	TransitRouterId *string `pulumi:"transitRouterId"`
	// The ID of the VPC.
	VpcId *string `pulumi:"vpcId"`
	// The owner id of vpc.
	VpcOwnerId   *string                                 `pulumi:"vpcOwnerId"`
	ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}

type TransitRouterVpcAttachmentState struct {
	// Whether to create vpc route automatically. The system default value is `true`.
	AutoCreateVpcRoute pulumi.BoolPtrInput
	// The ID of the CEN.
	CenId pulumi.StringPtrInput
	// The dry run.
	DryRun pulumi.BoolPtrInput
	// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
	ResourceType pulumi.StringPtrInput
	// Whether to enabled route table association. The system default value is `true`.
	RouteTableAssociationEnabled pulumi.BoolPtrInput
	// Whether to enabled route table propagation. The system default value is `true`.
	RouteTablePropagationEnabled pulumi.BoolPtrInput
	// The associating status of the network.
	Status pulumi.StringPtrInput
	// The description of the transit router vbr attachment.
	TransitRouterAttachmentDescription pulumi.StringPtrInput
	// The ID of transit router attachment.
	TransitRouterAttachmentId pulumi.StringPtrInput
	// The name of the transit router vbr attachment.
	TransitRouterAttachmentName pulumi.StringPtrInput
	// The ID of the transit router.
	TransitRouterId pulumi.StringPtrInput
	// The ID of the VPC.
	VpcId pulumi.StringPtrInput
	// The owner id of vpc.
	VpcOwnerId   pulumi.StringPtrInput
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}

func (TransitRouterVpcAttachmentState) ElementType() reflect.Type {
	return reflect.TypeOf((*transitRouterVpcAttachmentState)(nil)).Elem()
}

type transitRouterVpcAttachmentArgs struct {
	// Whether to create vpc route automatically. The system default value is `true`.
	AutoCreateVpcRoute *bool `pulumi:"autoCreateVpcRoute"`
	// The ID of the CEN.
	CenId string `pulumi:"cenId"`
	// The dry run.
	DryRun *bool `pulumi:"dryRun"`
	// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
	ResourceType *string `pulumi:"resourceType"`
	// Whether to enabled route table association. The system default value is `true`.
	RouteTableAssociationEnabled *bool `pulumi:"routeTableAssociationEnabled"`
	// Whether to enabled route table propagation. The system default value is `true`.
	RouteTablePropagationEnabled *bool `pulumi:"routeTablePropagationEnabled"`
	// The description of the transit router vbr attachment.
	TransitRouterAttachmentDescription *string `pulumi:"transitRouterAttachmentDescription"`
	// The name of the transit router vbr attachment.
	TransitRouterAttachmentName *string `pulumi:"transitRouterAttachmentName"`
	// The ID of the transit router.
	TransitRouterId *string `pulumi:"transitRouterId"`
	// The ID of the VPC.
	VpcId string `pulumi:"vpcId"`
	// The owner id of vpc.
	VpcOwnerId   *string                                 `pulumi:"vpcOwnerId"`
	ZoneMappings []TransitRouterVpcAttachmentZoneMapping `pulumi:"zoneMappings"`
}

// The set of arguments for constructing a TransitRouterVpcAttachment resource.
type TransitRouterVpcAttachmentArgs struct {
	// Whether to create vpc route automatically. The system default value is `true`.
	AutoCreateVpcRoute pulumi.BoolPtrInput
	// The ID of the CEN.
	CenId pulumi.StringInput
	// The dry run.
	DryRun pulumi.BoolPtrInput
	// The resource type of transit router vpc attachment. Valid value `VPC`. Default value is `VPC`.
	ResourceType pulumi.StringPtrInput
	// Whether to enabled route table association. The system default value is `true`.
	RouteTableAssociationEnabled pulumi.BoolPtrInput
	// Whether to enabled route table propagation. The system default value is `true`.
	RouteTablePropagationEnabled pulumi.BoolPtrInput
	// The description of the transit router vbr attachment.
	TransitRouterAttachmentDescription pulumi.StringPtrInput
	// The name of the transit router vbr attachment.
	TransitRouterAttachmentName pulumi.StringPtrInput
	// The ID of the transit router.
	TransitRouterId pulumi.StringPtrInput
	// The ID of the VPC.
	VpcId pulumi.StringInput
	// The owner id of vpc.
	VpcOwnerId   pulumi.StringPtrInput
	ZoneMappings TransitRouterVpcAttachmentZoneMappingArrayInput
}

func (TransitRouterVpcAttachmentArgs) ElementType() reflect.Type {
	return reflect.TypeOf((*transitRouterVpcAttachmentArgs)(nil)).Elem()
}

type TransitRouterVpcAttachmentInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput
	ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput
}

func (*TransitRouterVpcAttachment) ElementType() reflect.Type {
	return reflect.TypeOf((*TransitRouterVpcAttachment)(nil))
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
	return i.ToTransitRouterVpcAttachmentOutputWithContext(context.Background())
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentOutput)
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return i.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (i *TransitRouterVpcAttachment) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentPtrOutput)
}

type TransitRouterVpcAttachmentPtrInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput
	ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput
}

type transitRouterVpcAttachmentPtrType TransitRouterVpcAttachmentArgs

func (*transitRouterVpcAttachmentPtrType) ElementType() reflect.Type {
	return reflect.TypeOf((**TransitRouterVpcAttachment)(nil))
}

func (i *transitRouterVpcAttachmentPtrType) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return i.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (i *transitRouterVpcAttachmentPtrType) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentPtrOutput)
}

// TransitRouterVpcAttachmentArrayInput is an input type that accepts TransitRouterVpcAttachmentArray and TransitRouterVpcAttachmentArrayOutput values.
// You can construct a concrete instance of `TransitRouterVpcAttachmentArrayInput` via:
//
//          TransitRouterVpcAttachmentArray{ TransitRouterVpcAttachmentArgs{...} }
type TransitRouterVpcAttachmentArrayInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput
	ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Context) TransitRouterVpcAttachmentArrayOutput
}

type TransitRouterVpcAttachmentArray []TransitRouterVpcAttachmentInput

func (TransitRouterVpcAttachmentArray) ElementType() reflect.Type {
	return reflect.TypeOf(([]*TransitRouterVpcAttachment)(nil))
}

func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
	return i.ToTransitRouterVpcAttachmentArrayOutputWithContext(context.Background())
}

func (i TransitRouterVpcAttachmentArray) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentArrayOutput)
}

// TransitRouterVpcAttachmentMapInput is an input type that accepts TransitRouterVpcAttachmentMap and TransitRouterVpcAttachmentMapOutput values.
// You can construct a concrete instance of `TransitRouterVpcAttachmentMapInput` via:
//
//          TransitRouterVpcAttachmentMap{ "key": TransitRouterVpcAttachmentArgs{...} }
type TransitRouterVpcAttachmentMapInput interface {
	pulumi.Input

	ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput
	ToTransitRouterVpcAttachmentMapOutputWithContext(context.Context) TransitRouterVpcAttachmentMapOutput
}

type TransitRouterVpcAttachmentMap map[string]TransitRouterVpcAttachmentInput

func (TransitRouterVpcAttachmentMap) ElementType() reflect.Type {
	return reflect.TypeOf((map[string]*TransitRouterVpcAttachment)(nil))
}

func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
	return i.ToTransitRouterVpcAttachmentMapOutputWithContext(context.Background())
}

func (i TransitRouterVpcAttachmentMap) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
	return pulumi.ToOutputWithContext(ctx, i).(TransitRouterVpcAttachmentMapOutput)
}

type TransitRouterVpcAttachmentOutput struct {
	*pulumi.OutputState
}

func (TransitRouterVpcAttachmentOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutput() TransitRouterVpcAttachmentOutput {
	return o
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentOutput {
	return o
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return o.ToTransitRouterVpcAttachmentPtrOutputWithContext(context.Background())
}

func (o TransitRouterVpcAttachmentOutput) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return o.ApplyT(func(v TransitRouterVpcAttachment) *TransitRouterVpcAttachment {
		return &v
	}).(TransitRouterVpcAttachmentPtrOutput)
}

type TransitRouterVpcAttachmentPtrOutput struct {
	*pulumi.OutputState
}

func (TransitRouterVpcAttachmentPtrOutput) ElementType() reflect.Type {
	return reflect.TypeOf((**TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentPtrOutput) ToTransitRouterVpcAttachmentPtrOutput() TransitRouterVpcAttachmentPtrOutput {
	return o
}

func (o TransitRouterVpcAttachmentPtrOutput) ToTransitRouterVpcAttachmentPtrOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentPtrOutput {
	return o
}

type TransitRouterVpcAttachmentArrayOutput struct{ *pulumi.OutputState }

func (TransitRouterVpcAttachmentArrayOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*[]TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutput() TransitRouterVpcAttachmentArrayOutput {
	return o
}

func (o TransitRouterVpcAttachmentArrayOutput) ToTransitRouterVpcAttachmentArrayOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentArrayOutput {
	return o
}

func (o TransitRouterVpcAttachmentArrayOutput) Index(i pulumi.IntInput) TransitRouterVpcAttachmentOutput {
	return pulumi.All(o, i).ApplyT(func(vs []interface{}) TransitRouterVpcAttachment {
		return vs[0].([]TransitRouterVpcAttachment)[vs[1].(int)]
	}).(TransitRouterVpcAttachmentOutput)
}

type TransitRouterVpcAttachmentMapOutput struct{ *pulumi.OutputState }

func (TransitRouterVpcAttachmentMapOutput) ElementType() reflect.Type {
	return reflect.TypeOf((*map[string]TransitRouterVpcAttachment)(nil))
}

func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutput() TransitRouterVpcAttachmentMapOutput {
	return o
}

func (o TransitRouterVpcAttachmentMapOutput) ToTransitRouterVpcAttachmentMapOutputWithContext(ctx context.Context) TransitRouterVpcAttachmentMapOutput {
	return o
}

func (o TransitRouterVpcAttachmentMapOutput) MapIndex(k pulumi.StringInput) TransitRouterVpcAttachmentOutput {
	return pulumi.All(o, k).ApplyT(func(vs []interface{}) TransitRouterVpcAttachment {
		return vs[0].(map[string]TransitRouterVpcAttachment)[vs[1].(string)]
	}).(TransitRouterVpcAttachmentOutput)
}

func init() {
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentPtrOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentArrayOutput{})
	pulumi.RegisterOutputType(TransitRouterVpcAttachmentMapOutput{})
}
