rough-ice-18151
11/14/2024, 5:22 PMaws:ec2:VpcPeeringConnection (0000000-vpc-000000000):
error: sdk-v2/provider2.go:520: sdk.helper_schema: Unable to modify EC2 VPC Peering Connection Options. EC2 VPC Peering Connection (pcx-0000000000000) is not active (current status: pending-acceptance). Please set the `auto_accept` attribute to `true` or activate the EC2 VPC Peering Connection manually.: provider=aws@6.56.1
error: 1 error occurred:
* Unable to modify EC2 VPC Peering Connection Options. EC2 VPC Peering Connection (pcx-00000000000) is not active (current status: pending-acceptance). Please set the `auto_accept` attribute to `true` or activate the EC2 VPC Peering Connection manually.
steep-secretary-65224
11/14/2024, 5:40 PMsteep-secretary-65224
11/14/2024, 5:41 PMrough-ice-18151
11/14/2024, 5:42 PMsteep-secretary-65224
11/14/2024, 5:42 PMrough-ice-18151
11/14/2024, 5:43 PMvar conn *ec2.VpcPeeringConnection
if conn, err = ec2.NewVpcPeeringConnection(ctx, fmt.Sprintf("%s-%s", peer.AccountId, peer.VpcId), &ec2.VpcPeeringConnectionArgs{
VpcId: vpc.ID(),
PeerVpcId: pulumi.String(peer.VpcId),
PeerOwnerId: pulumi.String(peer.AccountId),
AutoAccept: pulumi.BoolPtr(false),
Requester: ec2.VpcPeeringConnectionRequesterArgs{
AllowRemoteVpcDnsResolution: pulumi.BoolPtr(true),
},
Tags: pulumi.ToStringMap(vpcOpts.Tags),
}, pulumi.Parent(&componentResource)); err != nil {
return nil, err
}
rough-ice-18151
11/14/2024, 5:44 PMsteep-secretary-65224
11/14/2024, 5:45 PMpeer*
arguments
const peeringConnectionArgs = {
vpcId: source.vpcId,
peerVpcId: target.vpcId,
...(region === peerRegion && accountId === peerOwnerId
? { autoAccept: true }
: { peerOwnerId, peerRegion }),
}
rough-ice-18151
11/14/2024, 5:45 PMsteep-secretary-65224
11/14/2024, 5:46 PMautoAccepted
either. so you effectively treat them the same way as cross accountsteep-secretary-65224
11/14/2024, 5:47 PMrough-ice-18151
11/14/2024, 5:47 PMrough-ice-18151
11/14/2024, 5:47 PMsteep-secretary-65224
11/14/2024, 5:47 PMrough-ice-18151
11/14/2024, 5:48 PMrough-ice-18151
11/14/2024, 5:50 PMsteep-secretary-65224
11/14/2024, 5:51 PMaccount-region
pair and then passing stuff back and forth. like ill createPeeringConnection
in one provider, then pass that to another provider to acceptPeeringConnection
rough-ice-18151
11/14/2024, 5:52 PMsteep-secretary-65224
11/14/2024, 5:53 PMsteep-secretary-65224
11/14/2024, 5:53 PMconfig:
aws:region: us-east-1
networking:vpcs:
- name: foo
region: us-east-1
cidrBlock: 10.100.0.0/16
- name: bar
cidrBlock: 10.200.0.0/16
region: eu-central-2
networking:peering-connections:
- name: Primary
cidrBlock: 10.25.0.0/16
region: us-east-1
vpcId: vpc-XXXXXXX
- name: Ops
cidrBlock: 10.0.0.0/16
region: us-east-1
vpcId: vpc-YYYYYY
accountId: 1234456
steep-secretary-65224
11/14/2024, 5:54 PMOps
, it just makes the request and sets up routes, but we need to accept it elsewhere