Skip to content

Commit a3001f8

Browse files
authored
Merge pull request #76 from aws-ia/d-doc-provider-definition-error
document tf common error
2 parents 3db838f + 2e03ba5 commit a3001f8

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.header.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,29 @@ If you're building VPCs using AWS IP Address Manager, this module can help you w
173173

174174
You can use this module to build multiple IPAM VPCs but they must be created in manual sequence (`-target`).
175175

176+
# Common Errors and their Fixes
177+
178+
## Resource Not Found
179+
180+
Error:
181+
182+
> Warning: AWS Resource Not Found
183+
184+
Because this module uses 2 providers, `aws` and `awscc`, if your `AWS_DEFAULT_REGION` environment varaible is different than what is hard-coded in your HCL, the AWSCC provider will use the default region. This will result in no ability to find the resources with a hardcoded region. You can fix this by hardcoding a region for both environments or updating your environment variable:
185+
186+
```terraform
187+
provider "aws" {
188+
region = <>
189+
}
190+
provider "awscc" {
191+
region = <>
192+
}
193+
```
194+
195+
or
196+
197+
`export AWS_DEFAULT_REGION=<>`
198+
176199
## Contributing
177200

178201
Please see our [developer documentation](https://github.com/aws-ia/terraform-aws-vpc/blob/main/contributing.md) for guidance on contributing to this module

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,29 @@ If you're building VPCs using AWS IP Address Manager, this module can help you w
174174

175175
You can use this module to build multiple IPAM VPCs but they must be created in manual sequence (`-target`).
176176

177+
# Common Errors and their Fixes
178+
179+
## Resource Not Found
180+
181+
Error:
182+
183+
> Warning: AWS Resource Not Found
184+
185+
Because this module uses 2 providers, `aws` and `awscc`, if your `AWS_DEFAULT_REGION` environment varaible is different than what is hard-coded in your HCL, the AWSCC provider will use the default region. This will result in no ability to find the resources with a hardcoded region. You can fix this by hardcoding a region for both environments or updating your environment variable:
186+
187+
```terraform
188+
provider "aws" {
189+
region = <>
190+
}
191+
provider "awscc" {
192+
region = <>
193+
}
194+
```
195+
196+
or
197+
198+
`export AWS_DEFAULT_REGION=<>`
199+
177200
## Contributing
178201

179202
Please see our [developer documentation](https://github.com/aws-ia/terraform-aws-vpc/blob/main/contributing.md) for guidance on contributing to this module

0 commit comments

Comments
 (0)