Skip to content

Commit 622a246

Browse files
committed
Make terraform configuration compatible with v0.13.2
1 parent 4deb09d commit 622a246

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

helper/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ func (r *Runner) EnsureNoError(err error, proc func() error) error {
315315
// simpleDecodeResourceBlock decodes the data equivalent to configs.Resource from hcl.Block
316316
// without depending on Terraform. Some operations have been omitted for ease of implementation.
317317
// As such, it is expected to parse the minimal code needed for testing.
318-
// https://github.com/hashicorp/terraform/blob/v0.12.26/configs/resource.go#L78-L288
318+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/resource.go#L80-L290
319319
func simpleDecodeResouceBlock(resource *hcl.Block) (*configs.Resource, hcl.Diagnostics) {
320320
content, resourceRemain, diags := resource.Body.PartialContent(&hcl.BodySchema{
321321
Attributes: []hcl.AttributeSchema{

terraform/addrs/module.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package addrs
33
import svchost "github.com/hashicorp/terraform-svchost"
44

55
// Module is an alternative representation of addrs.Module.
6-
// https://github.com/hashicorp/terraform/blob/v0.13.1/addrs/module.go#L17
6+
// https://github.com/hashicorp/terraform/blob/v0.13.2/addrs/module.go#L17
77
type Module []string
88

99
// Provider is an alternative representation of addrs.Provider.
10-
// https://github.com/hashicorp/terraform/blob/v0.13.1/addrs/provider.go#L16-L20
10+
// https://github.com/hashicorp/terraform/blob/v0.13.2/addrs/provider.go#L16-L20
1111
type Provider struct {
1212
Type string
1313
Namespace string
1414
Hostname svchost.Hostname
1515
}
1616

1717
// ResourceMode is an alternative representation of addrs.ResourceMode.
18-
// https://github.com/hashicorp/terraform/blob/v0.13.1/addrs/resource.go#L326-L344
18+
// https://github.com/hashicorp/terraform/blob/v0.13.2/addrs/resource.go#L326-L344
1919
type ResourceMode rune
2020

2121
const (

terraform/configs/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package configs
33
import "github.com/hashicorp/hcl/v2"
44

55
// Backend is an alternative representation of configs.Backend.
6-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/backend.go#L12-L18
6+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/backend.go#L12-L18
77
type Backend struct {
88
Type string
99
Config hcl.Body

terraform/configs/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
// Config is an alternative representation of configs.Config.
10-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/config.go#L22-L78
10+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/config.go#L22-L78
1111
type Config struct {
1212
// Root *Config
1313
// Parent *Config

terraform/configs/module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Module is an alternative representation of configs.Module.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/module.go#L14-L45
9+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/module.go#L14-L45
1010
type Module struct {
1111
SourceDir string
1212

terraform/configs/module_call.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package configs
33
import "github.com/hashicorp/hcl/v2"
44

55
// ModuleCall is an alternative representation of configs.ModuleCall.
6-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/module_call.go#L12-L31
6+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/module_call.go#L12-L31
77
// DependsOn is not supported due to the difficulty of intermediate representation.
88
type ModuleCall struct {
99
Name string
@@ -27,7 +27,7 @@ type ModuleCall struct {
2727
}
2828

2929
// PassedProviderConfig is an alternative representation of configs.PassedProviderConfig.
30-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/module_call.go#L140-L143
30+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/module_call.go#L140-L143
3131
type PassedProviderConfig struct {
3232
InChild *ProviderConfigRef
3333
InParent *ProviderConfigRef

terraform/configs/named_values.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Variable is an alternative representation of configs.Variable.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/named_values.go#L21-L32
9+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L21-L32
1010
type Variable struct {
1111
Name string
1212
Description string
@@ -21,7 +21,7 @@ type Variable struct {
2121
}
2222

2323
// VariableParsingMode is an alternative representation of configs.VariableParsingMode.
24-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/named_values.go#L226-L234
24+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L226-L234
2525
type VariableParsingMode rune
2626

2727
// VariableParseLiteral is a variable parsing mode that just takes the given
@@ -33,7 +33,7 @@ const VariableParseLiteral VariableParsingMode = 'L'
3333
const VariableParseHCL VariableParsingMode = 'H'
3434

3535
// VariableValidation is an alternative representation of configs.VariableValidation.
36-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/named_values.go#L273-L289
36+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L273-L289
3737
type VariableValidation struct {
3838
// Condition is an expression that refers to the variable being tested
3939
// and contains no other references. The expression must return true
@@ -53,7 +53,7 @@ type VariableValidation struct {
5353
}
5454

5555
// Local is an alternative representation of configs.Local.
56-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/named_values.go#L485-L490
56+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L485-L490
5757
type Local struct {
5858
Name string
5959
Expr hcl.Expression
@@ -62,7 +62,7 @@ type Local struct {
6262
}
6363

6464
// Output is an alternative representation of configs.Output.
65-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/named_values.go#L422-L433
65+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L422-L433
6666
type Output struct {
6767
Name string
6868
Description string

terraform/configs/provider.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Provider is an alternative representation of configs.Provider.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provider.go#L17-L28
9+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provider.go#L17-L28
1010
type Provider struct {
1111
Name string
1212
NameRange hcl.Range
@@ -21,7 +21,7 @@ type Provider struct {
2121
}
2222

2323
// ProviderMeta is an alternative representation of configs.ProviderMeta.
24-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provider_meta.go#L7-L13
24+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provider_meta.go#L7-L13
2525
type ProviderMeta struct {
2626
Provider string
2727
Config hcl.Body
@@ -31,7 +31,7 @@ type ProviderMeta struct {
3131
}
3232

3333
// RequiredProvider is an alternative representation of configs.RequiredProvider.
34-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provider_requirements.go#L14-L20
34+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provider_requirements.go#L14-L20
3535
type RequiredProvider struct {
3636
Name string
3737
Source string
@@ -41,7 +41,7 @@ type RequiredProvider struct {
4141
}
4242

4343
// RequiredProviders is an alternative representation of configs.RequiredProviders.
44-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provider_requirements.go#L22-L25
44+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provider_requirements.go#L22-L25
4545
type RequiredProviders struct {
4646
RequiredProviders map[string]*RequiredProvider
4747
DeclRange hcl.Range

terraform/configs/provisioner.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package configs
33
import "github.com/hashicorp/hcl/v2"
44

55
// Provisioner is an alternative representation of configs.Provisioner.
6-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provisioner.go#L11-L20
6+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provisioner.go#L11-L20
77
type Provisioner struct {
88
Type string
99
Config hcl.Body
@@ -16,15 +16,15 @@ type Provisioner struct {
1616
}
1717

1818
// Connection is an alternative representation of configs.Connection.
19-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provisioner.go#L166-L170
19+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provisioner.go#L166-L170
2020
type Connection struct {
2121
Config hcl.Body
2222

2323
DeclRange hcl.Range
2424
}
2525

2626
// ProvisionerWhen is an alternative representation of configs.ProvisionerWhen.
27-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provisioner.go#L172-L181
27+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provisioner.go#L172-L181
2828
type ProvisionerWhen int
2929

3030
const (
@@ -37,7 +37,7 @@ const (
3737
)
3838

3939
// ProvisionerOnFailure is an alternative representation of configs.ProvisionerOnFailure.
40-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/provisioner.go#L183-L193
40+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/provisioner.go#L183-L193
4141
type ProvisionerOnFailure int
4242

4343
const (

terraform/configs/resource.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Resource is an alternative representation of configs.Resource.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/resource.go#L14-L34
9+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/resource.go#L14-L34
1010
// DependsOn is not supported due to the difficulty of intermediate representation.
1111
type Resource struct {
1212
Mode addrs.ResourceMode
@@ -28,7 +28,7 @@ type Resource struct {
2828
}
2929

3030
// ManagedResource is an alternative representation of configs.ManagedResource.
31-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/resource.go#L37-L48
31+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/resource.go#L37-L48
3232
// IgnoreChanges is not supported due to the difficulty of intermediate representation.
3333
type ManagedResource struct {
3434
Connection *Connection
@@ -44,7 +44,7 @@ type ManagedResource struct {
4444
}
4545

4646
// ProviderConfigRef is an alternative representation of configs.ProviderConfigRef.
47-
// https://github.com/hashicorp/terraform/blob/v0.13.1/configs/resource.go#L373-L378
47+
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/resource.go#L373-L378
4848
type ProviderConfigRef struct {
4949
Name string
5050
NameRange hcl.Range

0 commit comments

Comments
 (0)