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

Feature Request: Allow self-referencing in heroku_app configs #15669

Closed
onnimonni opened this issue Jul 30, 2017 · 2 comments
Closed

Feature Request: Allow self-referencing in heroku_app configs #15669

onnimonni opened this issue Jul 30, 2017 · 2 comments

Comments

@onnimonni
Copy link

onnimonni commented Jul 30, 2017

Terraform Version

Terraform v0.9.11

Terraform Configuration Files

resource "heroku_app" "production" {
  name = "test-app-production"
  region = "us"

  # Tell the dyno it's own hostname so we can send email from workers with correct address
  config_vars {
    SERVER_NAME = "${self.heroku_hostname}"
  }
}

Debug Output

$ terraform apply
1 error(s) occurred:

* module root: 1 error(s) occurred:

* resource 'heroku_app.production' config: cannot contain self-reference self.heroku_hostname

Expected Behavior

It would be really useful to be able to tell the application it's own hostname. I usually add this manually after the build.

Steps to Reproduce

  1. terraform apply

Alternative solution

I know that this might be really hard to solve with the terraform architecture. Maybe we could have a resource like heroku_app_config which could depend on heroku_app and which could be used to update the config_vars after the heroku_app instance is created.

References

The self-referencing on resources was shortly discussed in:

@ghost
Copy link

ghost commented Jun 6, 2019

This issue has been automatically migrated to terraform-providers/terraform-provider-heroku#203 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to terraform-providers/terraform-provider-heroku#203.

@ghost ghost closed this as completed Jun 6, 2019
@ghost
Copy link

ghost commented Jul 25, 2019

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants