github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/not-internal/configs/cloud.go (about) 1 package configs 2 3 import ( 4 "github.com/hashicorp/hcl/v2" 5 ) 6 7 // Cloud represents a "cloud" block inside a "terraform" block in a module 8 // or file. 9 type CloudConfig struct { 10 Config hcl.Body 11 12 DeclRange hcl.Range 13 } 14 15 func decodeCloudBlock(block *hcl.Block) (*CloudConfig, hcl.Diagnostics) { 16 return &CloudConfig{ 17 Config: block.Body, 18 DeclRange: block.DefRange, 19 }, nil 20 } 21 22 func (c *CloudConfig) ToBackendConfig() Backend { 23 return Backend{ 24 Type: "cloud", 25 Config: c.Config, 26 } 27 }