Skip to content

Commit 47557ad

Browse files
authored
Make terraform configuration compatible with v0.14 (#91)
1 parent ad3870b commit 47557ad

File tree

12 files changed

+33
-27
lines changed

12 files changed

+33
-27
lines changed

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.2/addrs/module.go#L17
6+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/addrs/provider.go#L16-L20
10+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/addrs/resource.go#L326-L344
18+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/backend.go#L12-L18
6+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/config.go#L22-L78
10+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/module.go#L14-L45
9+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/module_call.go#L12-L31
6+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/module_call.go#L140-L143
30+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/module_call.go#L148-L151
3131
type PassedProviderConfig struct {
3232
InChild *ProviderConfigRef
3333
InParent *ProviderConfigRef

terraform/configs/named_values.go

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

88
// Variable is an alternative representation of configs.Variable.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L21-L32
9+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/named_values.go#L21-L34
1010
type Variable struct {
1111
Name string
1212
Description string
1313
Default cty.Value
1414
Type cty.Type
1515
ParsingMode VariableParsingMode
1616
Validations []*VariableValidation
17+
Sensitive bool
1718

1819
DescriptionSet bool
20+
SensitiveSet bool
1921

2022
DeclRange hcl.Range
2123
}
2224

2325
// VariableParsingMode is an alternative representation of configs.VariableParsingMode.
24-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L226-L234
26+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/named_values.go#L234-L242
2527
type VariableParsingMode rune
2628

2729
// VariableParseLiteral is a variable parsing mode that just takes the given
@@ -33,7 +35,7 @@ const VariableParseLiteral VariableParsingMode = 'L'
3335
const VariableParseHCL VariableParsingMode = 'H'
3436

3537
// VariableValidation is an alternative representation of configs.VariableValidation.
36-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L273-L289
38+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/named_values.go#L281-L297
3739
type VariableValidation struct {
3840
// Condition is an expression that refers to the variable being tested
3941
// and contains no other references. The expression must return true
@@ -53,7 +55,7 @@ type VariableValidation struct {
5355
}
5456

5557
// Local is an alternative representation of configs.Local.
56-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L485-L490
58+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/named_values.go#L501-L506
5759
type Local struct {
5860
Name string
5961
Expr hcl.Expression
@@ -62,7 +64,7 @@ type Local struct {
6264
}
6365

6466
// Output is an alternative representation of configs.Output.
65-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/named_values.go#L422-L433
67+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/named_values.go#L430-L441
6668
type Output struct {
6769
Name string
6870
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.2/configs/provider.go#L17-L28
9+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/provider_meta.go#L7-L13
24+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/provider_requirements.go#L14-L20
34+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/provider_requirements.go#L22-L25
44+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/provisioner.go#L11-L20
6+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/provisioner.go#L166-L170
19+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/provisioner.go#L176-L180
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.2/configs/provisioner.go#L172-L181
27+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/provisioner.go#L182-L191
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.2/configs/provisioner.go#L183-L193
40+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/provisioner.go#L193-L203
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.2/configs/resource.go#L14-L34
9+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/resource.go#L37-L48
31+
// https://github.com/hashicorp/terraform/blob/v0.14.3/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.2/configs/resource.go#L373-L378
47+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/resource.go#L384-L389
4848
type ProviderConfigRef struct {
4949
Name string
5050
NameRange hcl.Range

terraform/configs/version_constraint.go

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

88
// VersionConstraint is an alternative representation of configs.VersionConstraint.
9-
// https://github.com/hashicorp/terraform/blob/v0.13.2/configs/version_constraint.go#L16-L19
9+
// https://github.com/hashicorp/terraform/blob/v0.14.3/configs/version_constraint.go#L16-L19
1010
type VersionConstraint struct {
1111
Required version.Constraints
1212
DeclRange hcl.Range

0 commit comments

Comments
 (0)