gpt-3.5-turbo-1106· OpenAI
Arena Human Preference 55K
Write terraform code to create vpc peering connections from both accounts in one module
- User
Write terraform code to create vpc peering connections from both accounts in one module
- Assistant
Certainly! Below is an example of Terraform code to create VPC peering connections from both accounts in one module:
hclprovider "aws" { region = "us-east-1" profile = "account1" } resource "aws_vpc" "vpc_account1" { cidr_block = "10.0.0.0/16" } provider "aws" { region = "us-west-2" profile = "account2" } resource "aws_vpc" "vpc_account2" { cidr_block = "192.168.0.0/16" } resource "aws_vpc_peering_connection" "peering_account1_to_account2" { provider = aws.account1 vpc_id = aws_vpc.vpc_account1.id peer_vpc_id = aws_vpc.vpc_account2.id } resource "aws_vpc_peering_connection" "peering_account2_to_account1" { provider = aws.account2 vpc_id = aws_vpc.vpc_account2.id peer_vpc_id = aws_vpc.vpc_account1.id }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.