provider

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: BSD-2-Clause-Patent Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewDartVersionsDataSource

func NewDartVersionsDataSource() datasource.DataSource

func NewServiceConfigDataSource

func NewServiceConfigDataSource() datasource.DataSource

func NewServiceConfigResource

func NewServiceConfigResource() resource.Resource

func NewServiceProjectResource

func NewServiceProjectResource() resource.Resource

func NewServiceResource

func NewServiceResource() resource.Resource

func NewServiceRolloutResource

func NewServiceRolloutResource() resource.Resource

func NewServiceTenancyUnitResource

func NewServiceTenancyUnitResource() resource.Resource

Types

type DartVersionsDataSource

type DartVersionsDataSource struct{}

func (*DartVersionsDataSource) Configure

func (*DartVersionsDataSource) Metadata

Metadata implements datasource.DataSource.

func (*DartVersionsDataSource) Read

func (*DartVersionsDataSource) Schema

Schema implements datasource.DataSource.

type DartVersionsDataSourceModel

type DartVersionsDataSourceModel struct {
	SdkType    types.String `tfsdk:"sdk_type"`
	MinVersion types.String `tfsdk:"min_version"`
	Channels   types.List   `tfsdk:"channels"`

	// Computed
	ID       types.String `tfsdk:"id"`
	Versions types.List   `tfsdk:"versions"`
}

type PolicyBinding

type PolicyBinding struct {
	Role    types.String `tfsdk:"role"`
	Members types.List   `tfsdk:"members"`
}

func (PolicyBinding) AttributeTypes

func (PolicyBinding) AttributeTypes() map[string]attr.Type

type ServiceConfigDataSource

type ServiceConfigDataSource struct {
	ServiceManagerClient *servicemanagement.ServiceManagerClient
}

func (*ServiceConfigDataSource) Configure

func (*ServiceConfigDataSource) Metadata

Metadata implements datasource.DataSource.

func (*ServiceConfigDataSource) Read

Read implements datasource.DataSource.

func (*ServiceConfigDataSource) Schema

Schema implements datasource.DataSource.

type ServiceConfigDataSourceModel

type ServiceConfigDataSourceModel struct {
	ID types.String `tfsdk:"id"`

	// Computed
	ServiceConfigJSON types.String `tfsdk:"service_config_json"`
}

type ServiceConfigResource

type ServiceConfigResource struct {
	UtilsProviderConfig
}

ServiceResource defines the resource implementation.

func (*ServiceConfigResource) Configure

func (*ServiceConfigResource) Create

Create implements resource.Resource.

func (*ServiceConfigResource) Delete

Delete implements resource.Resource.

func (*ServiceConfigResource) ImportState

ImportState implements resource.ResourceWithImportState.

func (*ServiceConfigResource) Metadata

func (*ServiceConfigResource) Read

Read implements resource.Resource.

func (*ServiceConfigResource) Schema

func (*ServiceConfigResource) Update

Update implements resource.Resource.

type ServiceConfigResourceModel

type ServiceConfigResourceModel struct {
	Id                    types.String `tfsdk:"id"`
	ServiceName           types.String `tfsdk:"service_name"`
	ConfigYaml            types.String `tfsdk:"config_yaml"`
	ProtoDescriptorBase64 types.String `tfsdk:"proto_descriptor_base64"`
}

type ServiceProjectConfigBillingConfigModel

type ServiceProjectConfigBillingConfigModel struct {
	BillingAccount types.String `tfsdk:"billing_account"`
}

func (ServiceProjectConfigBillingConfigModel) AttributeTypes

type ServiceProjectConfigModel

type ServiceProjectConfigModel struct {
	Folder               types.String `tfsdk:"folder"`
	TenantProjectPolicy  types.Object `tfsdk:"tenant_project_policy"`
	Labels               types.Map    `tfsdk:"labels"`
	Services             types.List   `tfsdk:"services"`
	BillingConfig        types.Object `tfsdk:"billing_config"`
	ServiceAccountConfig types.Object `tfsdk:"service_account_config"`
}

func (ServiceProjectConfigModel) AttributeTypes

func (ServiceProjectConfigModel) AttributeTypes() map[string]attr.Type

type ServiceProjectConfigServiceAccountConfigModel

type ServiceProjectConfigServiceAccountConfigModel struct {
	AccountID          types.String `tfsdk:"account_id"`
	TenantProjectRoles types.List   `tfsdk:"tenant_project_roles"`
}

func (ServiceProjectConfigServiceAccountConfigModel) AttributeTypes

type ServiceProjectConfigTenantProjectPolicyModel

type ServiceProjectConfigTenantProjectPolicyModel struct {
	PolicyBindings types.List `tfsdk:"policy_bindings"`
}

func (ServiceProjectConfigTenantProjectPolicyModel) AttributeTypes

type ServiceProjectResource

type ServiceProjectResource struct {
	UtilsProviderConfig
}

ServiceProjectResource defines the resource implementation.

func (*ServiceProjectResource) Configure

func (*ServiceProjectResource) Create

func (*ServiceProjectResource) Delete

func (*ServiceProjectResource) Metadata

func (*ServiceProjectResource) Read

func (*ServiceProjectResource) Schema

func (*ServiceProjectResource) Update

type ServiceProjectResourceModel

type ServiceProjectResourceModel struct {
	ID            types.String `tfsdk:"id"`
	TenancyUnit   types.String `tfsdk:"tenancy_unit"`
	Tag           types.String `tfsdk:"tag"`
	ProjectConfig types.Object `tfsdk:"project_config"`

	// Computed
	Status types.String `tfsdk:"status"`
}

ServiceProjectResourceModel describes the resource data model.

type ServiceResource

type ServiceResource struct {
	UtilsProviderConfig
}

ServiceResource defines the resource implementation.

func (*ServiceResource) Configure

func (*ServiceResource) Create

func (*ServiceResource) Delete

func (*ServiceResource) ImportState

func (*ServiceResource) Metadata

func (*ServiceResource) Read

func (*ServiceResource) Schema

func (*ServiceResource) Update

type ServiceResourceModel

type ServiceResourceModel struct {
	ServiceName        types.String `tfsdk:"service_name"`
	ProducerProjectId  types.String `tfsdk:"producer_project_id"`
	DefaultTenancyUnit types.String `tfsdk:"default_tenancy_unit"`
}

ServiceResource Model describes the resource data model.

type ServiceRolloutResource

type ServiceRolloutResource struct {
	UtilsProviderConfig
}

ServiceResource defines the resource implementation.

func (*ServiceRolloutResource) Configure

func (*ServiceRolloutResource) Create

Create implements resource.Resource.

func (*ServiceRolloutResource) Delete

Delete implements resource.Resource.

func (*ServiceRolloutResource) ImportState

func (*ServiceRolloutResource) Metadata

func (*ServiceRolloutResource) Read

Read implements resource.Resource.

func (*ServiceRolloutResource) Schema

Schema implements resource.Resource.

func (*ServiceRolloutResource) Update

Update implements resource.Resource.

type ServiceRolloutResourceModel

type ServiceRolloutResourceModel struct {
	Id            types.String `tfsdk:"id"`
	ConfigId      types.String `tfsdk:"config_id"`
	RolloutConfig types.Map    `tfsdk:"rollout_config"`
}

type ServiceTenancyUnitModel

type ServiceTenancyUnitModel struct {
	ID          types.String `tfsdk:"id"`
	ServiceName types.String `tfsdk:"service_name"`
	Consumer    types.String `tfsdk:"consumer"`
}

ServiceTenancyUnitModel describes the resource data model.

type ServiceTenancyUnitResource

type ServiceTenancyUnitResource struct {
	UtilsProviderConfig
}

ServiceTenancyUnitResource defines the resource implementation.

func (*ServiceTenancyUnitResource) Configure

func (*ServiceTenancyUnitResource) Create

func (*ServiceTenancyUnitResource) Delete

func (*ServiceTenancyUnitResource) ImportState

func (*ServiceTenancyUnitResource) Metadata

func (*ServiceTenancyUnitResource) Read

func (*ServiceTenancyUnitResource) Schema

func (*ServiceTenancyUnitResource) Update

type TenantResource

type TenantResource serviceconsumermanagement.TenantResource

func (TenantResource) ServiceAccountEmail

func (r TenantResource) ServiceAccountEmail() string

type UtilsProvider

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

UtilsProvider defines the provider implementation.

func (*UtilsProvider) ConfigValidators

func (p *UtilsProvider) ConfigValidators(ctx context.Context) []provider.ConfigValidator

func (*UtilsProvider) Configure

func (*UtilsProvider) DataSources

func (p *UtilsProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*UtilsProvider) Metadata

func (*UtilsProvider) Resources

func (p *UtilsProvider) Resources(ctx context.Context) []func() resource.Resource

func (*UtilsProvider) Schema

type UtilsProviderConfig

type UtilsProviderConfig struct {
	// ServiceManagerClient is the authenticated client for `servicemanagement.googleapis.com`.
	ServiceManagerClient *servicemanagement.ServiceManagerClient

	// TenantClient is the authenticated client for `serviceconsumermanagement.googleapis.com`.
	TenantClient *serviceconsumermanagement.APIService

	// OperationsClient is the authenticated operations client for `servicemanagement.googleapis.com`.
	OperationsClient *lrauto.OperationsClient
}

UtilsProviderConfig holds the necessary GCP configuration for the provider.

type UtilsProviderModel

type UtilsProviderModel struct {
	// ProjectID is the GCP project to use for requests.
	ProjectID types.String `tfsdk:"project_id"`

	// Optional. AccessToken is the optional GCP access token.
	AccessToken types.String `tfsdk:"access_token"`
}

UtilsProviderModel describes the provider data model.

Jump to

Keyboard shortcuts

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