When using infrastructure as code tools like Terraform to create resources, what are the best practices for creating of one-off creation resources like VPCs and databases via an automated pipeline?
For example, when creating an Lambda function, we need to provide a VPC ID. This VPC ID can only be supplied if the VPC is already created via the Terraform. So should there be 2 different pipelines based on the resource type created? For one-off resources a separate pipeline which will be ideally only run once and another pipeline to create disposable resources?
This VPC ID can only be supplied if the VPC is already created via the Terraform
isn't true. You can use data sources to select a pre-existing VPC in your account, regardless of whether Terraform created it (either in the same state file or another) or if you created it outside of Terraform. – ydaetskcoR