google_compute_reservation

package
v0.0.0-...-4deecce Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// Description: string, optional
	Description terra.StringValue `hcl:"description,attr"`
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// Project: string, optional
	Project terra.StringValue `hcl:"project,attr"`
	// SpecificReservationRequired: bool, optional
	SpecificReservationRequired terra.BoolValue `hcl:"specific_reservation_required,attr"`
	// Zone: string, required
	Zone terra.StringValue `hcl:"zone,attr" validate:"required"`
	// ShareSettings: optional
	ShareSettings *ShareSettings `hcl:"share_settings,block"`
	// SpecificReservation: required
	SpecificReservation *SpecificReservation `hcl:"specific_reservation,block" validate:"required"`
	// Timeouts: optional
	Timeouts *Timeouts `hcl:"timeouts,block"`
}

Args contains the configurations for google_compute_reservation.

type DataArgs

type DataArgs struct {
	// Id: string, optional
	Id terra.StringValue `hcl:"id,attr"`
	// Name: string, required
	Name terra.StringValue `hcl:"name,attr" validate:"required"`
	// Project: string, optional
	Project terra.StringValue `hcl:"project,attr"`
	// Zone: string, required
	Zone terra.StringValue `hcl:"zone,attr" validate:"required"`
}

DataArgs contains the configurations for google_compute_reservation.

type DataShareSettingsAttributes

type DataShareSettingsAttributes struct {
	// contains filtered or unexported fields
}

func (DataShareSettingsAttributes) InternalRef

func (ss DataShareSettingsAttributes) InternalRef() (terra.Reference, error)

func (DataShareSettingsAttributes) InternalTokens

func (ss DataShareSettingsAttributes) InternalTokens() (hclwrite.Tokens, error)

func (DataShareSettingsAttributes) InternalWithRef

func (DataShareSettingsAttributes) ProjectMap

func (DataShareSettingsAttributes) ShareType

type DataShareSettingsProjectMapAttributes

type DataShareSettingsProjectMapAttributes struct {
	// contains filtered or unexported fields
}

func (DataShareSettingsProjectMapAttributes) Id

func (DataShareSettingsProjectMapAttributes) InternalRef

func (DataShareSettingsProjectMapAttributes) InternalTokens

func (DataShareSettingsProjectMapAttributes) InternalWithRef

func (DataShareSettingsProjectMapAttributes) ProjectId

type DataShareSettingsProjectMapState

type DataShareSettingsProjectMapState struct {
	Id        string `json:"id"`
	ProjectId string `json:"project_id"`
}

type DataShareSettingsState

type DataShareSettingsState struct {
	ShareType  string                             `json:"share_type"`
	ProjectMap []DataShareSettingsProjectMapState `json:"project_map"`
}

type DataSource

type DataSource struct {
	Name string
	Args DataArgs
}

DataSource represents the Terraform data resource google_compute_reservation.

func Data

func Data(name string, args DataArgs) *DataSource

Data creates a new instance of DataSource.

func (*DataSource) Attributes

func (gcr *DataSource) Attributes() dataGoogleComputeReservationAttributes

Attributes returns the attributes for DataSource.

func (*DataSource) Configuration

func (gcr *DataSource) Configuration() interface{}

Configuration returns the configuration (args) for DataSource.

func (*DataSource) DataSource

func (gcr *DataSource) DataSource() string

DataSource returns the Terraform object type for DataSource.

func (*DataSource) LocalName

func (gcr *DataSource) LocalName() string

LocalName returns the local name for DataSource.

type DataSpecificReservationAttributes

type DataSpecificReservationAttributes struct {
	// contains filtered or unexported fields
}

func (DataSpecificReservationAttributes) Count

func (DataSpecificReservationAttributes) InUseCount

func (DataSpecificReservationAttributes) InstanceProperties

func (DataSpecificReservationAttributes) InternalRef

func (DataSpecificReservationAttributes) InternalTokens

func (sr DataSpecificReservationAttributes) InternalTokens() (hclwrite.Tokens, error)

func (DataSpecificReservationAttributes) InternalWithRef

type DataSpecificReservationInstancePropertiesAttributes

type DataSpecificReservationInstancePropertiesAttributes struct {
	// contains filtered or unexported fields
}

func (DataSpecificReservationInstancePropertiesAttributes) InternalRef

func (DataSpecificReservationInstancePropertiesAttributes) InternalTokens

func (DataSpecificReservationInstancePropertiesAttributes) InternalWithRef

func (DataSpecificReservationInstancePropertiesAttributes) MachineType

func (DataSpecificReservationInstancePropertiesAttributes) MinCpuPlatform

type DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes

type DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes struct {
	// contains filtered or unexported fields
}

func (DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes) AcceleratorCount

func (DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes) AcceleratorType

func (DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalRef

func (DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalTokens

func (DataSpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalWithRef

type DataSpecificReservationInstancePropertiesGuestAcceleratorsState

type DataSpecificReservationInstancePropertiesGuestAcceleratorsState struct {
	AcceleratorCount float64 `json:"accelerator_count"`
	AcceleratorType  string  `json:"accelerator_type"`
}

type DataSpecificReservationInstancePropertiesLocalSsdsAttributes

type DataSpecificReservationInstancePropertiesLocalSsdsAttributes struct {
	// contains filtered or unexported fields
}

func (DataSpecificReservationInstancePropertiesLocalSsdsAttributes) DiskSizeGb

func (DataSpecificReservationInstancePropertiesLocalSsdsAttributes) Interface

func (DataSpecificReservationInstancePropertiesLocalSsdsAttributes) InternalRef

func (DataSpecificReservationInstancePropertiesLocalSsdsAttributes) InternalTokens

func (DataSpecificReservationInstancePropertiesLocalSsdsAttributes) InternalWithRef

type DataSpecificReservationInstancePropertiesLocalSsdsState

type DataSpecificReservationInstancePropertiesLocalSsdsState struct {
	DiskSizeGb float64 `json:"disk_size_gb"`
	Interface  string  `json:"interface"`
}

type DataSpecificReservationInstancePropertiesState

type DataSpecificReservationInstancePropertiesState struct {
	MachineType       string                                                            `json:"machine_type"`
	MinCpuPlatform    string                                                            `json:"min_cpu_platform"`
	GuestAccelerators []DataSpecificReservationInstancePropertiesGuestAcceleratorsState `json:"guest_accelerators"`
	LocalSsds         []DataSpecificReservationInstancePropertiesLocalSsdsState         `json:"local_ssds"`
}

type DataSpecificReservationState

type DataSpecificReservationState struct {
	Count              float64                                          `json:"count"`
	InUseCount         float64                                          `json:"in_use_count"`
	InstanceProperties []DataSpecificReservationInstancePropertiesState `json:"instance_properties"`
}

type Resource

type Resource struct {
	Name string
	Args Args

	DependsOn terra.Dependencies
	Lifecycle *terra.Lifecycle
	// contains filtered or unexported fields
}

Resource represents the Terraform resource google_compute_reservation.

func New

func New(name string, args Args) *Resource

New creates a new instance of Resource.

func (*Resource) Attributes

func (gcr *Resource) Attributes() googleComputeReservationAttributes

Attributes returns the attributes for Resource.

func (*Resource) Configuration

func (gcr *Resource) Configuration() interface{}

Configuration returns the configuration (args) for Resource.

func (*Resource) DependOn

func (gcr *Resource) DependOn() terra.Reference

DependOn is used for other resources to depend on Resource.

func (*Resource) Dependencies

func (gcr *Resource) Dependencies() terra.Dependencies

Dependencies returns the list of resources Resource depends_on.

func (*Resource) ImportState

func (gcr *Resource) ImportState(state io.Reader) error

ImportState imports the given attribute values into Resource's state.

func (*Resource) LifecycleManagement

func (gcr *Resource) LifecycleManagement() *terra.Lifecycle

LifecycleManagement returns the lifecycle block for Resource.

func (*Resource) LocalName

func (gcr *Resource) LocalName() string

LocalName returns the local name for Resource.

func (*Resource) State

func (gcr *Resource) State() (*googleComputeReservationState, bool)

State returns the state and a bool indicating if Resource has state.

func (*Resource) StateMust

func (gcr *Resource) StateMust() *googleComputeReservationState

StateMust returns the state for Resource. Panics if the state is nil.

func (*Resource) Type

func (gcr *Resource) Type() string

Type returns the Terraform object type for Resource.

type ShareSettings

type ShareSettings struct {
	// ShareType: string, optional
	ShareType terra.StringValue `hcl:"share_type,attr"`
	// ShareSettingsProjectMap: min=0
	ProjectMap []ShareSettingsProjectMap `hcl:"project_map,block" validate:"min=0"`
}

type ShareSettingsAttributes

type ShareSettingsAttributes struct {
	// contains filtered or unexported fields
}

func (ShareSettingsAttributes) InternalRef

func (ss ShareSettingsAttributes) InternalRef() (terra.Reference, error)

func (ShareSettingsAttributes) InternalTokens

func (ss ShareSettingsAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ShareSettingsAttributes) InternalWithRef

func (ShareSettingsAttributes) ProjectMap

func (ShareSettingsAttributes) ShareType

func (ss ShareSettingsAttributes) ShareType() terra.StringValue

type ShareSettingsProjectMap

type ShareSettingsProjectMap struct {
	// Id: string, required
	Id terra.StringValue `hcl:"id,attr" validate:"required"`
	// ProjectId: string, optional
	ProjectId terra.StringValue `hcl:"project_id,attr"`
}

type ShareSettingsProjectMapAttributes

type ShareSettingsProjectMapAttributes struct {
	// contains filtered or unexported fields
}

func (ShareSettingsProjectMapAttributes) Id

func (ShareSettingsProjectMapAttributes) InternalRef

func (ShareSettingsProjectMapAttributes) InternalTokens

func (pm ShareSettingsProjectMapAttributes) InternalTokens() (hclwrite.Tokens, error)

func (ShareSettingsProjectMapAttributes) InternalWithRef

func (ShareSettingsProjectMapAttributes) ProjectId

type ShareSettingsProjectMapState

type ShareSettingsProjectMapState struct {
	Id        string `json:"id"`
	ProjectId string `json:"project_id"`
}

type ShareSettingsState

type ShareSettingsState struct {
	ShareType  string                         `json:"share_type"`
	ProjectMap []ShareSettingsProjectMapState `json:"project_map"`
}

type SpecificReservation

type SpecificReservation struct {
	// Count: number, required
	Count terra.NumberValue `hcl:"count,attr" validate:"required"`
	// SpecificReservationInstanceProperties: required
	InstanceProperties *SpecificReservationInstanceProperties `hcl:"instance_properties,block" validate:"required"`
}

type SpecificReservationAttributes

type SpecificReservationAttributes struct {
	// contains filtered or unexported fields
}

func (SpecificReservationAttributes) Count

func (SpecificReservationAttributes) InUseCount

func (SpecificReservationAttributes) InstanceProperties

func (SpecificReservationAttributes) InternalRef

func (sr SpecificReservationAttributes) InternalRef() (terra.Reference, error)

func (SpecificReservationAttributes) InternalTokens

func (sr SpecificReservationAttributes) InternalTokens() (hclwrite.Tokens, error)

func (SpecificReservationAttributes) InternalWithRef

type SpecificReservationInstanceProperties

type SpecificReservationInstanceProperties struct {
	// MachineType: string, required
	MachineType terra.StringValue `hcl:"machine_type,attr" validate:"required"`
	// MinCpuPlatform: string, optional
	MinCpuPlatform terra.StringValue `hcl:"min_cpu_platform,attr"`
	// SpecificReservationInstancePropertiesGuestAccelerators: min=0
	GuestAccelerators []SpecificReservationInstancePropertiesGuestAccelerators `hcl:"guest_accelerators,block" validate:"min=0"`
	// SpecificReservationInstancePropertiesLocalSsds: min=0
	LocalSsds []SpecificReservationInstancePropertiesLocalSsds `hcl:"local_ssds,block" validate:"min=0"`
}

type SpecificReservationInstancePropertiesAttributes

type SpecificReservationInstancePropertiesAttributes struct {
	// contains filtered or unexported fields
}

func (SpecificReservationInstancePropertiesAttributes) InternalRef

func (SpecificReservationInstancePropertiesAttributes) InternalTokens

func (SpecificReservationInstancePropertiesAttributes) InternalWithRef

func (SpecificReservationInstancePropertiesAttributes) MachineType

func (SpecificReservationInstancePropertiesAttributes) MinCpuPlatform

type SpecificReservationInstancePropertiesGuestAccelerators

type SpecificReservationInstancePropertiesGuestAccelerators struct {
	// AcceleratorCount: number, required
	AcceleratorCount terra.NumberValue `hcl:"accelerator_count,attr" validate:"required"`
	// AcceleratorType: string, required
	AcceleratorType terra.StringValue `hcl:"accelerator_type,attr" validate:"required"`
}

type SpecificReservationInstancePropertiesGuestAcceleratorsAttributes

type SpecificReservationInstancePropertiesGuestAcceleratorsAttributes struct {
	// contains filtered or unexported fields
}

func (SpecificReservationInstancePropertiesGuestAcceleratorsAttributes) AcceleratorCount

func (SpecificReservationInstancePropertiesGuestAcceleratorsAttributes) AcceleratorType

func (SpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalRef

func (SpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalTokens

func (SpecificReservationInstancePropertiesGuestAcceleratorsAttributes) InternalWithRef

type SpecificReservationInstancePropertiesGuestAcceleratorsState

type SpecificReservationInstancePropertiesGuestAcceleratorsState struct {
	AcceleratorCount float64 `json:"accelerator_count"`
	AcceleratorType  string  `json:"accelerator_type"`
}

type SpecificReservationInstancePropertiesLocalSsds

type SpecificReservationInstancePropertiesLocalSsds struct {
	// DiskSizeGb: number, required
	DiskSizeGb terra.NumberValue `hcl:"disk_size_gb,attr" validate:"required"`
	// Interface: string, optional
	Interface terra.StringValue `hcl:"interface,attr"`
}

type SpecificReservationInstancePropertiesLocalSsdsAttributes

type SpecificReservationInstancePropertiesLocalSsdsAttributes struct {
	// contains filtered or unexported fields
}

func (SpecificReservationInstancePropertiesLocalSsdsAttributes) DiskSizeGb

func (SpecificReservationInstancePropertiesLocalSsdsAttributes) Interface

func (SpecificReservationInstancePropertiesLocalSsdsAttributes) InternalRef

func (SpecificReservationInstancePropertiesLocalSsdsAttributes) InternalTokens

func (SpecificReservationInstancePropertiesLocalSsdsAttributes) InternalWithRef

type SpecificReservationInstancePropertiesLocalSsdsState

type SpecificReservationInstancePropertiesLocalSsdsState struct {
	DiskSizeGb float64 `json:"disk_size_gb"`
	Interface  string  `json:"interface"`
}

type SpecificReservationInstancePropertiesState

type SpecificReservationInstancePropertiesState struct {
	MachineType       string                                                        `json:"machine_type"`
	MinCpuPlatform    string                                                        `json:"min_cpu_platform"`
	GuestAccelerators []SpecificReservationInstancePropertiesGuestAcceleratorsState `json:"guest_accelerators"`
	LocalSsds         []SpecificReservationInstancePropertiesLocalSsdsState         `json:"local_ssds"`
}

type SpecificReservationState

type SpecificReservationState struct {
	Count              float64                                      `json:"count"`
	InUseCount         float64                                      `json:"in_use_count"`
	InstanceProperties []SpecificReservationInstancePropertiesState `json:"instance_properties"`
}

type Timeouts

type Timeouts struct {
	// Create: string, optional
	Create terra.StringValue `hcl:"create,attr"`
	// Delete: string, optional
	Delete terra.StringValue `hcl:"delete,attr"`
	// Update: string, optional
	Update terra.StringValue `hcl:"update,attr"`
}

type TimeoutsAttributes

type TimeoutsAttributes struct {
	// contains filtered or unexported fields
}

func (TimeoutsAttributes) Create

func (TimeoutsAttributes) Delete

func (TimeoutsAttributes) InternalRef

func (t TimeoutsAttributes) InternalRef() (terra.Reference, error)

func (TimeoutsAttributes) InternalTokens

func (t TimeoutsAttributes) InternalTokens() (hclwrite.Tokens, error)

func (TimeoutsAttributes) InternalWithRef

func (t TimeoutsAttributes) InternalWithRef(ref terra.Reference) TimeoutsAttributes

func (TimeoutsAttributes) Update

type TimeoutsState

type TimeoutsState struct {
	Create string `json:"create"`
	Delete string `json:"delete"`
	Update string `json:"update"`
}

Jump to

Keyboard shortcuts

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