File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
package convert
2
2
3
+ import "github.com/mongodb-labs/atlas-cli-plugin-terraform/internal/hcl"
4
+
3
5
// AdvancedClusterToNew transforms all mongodbatlas_advanced_cluster resource definitions in a
4
6
// Terraform configuration file from SDKv2 schema to TPF (Terraform Plugin Framework) schema.
5
7
// All other resources and data sources are left untouched.
6
8
func AdvancedClusterToNew (config []byte ) ([]byte , error ) {
7
- return config , nil
9
+ parser , err := hcl .GetParser (config )
10
+ if err != nil {
11
+ return nil , err
12
+ }
13
+ return parser .Bytes (), nil
8
14
}
Original file line number Diff line number Diff line change
1
+ resource this is an invalid HCL configuration file
2
+
Original file line number Diff line number Diff line change 1
- {}
1
+ {
2
+ "configuration_file_error" : " failed to parse Terraform config file"
3
+ }
You can’t perform that action at this time.
0 commit comments