Skip to content
New issue

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

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

Already on GitHub? # to your account

Support for configuration based on resources #669

Open
kumavis opened this issue Jan 27, 2025 · 0 comments
Open

Support for configuration based on resources #669

kumavis opened this issue Jan 27, 2025 · 0 comments

Comments

@kumavis
Copy link

kumavis commented Jan 27, 2025

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

see discussion thread here

You should be able to configure the provider with values from a resource

resource "digitalocean_droplet" "dev" {
  # ...
}

provider "docker" {
  host = "ssh://devops@${digitalocean_droplet.dev.ipv4_address}" # <-- this fails
}

There are suggestions of implementation and discussion of how this issue was solved in other projects in the above linked discussion thread.

New or Affected Resource(s)

  • Docker provider

Potential Terraform Configuration

resource "digitalocean_droplet" "dev" {
  # ...
}

provider "docker" {
  host = "ssh://devops@${digitalocean_droplet.dev.ipv4_address}" # <-- this works
}

References

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant