mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-24 02:01:03 -05:00
Previously, any comments inside the required provider configuration for a given provider would be wiped out upon rerunning the 0.13upgrade command. This commit attempts to preserve those comments if the existing entry is semantically equivalent to the entry we are about to write.
21 lines
401 B
HCL
21 lines
401 B
HCL
resource foo_instance a {}
|
|
resource bar_instance b {}
|
|
|
|
terraform {
|
|
# Provider requirements go here
|
|
required_providers {
|
|
# Pin bar to this version
|
|
bar = "0.5.0"
|
|
# An explicit requirement
|
|
baz = {
|
|
# Comment inside the block should stay
|
|
source = "foo/baz"
|
|
}
|
|
# Foo is required
|
|
foo = {
|
|
# This comment sadly won't make it
|
|
version = "1.0.0"
|
|
}
|
|
}
|
|
}
|