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

Modifying variable output name? #388

Open
secretsoup opened this issue May 22, 2023 · 1 comment
Open

Modifying variable output name? #388

secretsoup opened this issue May 22, 2023 · 1 comment

Comments

@secretsoup
Copy link

secretsoup commented May 22, 2023

Is there a way to exclude certain strings from the exported variable/resource names? For example, it's pulling in the subscription ID into the variable names and making them incredibly long,

For example:

azurerm_availability_set__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_compute_availabilitysets_prod_eastus_connectivity_pafw_platform_fault_domain_count = 2 azurerm_availability_set__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_compute_availabilitysets_prod_eastus_connectivity_pafw_platform_update_domain_count = 5 azurerm_availability_set__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_compute_availabilitysets_prod_eastus_connectivity_pafw_resource_group_name = "prod-firewall-use-rg" azurerm_availability_set__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_compute_availabilitysets_prod_eastus_connectivity_pafw_tc_category = "compute" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_0_name = "LoadBalancerFrontEnd" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_0_private_ip_address_allocation = "Dynamic" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_0_public_ip_address_id = "/subscriptions/c68b11/resourceGroups/prod-firewall-use-rg/providers/Microsoft.Network/publicIPAddresses/connectivity-elb-01-pip" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_1_name = "AppGW-NonProd-Compliance-ARO" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_1_private_ip_address_allocation = "Dynamic" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_1_public_ip_address_id = "/subscriptions/c68b1ef/resourceGroups/prod-firewall-use-rg/providers/Microsoft.Network/publicIPAddresses/elb-appgw-nonprod-compliance-aro" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_2_name = "DELETEME" azurerm_lb__subscriptions_c6322bef1_a3de_4447_8asdf7_f32dbfa1_resourcegroups_prod_firewall_use_rg_providers_microsoft_network_loadbalancers_connectivity_elb_01_frontend_ip_configuration_2_private_ip_address_allocation = "Dynamic"

Is there a way to strip out the subscription portion and subscription ID from the variable name?

@xescugc
Copy link
Member

xescugc commented Jun 1, 2023

We actually have this in mind and want to fix it, we have #275 opened for it and we want to try to find the best solution that still outputs "meaningful" variable names, basically trying to avoid something like: a_b_c_d or just allocation. But TBH the provider with longer names is always AzureRM so we may end up making a custom solution for it potentially.

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