hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.19k forks source link

Unable to apply or destroy: Error configuration for module.cacti_app_az_1.module.alb.provider.aws is not present #3772

Closed shonaran closed 4 years ago

shonaran commented 6 years ago

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed. Terraform v0.11.1

Affected Resource(s)

Please list the resources as a list, for example:

Expected Behavior

What should have happened? I attempted to destroy the resources I created

Actual Behavior

What actually happened? Destroy failed with the above error

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply terraform destroy -force -var-file=../application/variables/prod-reg1.tfvars (This also happens with a terraform apply)
loivis commented 6 years ago

did you put provider configuration within the module?

shonaran commented 6 years ago

Yes. In the root, I placed the following: provider "aws" { region = "${var.stackregion}" }

provider "aws" { alias = "moduleprovider" region = "${var.stackregion}" }

At the top of main.tf, one layer below, I have: provider "aws" { region = "${var.region}" } This applies to the ALB and ASG modules.

In a workspace that was created a while ago, I cannot apply or destroy.

If I create a new workspace, I can apply or destroy.

shonaran commented 6 years ago

I also upgraded to v 0.11.3. No difference. Terraform v0.11.3

shonaran commented 6 years ago

Update: When I create a new workspace and use terraform apply, I do not see this problem. If I make a change to the code to create a second server using terraform apply again, I get the error. If I try to destroy from an old workspace, I get the same error again

github-actions[bot] commented 4 years ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

ghost commented 4 years ago

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!