GoogleCloudPlatform / automlops

Build MLOps Pipelines in Minutes
Apache License 2.0
143 stars 34 forks source link

Keep consistency on how terraform provision files are generated #43

Closed JuanFKurucz closed 8 months ago

JuanFKurucz commented 9 months ago

Issue

If you run AutoMLOps.generate twice, using Terraform as a provisioning framework, the generated scripts will have the same information but in a different order. For example, the list of enabled_apis in provision/environment/data.tf will have a different order each time Automlops.generate is called. This same thing happens for resources in provision/environment/iam.tf file.

Motivation

In my use case, I tend to run AutoMLOps.generate when I have code changes in the components, which will reflect a change in the scripts inside AutoMLOps/components/component_base, but this also adds a change in the terraform scripts that is not real (as the terraform script did not really change, just the order of how it is written).

This is not really an important issue; it is just bugging me because it generates changes in the GitHub files I'm tracking (the provision ones) and could end up submitting changes that are not real (devs have to ensure that there is not a real change and not add them to their commits).

Your contribution

I could also tackle this myself if it is required, sorting the elements that are written always in the same way will be the solution to generate the same written files.

srastatter commented 8 months ago

This issue has been address and fixed as of version 1.2.6 - thank you for documenting this!