Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Apr 7, 2023
1 parent 67082a0 commit f01e590
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions examples/vpc-region-shared-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ Subnets and IDs are not output, so any use of a subnet for selection (say, in an
the `data aws_subnets` resource with the appropriate filters.

The `variables.vpc.auto.tfvars` needs to be reduced to small number of settings. It is recommended to follow
these steps
these steps to get both files:

```script
cp SOURCE/variables.vpc.auto.tfvars variables.vpc.auto.tfvars-from-shared
mkdir source
cp SOURCE/variables.{subnets,vpc}.auto.tfvars source/
grep -E "^(shared_vpc_label|vpc_name|vpc_cidr_block|vpc_index|vpc_short_name|vpc_full_name|vpc_environment|vpc_domain_name|vpc_dns_servers|vpc_ntp_servers|tgw_environment) *=" \
variables.vpc.auto.tfvars-from-shared > variables.vpc.auto.tfvars
source/variables.vpc.auto.tfvars > variables.vpc.auto.tfvars
grep -v ^# source/variables.subnets.auto.tfvars > variables.subnets.auto.tfvars
```

This is the set of variable values to be defined (from the shared vpc).
This is the set of variable values to be defined (from the shared vpc) in `variables.vpc.auto.tfvars`:

```hcl
shared_vpc_label = ""
Expand All @@ -62,3 +66,12 @@ vpc_dns_servers = []
vpc_ntp_servers = []
tgw_environment = ""
```

and in `variables.subnets.auto.tfvars`:

```hcl
public_subnets = []
private_subnets = [ ]
```

Fill in the values as approriate from the source of the shared VPC.

0 comments on commit f01e590

Please sign in to comment.