fwresource

package
v0.0.0-...-7000f67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectFramework

func GetProjectFramework(rVal, pVal types.String, diags *diag.Diagnostics) types.String

GetProject reads the "project" field from the given resource and falls back to the provider's value if not given. If the provider's value is not given, an error is returned.

func ParseProjectFieldValueFramework

func ParseProjectFieldValueFramework(resourceType, fieldValue, projectSchemaField string, rVal, pVal types.String, isEmptyValid bool, diags *diag.Diagnostics) *tpgresource.ProjectFieldValue

Parses a project field with the following formats: - projects/{my_projects}/{resource_type}/{resource_name}

func ReplaceVarsForFrameworkTest

func ReplaceVarsForFrameworkTest(prov *fwtransport.FrameworkProviderConfig, rs *terraform.ResourceState, linkTmpl string) (string, error)

This function isn't a test of transport.go; instead, it is used as an alternative to ReplaceVars inside tests.

Types

type LocationDescriber

type LocationDescriber interface {
	GetLocationDescription(providerConfig *fwtransport.FrameworkProviderConfig) LocationDescription
}

type LocationDescription

type LocationDescription struct {
	// Location - not configurable on provider
	LocationSchemaField types.String
	ResourceLocation    types.String

	// Region
	RegionSchemaField types.String
	ResourceRegion    types.String
	ProviderRegion    types.String

	// Zone
	ZoneSchemaField types.String
	ResourceZone    types.String
	ProviderZone    types.String
}

func (*LocationDescription) GetLocation

func (ld *LocationDescription) GetLocation() (types.String, error)

func (*LocationDescription) GetRegion

func (ld *LocationDescription) GetRegion() (types.String, error)

func (*LocationDescription) GetZone

func (ld *LocationDescription) GetZone() (types.String, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL