-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for source_content in azurerm_storage_share_file #9927
Comments
This feature would allow rendering templates in to share files |
See hashicorp/terraform#17008 (comment) and hashicorp/terraform#21308 on why using tempfile for scenarios like this will likely not be supported, and why providers should prefer source_content over source-path. |
Are there any plans to support this? :) We need to create the files from templates, and we can't store the content in version control, so we currently have to provision a local file via The opportunity to use |
Sadly I recognize no effort to implement this feature. Are there any plans to support this? |
Same need here - I got a lot of configuration files I volume-mount to my containers using The configuration files live in version control as This, as was previously said, creates a lot of noisy diffs and introduces complexity into the workflow! With the |
As a workaround, I'm using external, as follows: data "external" "supply_variables" {
program = [
"bash",
"${path.module}/supply-variables.sh",
]
query = {
env = "dev"
module_path = path.module
}
} #!/bin/bash
set -e
eval "$(jq -r '@sh "ENV=\(.env) MODULE_PATH=\(.module_path)"')"
source_path="$MODULE_PATH/some-template.josn"
destination_path="$MODULE_PATH/some-template-supplied.json"
cp -f "$source_path" "$destination_path"
env_token='${env}'
sed -i "s|$env_token|$ENV|" $destination_path
jq -n --arg path "$destination_path" '{"result_file_path":$path}' resource "azurerm_storage_share_file" "share_file" {
name = "some-config.json"
storage_share_id = azurerm_storage_share.this.id
source = data.external.supply_variables.result.result_file_path
} |
+1 |
Community Note
Description
Thanks to the maintainers/implementers for your hard work on
azurerm_storage_share_file
! It would be nice to also have asource_content
argument to define files inline, similar toazurerm_storage_blob
.New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: