cloud-native-toolkit / action-module-metadata-create

GitHub action to create and validate module metadata
MIT License
0 stars 0 forks source link

bad variables when generating azure portworx bom #68

Open triceam opened 2 years ago

triceam commented 2 years ago

When generating the Azure Portworx BOM, the terraform ends up with a bad structure for the cluster_name variable assignment:

module "azure-portworx" {
  source = "github.com/cloud-native-toolkit/terraform-azure-portworx?ref=v0.0.1"

  azure_client_id = var.azure-portworx_azure_client_id
  azure_client_secret = var.azure-portworx_azure_client_secret
  azure_subscription_id = var.azure-portworx_azure_subscription_id
  azure_tenant_id = var.azure-portworx_azure_tenant_id
  cluster_config_file = var.azure-portworx_cluster_config_file
  cluster_type = var.azure-portworx_cluster_type
  disk_size = var.azure-portworx_disk_size
  kvdb_disk_size = var.azure-portworx_kvdb_disk_size
  portworx_config = var.azure-portworx_portworx_config
  provision = var.azure-portworx_provision
  px_enable_csi = var.azure-portworx_px_enable_csi
  px_enable_monitoring = var.azure-portworx_px_enable_monitoring
  region = var.azure-portworx_region
  resource_group_name = var.azure-portworx_resource_group_name
  variable cluster_name { = var.azure-portworx_variable cluster_name {
}

Notice the variable keyword and the curly bracket { are both included, but shouldn't be.

triceam commented 2 years ago

Something else seems wrong with generating this bom. The module.yaml defines dependency on the ocp-login:

image

but the generated output doesn't include the cluster module in the generated terraform.

seansund commented 2 years ago

"One of these things is not like the others..."

@triceam The cluster_name variable is missing double quotes around the name - https://github.com/cloud-native-toolkit/terraform-azure-portworx/blob/main/variables.tf#L26

triceam commented 2 years ago

@seansund Ahhh, so this is another case where the iascable parser is more strict than the native terraform parser.