terraform-aws-vpc
terraform-aws-vpc copied to clipboard
Allow creating vpc flow logs resources without creating vpc
Is your request related to a problem? Please describe.
I have a VPC network which is created outside of this module. But I like to use this module for creating resources like vpc flow logs in the existing VPC network.
Setting the variable create_vpc=false let me assume that i can disable the creation of the vpc itself but can use the other module functions.
Describe the solution you'd like.
If I set an existing vpc_id it should be possible to create resources like vpc flow logs without creating a VPC.
Additional context
I created a working solution for vpc flow logs: https://github.com/csautter/terraform-aws-vpc/tree/dev/optional-vpc-id-var and have tested it with following vars:
create_vpc = true
vpc_id = "id"
enable_flow_log = true
create_flow_log_cloudwatch_log_group = true
create_flow_log_cloudwatch_iam_role = true
I have some time to work out a contribution ready solution.