Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression Of Child Module Providers for AWS #998

Closed
moofish32 opened this issue Jun 29, 2017 · 4 comments
Closed

Regression Of Child Module Providers for AWS #998

moofish32 opened this issue Jun 29, 2017 · 4 comments
Labels
bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary.

Comments

@moofish32
Copy link
Contributor

Hi there,

The original issue here hashicorp/terraform#1819 indicates that child modules should respect the scoped aws provider. For S3 buckets this seems to be failing. I have the following repo https://github.com/moofish32/terraform-bug which is a copy of the CRR example just separating into two modules and this fails with:

Error applying plan:

1 error(s) occurred:

* module.destination_bucket.aws_s3_bucket.destination: 1 error(s) occurred:

* aws_s3_bucket.destination: Error creating S3 bucket: IllegalLocationConstraintException: The eu-west-1 location constraint is incompatible for the region specific endpoint this request was sent to.
        status code: 400, request id: 8F7437428AD5B9E3, host id: hybt340LVeBG+x75tp8PCzzXDcvRfk1MV3SqOTGpWfm3XIAQpm+fowYvpncSe1F0nZ+jxfDx2Do=

Terraform Version

Terraform v0.9.9

Affected Resource(s)

Please list the resources as a list, for example:

  • s3 bucket
  • s3 bucket policy attach

Terraform Configuration Files

see repo

Debug Output

available via running the reproduction

Panic Output

N/A

Expected Behavior

The S3 bucket should be created in the nested module configure region which is different than the parent module

Actual Behavior

Error attempting to use parent module s3 endpoint

Steps to Reproduce

  1. terraform apply in repo root above

References

hashicorp/terraform#1819 I think this is a regression from @apparentlymart last comment in here, but that is only an opinion.

@moofish32
Copy link
Contributor Author

moofish32 commented Jun 29, 2017

https://github.com/moofish32/terraform-bug/compare/fix/use_alias <-- this appears to be the slightly annoying but easy to do work around.

@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Oct 23, 2017
@bflad
Copy link
Contributor

bflad commented Jan 28, 2018

@moofish32 have you tried working with Terraform 0.11+ and its much better handling of module provider inheritance? https://www.terraform.io/docs/modules/usage.html#providers-within-modules

Moving to explicit provider passing in 0.11 fixed a lot of issues in our environment.

@bflad bflad added waiting-response Maintainers are waiting on response from community or contributor. upstream-terraform Addresses functionality related to the Terraform core binary. labels Jan 28, 2018
@moofish32
Copy link
Contributor Author

Agree @bflad let’s close this issue

@ghost
Copy link

ghost commented Apr 8, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
@breathingdust breathingdust removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. upstream-terraform Addresses functionality related to the Terraform core binary.
Projects
None yet
Development

No branches or pull requests

4 participants