예제 #1
0
        public async Task <string> CreatePeeringConnection(SA_Vpc requesterVpc, SA_Vpc accepterVpc)
        {
            var peeringConnectionId = await ec2Helper.CreatePeeringConnection(
                //AwsCommon.GetEnvironmentAccounts()[GlobalVariables.Enviroment].Account ,
                GlobalVariables.EnvironmentAccounts[GlobalVariables.Enviroment].Account,
                requesterVpc.VpcId, accepterVpc.VpcId,
                Utils.FormatresourceName(SA_ResourceTypeName.RdsPeeringConnection));

            await Task.Delay(5000);

            await ec2Helper.AcceptPeeringConnection(peeringConnectionId);

            await AddPeeringConnectionToRouteTables(requesterVpc, accepterVpc, peeringConnectionId);

            return(peeringConnectionId);
        }