aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/config/config.go
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 15:59:15 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 16:39:21 +0200
commit863486a6b71ed0e562a3965bed56465d007b1418 (patch)
treee93f6a687695af86d54237ec9f575d4ef104222d /vendor/github.com/hashicorp/terraform/config/config.go
parent49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff)
downloadterraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.gz
terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.zst
terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.zip
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/config/config.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/config/config.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/vendor/github.com/hashicorp/terraform/config/config.go b/vendor/github.com/hashicorp/terraform/config/config.go
index 1772fd7..f13a046 100644
--- a/vendor/github.com/hashicorp/terraform/config/config.go
+++ b/vendor/github.com/hashicorp/terraform/config/config.go
@@ -252,35 +252,6 @@ func (r *Resource) Id() string {
252 } 252 }
253} 253}
254 254
255// ProviderFullName returns the full name of the provider for this resource,
256// which may either be specified explicitly using the "provider" meta-argument
257// or implied by the prefix on the resource type name.
258func (r *Resource) ProviderFullName() string {
259 return ResourceProviderFullName(r.Type, r.Provider)
260}
261
262// ResourceProviderFullName returns the full (dependable) name of the
263// provider for a hypothetical resource with the given resource type and
264// explicit provider string. If the explicit provider string is empty then
265// the provider name is inferred from the resource type name.
266func ResourceProviderFullName(resourceType, explicitProvider string) string {
267 if explicitProvider != "" {
268 // check for an explicit provider name, or return the original
269 parts := strings.SplitAfter(explicitProvider, "provider.")
270 return parts[len(parts)-1]
271 }
272
273 idx := strings.IndexRune(resourceType, '_')
274 if idx == -1 {
275 // If no underscores, the resource name is assumed to be
276 // also the provider name, e.g. if the provider exposes
277 // only a single resource of each type.
278 return resourceType
279 }
280
281 return resourceType[:idx]
282}
283
284// Validate does some basic semantic checking of the configuration. 255// Validate does some basic semantic checking of the configuration.
285func (c *Config) Validate() tfdiags.Diagnostics { 256func (c *Config) Validate() tfdiags.Diagnostics {
286 if c == nil { 257 if c == nil {