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

Add support for account_id and default_tags on scalr provider #296

Open
JoBrad opened this issue Jan 6, 2024 · 1 comment
Open

Add support for account_id and default_tags on scalr provider #296

JoBrad opened this issue Jan 6, 2024 · 1 comment

Comments

@JoBrad
Copy link

JoBrad commented Jan 6, 2024

Support for default_tags and account_id on the scalr provider would be incredibly helpful. I am writing some Terraform that provisions environments within Scalr, for each of our accounts, and find that I am having to repeat these configuration values quite a bit.

The default_tags should accept tag names (not ids), and should fail if the tag doesn't exist. In the example below, I'm retrieving the tag name from the basename of the current directory, which makes it much easier to reuse my code.

provider "scalr" {
  hostname = "my.scalr.io"

  # This value will be assumed for all scalr resources
  account_id = "acc-xxxx"

  # The ids for these tags will be retrieved and applied to each resource created by the scalr provider, that supports tags.
  default_tags = {
    basename(path.root)
  }
}  
@emocharnik
Copy link
Contributor

Hi, @JoBrad.

Currently, to retrieve the account id you can use the following data source. But in the following versions of API/Provider we want to get rid of the account id as a parameter because it will be detected automatically based on the hostname/token arguments.

As for default tags, it makes a lot of sense and to be sure we don't miss it, I'd suggest you to raise a feature request at https://support.scalr.com.

Regards,
Edgar.

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

No branches or pull requests

2 participants