provider

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const ABX_API_VERSION = "2019-09-12"
View Source
const BLUEPRINT_API_VERSION = "2019-09-12"
View Source
const CATALOG_API_VERSION = "2020-08-25"
View Source
const EVENT_BROKER_API_VERSION = ""

TODO then ensure its used (check related TODOs). 7.6 ?? https://developer.vmware.com/apis/576/#api

View Source
const FORM_API_VERSION = "1.0"
View Source
const IAAS_API_VERSION = "2021-07-15"
View Source
const ICON_API_VERSION = ""

TODO then ensure its used (check related TODOs).

View Source
const PLATFORM_API_VERSION = ""

TODO then ensure its used (check related TODOs).

View Source
const POLICY_API_VERSION = "2020-08-25"

Variables

This section is empty.

Functions

func CheckDeepEqual added in v0.2.3

func CheckDeepEqual(t *testing.T, actual interface{}, expected interface{})

func CheckDiagnostics added in v0.2.3

func CheckDiagnostics(
	t *testing.T,
	diags diag.Diagnostics,
	warningMessage string,
	errorMessage string,
)

func CheckEqual added in v0.2.3

func CheckEqual(t *testing.T, actual interface{}, expected interface{})

func CleanString added in v0.1.1

func CleanString(value string) string

func ComputedIdentifierSchema added in v0.3.0

func ComputedIdentifierSchema(description string) schema.StringAttribute

func ComputedMutableIdentifierSchema added in v0.3.0

func ComputedMutableIdentifierSchema() schema.StringAttribute

func ComputedOrganizationIdSchema added in v0.3.0

func ComputedOrganizationIdSchema() schema.StringAttribute

func CustomFormModelAttributeTypes added in v0.3.1

func CustomFormModelAttributeTypes() map[string]attr.Type

Used to convert structure to a types.Object.

func CustomFormSchema added in v0.3.1

func CustomFormSchema() schema.SingleNestedAttribute

Optional, only used by the ResourceActionSchema (as of current version).

func DeleteIt added in v0.2.3

func DeleteIt(
	client *resty.Client,
	ctx context.Context,
	name string,
	path string,
	apiVersion string,
) diag.Diagnostics

func GetDataSourceClient

func GetDataSourceClient(
	ctx context.Context,
	req datasource.ConfigureRequest,
	resp *datasource.ConfigureResponse,
) *resty.Client

func GetIdFromLocation

func GetIdFromLocation(response *resty.Response) (string, error)

func GetResourceClient

func GetResourceClient(
	ctx context.Context,
	req resource.ConfigureRequest,
	resp *resource.ConfigureResponse,
) *resty.Client

func JSONRencode added in v0.3.1

func JSONRencode(value string, title string) (string, diag.Diagnostics)

Decode then encode to JSON a given JSON encoded value. Default to given value in case of error. You must check diagnostics. Use case: Stabilize Aria API response data to stabilize its content.

To prevent this:

Error: Provider produced inconsistent result after apply

When applying changes to aria_resource_action.test, provider "provider[\"registry.terraform.io/hashicorp/aria\"]" produced an unexpected new value: .form_definition.form: was cty.StringVal("{\"layout\":{\"pages\":[{\"id\":\"page_1\",\"sections\":[],\"title\":\"Page Numéro 1\"}]},\"schema\":{}}"), but now cty.StringVal("{\"layout\":{\"pages\":[{\"id\":\"page_1\",\"title\":\"Page Numéro 1\",\"sections\":[]}]},\"schema\":{}}").

This is a bug in the provider, which should be reported in the provider's own issue tracker.

func New

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

func NewABXActionResource added in v0.1.1

func NewABXActionResource() resource.Resource

func NewABXConstantResource

func NewABXConstantResource() resource.Resource

func NewABXSensitiveConstantResource added in v0.2.0

func NewABXSensitiveConstantResource() resource.Resource

func NewCatalogTypeDataSource added in v0.1.1

func NewCatalogTypeDataSource() datasource.DataSource

func NewCustomNamingResource added in v0.2.5

func NewCustomNamingResource() resource.Resource

func NewCustomResourceResource added in v0.2.3

func NewCustomResourceResource() resource.Resource

func NewExampleFunction

func NewExampleFunction() function.Function

func NewIconDataSource

func NewIconDataSource() datasource.DataSource

func NewIconResource

func NewIconResource() resource.Resource

func NewPropertyGroupResource added in v0.3.0

func NewPropertyGroupResource() resource.Resource

func NewResourceActionResource added in v0.2.3

func NewResourceActionResource() resource.Resource

func NewSecretDataSource added in v0.2.2

func NewSecretDataSource() datasource.DataSource

func NewSubscriptionResource added in v0.1.1

func NewSubscriptionResource() resource.Resource

func OptionalImmutableProjectIdSchema added in v0.3.1

func OptionalImmutableProjectIdSchema() schema.StringAttribute

func OrderedPropertiesSchema added in v0.3.0

func OrderedPropertiesSchema(description string) schema.ListNestedAttribute

func PropertyOneOfSchema added in v0.3.0

func PropertyOneOfSchema() schema.ListNestedAttribute

func PropertySchema added in v0.3.0

func PropertySchema() schema.NestedAttributeObject

func RequiredIdentifierSchema added in v0.3.0

func RequiredIdentifierSchema(description string) schema.StringAttribute

func RequiredProjectId added in v0.3.1

func RequiredProjectId() schema.StringAttribute

func ResourceActionRunnableSchema added in v0.3.0

func ResourceActionRunnableSchema(description string) schema.SingleNestedAttribute

func SkipEmpty added in v0.1.1

func SkipEmpty(value []string) []string

func StringOrNullValue added in v0.1.1

func StringOrNullValue(value string) types.String

func UnorderedPropertiesSchema added in v0.3.0

func UnorderedPropertiesSchema(description string) schema.MapNestedAttribute

Types

type ABXActionAPIModel added in v0.1.1

type ABXActionAPIModel struct {
	Id           string `json:"id,omitempty"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	FAASProvider string `json:"provider"`
	Type         string `json:"actionType"`

	RuntimeName    string `json:"runtime"`
	RuntimeVersion string `json:"runtimeVersion"`

	CPUShares                int32 `json:"cpuShares"`
	MemoryInMB               int32 `json:"memoryInMB"`
	TimeoutSeconds           int32 `json:"timeoutSeconds"`
	DeploymentTimeoutSeconds int32 `json:"deploymentTimeoutSeconds"`

	Entrypoint   string            `json:"entrypoint"`
	Dependencies string            `json:"dependencies"`
	Inputs       map[string]string `json:"inputs"`

	Source string `json:"source"`

	Shared        bool `json:"shared"`
	System        bool `json:"system"`
	AsyncDeployed bool `json:"asyncDeployed"`

	ProjectId string `json:"projectId"`
	OrgId     string `json:"orgId"`
}

ABXActionAPIModel describes the resource API model.

type ABXActionModel added in v0.1.1

type ABXActionModel struct {
	Id           types.String `tfsdk:"id"`
	Name         types.String `tfsdk:"name"`
	Description  types.String `tfsdk:"description"`
	FAASProvider types.String `tfsdk:"faas_provider"`
	Type         types.String `tfsdk:"type"`

	RuntimeName    types.String `tfsdk:"runtime_name"`
	RuntimeVersion types.String `tfsdk:"runtime_version"`

	CPUShares                types.Int32 `tfsdk:"cpu_shares"`
	MemoryInMB               types.Int32 `tfsdk:"memory_in_mb"`
	TimeoutSeconds           types.Int32 `tfsdk:"timeout_seconds"`
	DeploymentTimeoutSeconds types.Int32 `tfsdk:"deployment_timeout_seconds"`

	Entrypoint   types.String `tfsdk:"entrypoint"`
	Dependencies types.List   `tfsdk:"dependencies"`
	Constants    types.Set    `tfsdk:"constants"`
	Secrets      types.Set    `tfsdk:"secrets"`

	Source types.String `tfsdk:"source"`

	Shared        types.Bool `tfsdk:"shared"`
	System        types.Bool `tfsdk:"system"`
	AsyncDeployed types.Bool `tfsdk:"async_deployed"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXActionModel describes the resource data model.

func (*ABXActionModel) FromAPI added in v0.1.1

func (self *ABXActionModel) FromAPI(
	ctx context.Context,
	raw ABXActionAPIModel,
) diag.Diagnostics

func (ABXActionModel) String added in v0.2.3

func (self ABXActionModel) String() string

func (ABXActionModel) ToAPI added in v0.1.1

type ABXActionResource added in v0.1.1

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

ABXActionResource defines the resource implementation.

func (*ABXActionResource) Configure added in v0.1.1

func (*ABXActionResource) Create added in v0.1.1

func (*ABXActionResource) Delete added in v0.1.1

func (*ABXActionResource) ImportState added in v0.1.1

func (*ABXActionResource) Metadata added in v0.1.1

func (*ABXActionResource) Read added in v0.1.1

func (*ABXActionResource) Schema added in v0.1.1

func (*ABXActionResource) Update added in v0.1.1

type ABXConstantAPIModel added in v0.1.1

type ABXConstantAPIModel struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name"`
	Value         string `json:"value"`
	Encrypted     bool   `json:"encrypted"`
	OrgId         string `json:"orgId"`
	CreatedMillis uint64 `json:"createdMillis"`
}

ABXConstantAPIModel describes the resource API model.

type ABXConstantModel added in v0.1.1

type ABXConstantModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Value     types.String `tfsdk:"value"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXConstantModel describes the resource data model.

func (*ABXConstantModel) FromAPI added in v0.1.1

func (ABXConstantModel) String added in v0.2.3

func (self ABXConstantModel) String() string

func (ABXConstantModel) ToAPI added in v0.1.1

type ABXConstantResource

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

ABXConstantResource defines the resource implementation.

func (*ABXConstantResource) Configure

func (*ABXConstantResource) Create

func (*ABXConstantResource) Delete

func (*ABXConstantResource) ImportState

func (*ABXConstantResource) Metadata

func (*ABXConstantResource) Read

func (*ABXConstantResource) Schema

func (*ABXConstantResource) Update

type ABXSensitiveConstantAPIModel added in v0.2.0

type ABXSensitiveConstantAPIModel struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name"`
	Value         string `json:"value"`
	Encrypted     bool   `json:"encrypted"`
	OrgId         string `json:"orgId"`
	CreatedMillis uint64 `json:"createdMillis"`
}

ABXSensitiveConstantAPIModel describes the resource API model.

type ABXSensitiveConstantModel added in v0.2.0

type ABXSensitiveConstantModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	Value     types.String `tfsdk:"value"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
	OrgId     types.String `tfsdk:"org_id"`
}

ABXSensitiveConstantModel describes the resource data model.

func (*ABXSensitiveConstantModel) FromAPI added in v0.2.0

func (ABXSensitiveConstantModel) String added in v0.2.3

func (self ABXSensitiveConstantModel) String() string

func (ABXSensitiveConstantModel) ToAPI added in v0.2.0

type ABXSensitiveConstantResource added in v0.2.0

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

ABXSensitiveConstantResource defines the resource implementation.

func (*ABXSensitiveConstantResource) Configure added in v0.2.0

func (*ABXSensitiveConstantResource) Create added in v0.2.0

func (*ABXSensitiveConstantResource) Delete added in v0.2.0

func (*ABXSensitiveConstantResource) Metadata added in v0.2.0

func (*ABXSensitiveConstantResource) Read added in v0.2.0

func (*ABXSensitiveConstantResource) Schema added in v0.2.0

func (*ABXSensitiveConstantResource) Update added in v0.2.0

type AccessTokenResponse

type AccessTokenResponse struct {
	TokenType string `json:"tokenType"`
	Token     string `json:"token"`
}

type ActionParameterAPIModel added in v0.2.3

type ActionParameterAPIModel struct {
	Type        string `json:"type"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

ActionParameterAPIModel describes the resource API model.

type ActionParameterModel added in v0.2.3

type ActionParameterModel struct {
	Type        types.String `tfsdk:"type"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
}

ActionParameterModel describes the resource data model.

func (*ActionParameterModel) FromAPI added in v0.2.3

func (ActionParameterModel) ToAPI added in v0.2.3

type AriaClientConfig

type AriaClientConfig struct {

	// Host must be a the URL to the base of the API.
	Host string

	RefreshToken string `datapolicy:"token"`
	AccessToken  string `datapolicy:"token"`

	// Transport Layer.
	Insecure bool

	// UserAgent is an optional field that specifies the caller of this request.
	UserAgent string

	Context context.Context
}

func (*AriaClientConfig) Check

func (self *AriaClientConfig) Check() error

func (*AriaClientConfig) Client

func (self *AriaClientConfig) Client() *resty.Client

func (*AriaClientConfig) GetAccessToken

func (self *AriaClientConfig) GetAccessToken() error

type AriaProvider

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

AriaProvider defines the provider implementation.

func (*AriaProvider) Configure

func (self *AriaProvider) Configure(
	ctx context.Context,
	req provider.ConfigureRequest,
	resp *provider.ConfigureResponse,
)

func (*AriaProvider) DataSources

func (self *AriaProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*AriaProvider) Functions

func (self *AriaProvider) Functions(ctx context.Context) []func() function.Function

func (*AriaProvider) Metadata

func (self *AriaProvider) Metadata(
	ctx context.Context,
	req provider.MetadataRequest,
	resp *provider.MetadataResponse,
)

func (*AriaProvider) Resources

func (self *AriaProvider) Resources(ctx context.Context) []func() resource.Resource

func (*AriaProvider) Schema

func (self *AriaProvider) Schema(
	ctx context.Context,
	req provider.SchemaRequest,
	resp *provider.SchemaResponse,
)

type AriaProviderModel

type AriaProviderModel struct {
	Host         types.String `tfsdk:"host"`
	Insecure     types.Bool   `tfsdk:"insecure"`
	RefreshToken types.String `tfsdk:"refresh_token"`
	AccessToken  types.String `tfsdk:"access_token"`
}

AriaProviderModel describes the provider data model.

type CatalogTypeAPIModel added in v0.1.1

type CatalogTypeAPIModel struct {
	Id        string `json:"id,omitempty"`
	Name      string `json:"name"`
	BaseURI   string `json:"baseUri"`
	CreatedAt string `json:"createdAt"`
	CreatedBy string `json:"createdBy"`
	IconId    string `json:"iconId"`
}

CatalogTypeAPIModel describes the catalog type API model.

type CatalogTypeDataSource added in v0.1.1

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

CatalogTypeDataSource defines the data source implementation.

func (*CatalogTypeDataSource) Configure added in v0.1.1

func (*CatalogTypeDataSource) Metadata added in v0.1.1

func (*CatalogTypeDataSource) Read added in v0.1.1

func (*CatalogTypeDataSource) Schema added in v0.1.1

type CatalogTypeModel added in v0.1.1

type CatalogTypeModel struct {
	Id        types.String `tfsdk:"id"`
	Name      types.String `tfsdk:"name"`
	BaseURI   types.String `tfsdk:"base_uri"`
	CreatedAt types.String `tfsdk:"created_at"`
	CreatedBy types.String `tfsdk:"created_by"`
	IconId    types.String `tfsdk:"icon_id"`
}

CatalogTypeModel describes the catalog type model.

func (*CatalogTypeModel) FromAPI added in v0.1.1

type CustomFormAPIModel added in v0.2.3

type CustomFormAPIModel struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name"`
	Type       string `json:"type,omitempty"`
	Form       string `json:"form,omitempty"` // TODO A struct to define this attribute
	FormFormat string `json:"formFormat,omitempty"`
	Styles     string `json:"styles,omitempty"`
	SourceId   string `json:"sourceId,omitempty"`
	SourceType string `json:"sourceType,omitempty"`
	Tenant     string `json:"tenant,omitempty"`
	Status     string `json:"status,omitempty"`
}

CustomFormAPIModel describes the resource API model.

func CustomFormAPIModelFromObject added in v0.3.1

func CustomFormAPIModelFromObject(
	ctx context.Context,
	object types.Object,
) (*CustomFormAPIModel, diag.Diagnostics)

Convert an object to a CustomFormAPIModel.

func (*CustomFormAPIModel) ToObject added in v0.3.1

func (self *CustomFormAPIModel) ToObject(
	ctx context.Context,
) (types.Object, diag.Diagnostics)

Convert a CustomFormAPIModel to an object.

type CustomFormModel added in v0.2.3

type CustomFormModel struct {
	Id         types.String `tfsdk:"id"`
	Name       types.String `tfsdk:"name"`
	Type       types.String `tfsdk:"type"`
	Form       types.String `tfsdk:"form"` // TODO A struct to define this attribute
	FormFormat types.String `tfsdk:"form_format"`
	Styles     types.String `tfsdk:"styles"`
	SourceId   types.String `tfsdk:"source_id"`
	SourceType types.String `tfsdk:"source_type"`
	Tenant     types.String `tfsdk:"tenant"`
	Status     types.String `tfsdk:"status"`
}

CustomFormModel describes the resource data model.

func (*CustomFormModel) FromAPI added in v0.2.3

func (*CustomFormModel) String added in v0.3.1

func (self *CustomFormModel) String() string

func (*CustomFormModel) ToAPI added in v0.2.3

type CustomNamingAPIModel added in v0.2.5

type CustomNamingAPIModel struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`

	Projects  []CustomNamingProjectFilterAPIModel `json:"projects"`
	Templates []CustomNamingTemplateAPIModel      `json:"templates"`
}

CustomNamingAPIModel describes the resource API model.

type CustomNamingModel added in v0.2.5

type CustomNamingModel struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`

	Projects  []CustomNamingProjectFilterModel     `tfsdk:"projects"`
	Templates map[string]CustomNamingTemplateModel `tfsdk:"templates"`
}

CustomNamingModel describes the resource data model.

func (*CustomNamingModel) FromAPI added in v0.2.5

func (*CustomNamingModel) String added in v0.2.5

func (self *CustomNamingModel) String() string

func (*CustomNamingModel) ToAPI added in v0.2.5

type CustomNamingProjectFilterAPIModel added in v0.2.5

type CustomNamingProjectFilterAPIModel struct {
	Id          string `json:"id,omitempty"`
	Active      bool   `json:"active"`
	OrgDefault  bool   `json:"defaultOrg"`
	OrgId       string `json:"orgId"`
	ProjectId   string `json:"projectId"`
	ProjectName string `json:"projectName"`
}

CustomNamingProjectFilterAPIModel describes the resource API model.

type CustomNamingProjectFilterModel added in v0.2.5

type CustomNamingProjectFilterModel struct {
	Id          types.String `tfsdk:"id"`
	Active      types.Bool   `tfsdk:"active"`
	OrgDefault  types.Bool   `tfsdk:"org_default"`
	OrgId       types.String `tfsdk:"org_id"`
	ProjectId   types.String `tfsdk:"project_id"`
	ProjectName types.String `tfsdk:"project_name"`
}

CustomNamingProjectFilterModel describes the resource data model.

func (*CustomNamingProjectFilterModel) FromAPI added in v0.2.5

func (CustomNamingProjectFilterModel) String added in v0.2.5

func (self CustomNamingProjectFilterModel) String() string

func (CustomNamingProjectFilterModel) ToAPI added in v0.2.5

type CustomNamingResource added in v0.2.5

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

CustomNamingResource defines the resource implementation.

func (*CustomNamingResource) Configure added in v0.2.5

func (*CustomNamingResource) Create added in v0.2.5

func (*CustomNamingResource) Delete added in v0.2.5

func (*CustomNamingResource) ImportState added in v0.2.5

func (*CustomNamingResource) Metadata added in v0.2.5

func (*CustomNamingResource) Read added in v0.2.5

func (*CustomNamingResource) Schema added in v0.2.5

func (*CustomNamingResource) Update added in v0.2.5

type CustomNamingTemplateAPIModel added in v0.2.5

type CustomNamingTemplateAPIModel struct {
	Id               string `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	ResourceType     string `json:"resourceType"`
	ResourceTypeName string `json:"resourceTypeName"`
	ResourceDefault  bool   `json:"resourceDefault"`
	UniqueName       bool   `json:"uniqueName"`
	Pattern          string `json:"pattern"`
	StaticPattern    string `json:"staticPattern"`
	StartCounter     int32  `json:"startCounter"`
	IncrementStep    int32  `json:"incrementStep"`
}

CustomNamingTemplateAPIModel describes the resource API model.

type CustomNamingTemplateModel added in v0.2.5

type CustomNamingTemplateModel struct {
	Id               types.String `tfsdk:"id"`
	Name             types.String `tfsdk:"name"`
	ResourceType     types.String `tfsdk:"resource_type"`
	ResourceTypeName types.String `tfsdk:"resource_type_name"`
	ResourceDefault  types.Bool   `tfsdk:"resource_default"`
	Pattern          types.String `tfsdk:"pattern"`
	StaticPattern    types.String `tfsdk:"static_pattern"`
	UniqueName       types.Bool   `tfsdk:"unique_name"`
	StartCounter     types.Int32  `tfsdk:"start_counter"`
	IncrementStep    types.Int32  `tfsdk:"increment_step"`
}

CustomNamingTemplateModel describes the resource data model.

func (*CustomNamingTemplateModel) FromAPI added in v0.2.5

func (CustomNamingTemplateModel) Key added in v0.2.5

func (self CustomNamingTemplateModel) Key() string

func (CustomNamingTemplateModel) String added in v0.2.5

func (self CustomNamingTemplateModel) String() string

func (CustomNamingTemplateModel) ToAPI added in v0.2.5

type CustomResourceAPIModel added in v0.2.3

type CustomResourceAPIModel struct {
	Id           string `json:"id,omitempty"`
	DisplayName  string `json:"displayName"`
	Description  string `json:"description"`
	ResourceType string `json:"resourceType"`
	SchemaType   string `json:"schemaType"`
	Status       string `json:"status"`

	Properties CustomResourcePropertiesAPIModel `json:"properties"`

	MainActions map[string]ResourceActionRunnableAPIModel `json:"mainActions"`

	ProjectId string `json:"projectId"`
	OrgId     string `json:"orgId"`
}

CustomResourceAPIModel describes the resource API model.

type CustomResourceModel added in v0.2.3

type CustomResourceModel struct {
	Id           types.String `tfsdk:"id"`
	DisplayName  types.String `tfsdk:"display_name"`
	Description  types.String `tfsdk:"description"`
	ResourceType types.String `tfsdk:"resource_type"`
	SchemaType   types.String `tfsdk:"schema_type"`
	Status       types.String `tfsdk:"status"`

	Properties UnorderedPropertiesModel `tfsdk:"properties"`

	Create ResourceActionRunnableModel `tfsdk:"create"`
	Read   ResourceActionRunnableModel `tfsdk:"read"`
	Update ResourceActionRunnableModel `tfsdk:"update"`
	Delete ResourceActionRunnableModel `tfsdk:"delete"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

CustomResourceModel describes the resource data model.

func (*CustomResourceModel) FromAPI added in v0.2.3

func (CustomResourceModel) String added in v0.2.3

func (self CustomResourceModel) String() string

func (CustomResourceModel) ToAPI added in v0.2.3

type CustomResourcePropertiesAPIModel added in v0.2.3

type CustomResourcePropertiesAPIModel struct {
	Properties UnorderedPropertiesAPIModel `json:"properties"`
}

CustomResourcePropertiesAPIModel describes the resource API model.

type CustomResourceResource added in v0.2.3

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

CustomResourceResource defines the resource implementation.

func (*CustomResourceResource) Configure added in v0.2.3

func (*CustomResourceResource) Create added in v0.2.3

func (*CustomResourceResource) Delete added in v0.2.3

func (*CustomResourceResource) ImportState added in v0.2.3

func (*CustomResourceResource) Metadata added in v0.2.3

func (*CustomResourceResource) Read added in v0.2.3

func (*CustomResourceResource) Schema added in v0.2.3

func (*CustomResourceResource) Update added in v0.2.3

type ExampleFunction

type ExampleFunction struct{}

func (ExampleFunction) Definition

func (ExampleFunction) Metadata

func (ExampleFunction) Run

type IconDataSource

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

IconDataSource defines the data source implementation.

func (*IconDataSource) Configure

func (*IconDataSource) Metadata

func (*IconDataSource) Read

func (*IconDataSource) Schema

type IconModel added in v0.1.1

type IconModel struct {
	Id      types.String `tfsdk:"id"`
	Content types.String `tfsdk:"content"`
}

IconModel describes the resource data model.

func (IconModel) String added in v0.2.3

func (self IconModel) String() string

type IconResource

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

IconResource defines the resource implementation.

func (*IconResource) Configure

func (self *IconResource) Configure(
	ctx context.Context,
	req resource.ConfigureRequest,
	resp *resource.ConfigureResponse,
)

func (*IconResource) Create

func (self *IconResource) Create(
	ctx context.Context,
	req resource.CreateRequest,
	resp *resource.CreateResponse,
)

func (*IconResource) Delete

func (self *IconResource) Delete(
	ctx context.Context,
	req resource.DeleteRequest,
	resp *resource.DeleteResponse,
)

func (*IconResource) ImportState

func (self *IconResource) ImportState(
	ctx context.Context,
	req resource.ImportStateRequest,
	resp *resource.ImportStateResponse,
)

func (*IconResource) Metadata

func (self *IconResource) Metadata(
	ctx context.Context,
	req resource.MetadataRequest,
	resp *resource.MetadataResponse,
)

func (*IconResource) Read

func (self *IconResource) Read(
	ctx context.Context,
	req resource.ReadRequest,
	resp *resource.ReadResponse,
)

func (*IconResource) Schema

func (self *IconResource) Schema(
	ctx context.Context,
	req resource.SchemaRequest,
	resp *resource.SchemaResponse,
)

func (*IconResource) Update

func (self *IconResource) Update(
	ctx context.Context,
	req resource.UpdateRequest,
	resp *resource.UpdateResponse,
)

type OrderedPropertiesAPIModel added in v0.4.0

type OrderedPropertiesAPIModel struct {
	Names []string
	Data  map[string]PropertyAPIModel
}

OrderedPropertiesAPIModel describes the resource API model. Refers

JSON and Go        https://blog.golang.org/json-and-go
Go-Ordered-JSON    https://github.com/virtuald/go-ordered-json
Python OrderedDict https://github.com/python/cpython/blob/2.7/Lib/collections.py#L38
port OrderedDict   https://github.com/cevaris/ordered_map

func (OrderedPropertiesAPIModel) Get added in v0.4.0

Return a property matching given name, nil if not exists.

func (*OrderedPropertiesAPIModel) Init added in v0.4.0

func (self *OrderedPropertiesAPIModel) Init()

Reset the structure (prepare it for collecting new data).

func (OrderedPropertiesAPIModel) Items added in v0.4.0

Return a slice with given the name, property pair in insertion order.

func (OrderedPropertiesAPIModel) MarshalJSON added in v0.4.0

func (self OrderedPropertiesAPIModel) MarshalJSON() ([]byte, error)

Implement type json.Marshaler interface. Will be called when marshaling OrderedPropertiesAPIModel.

func (*OrderedPropertiesAPIModel) Pop added in v0.4.0

func (self *OrderedPropertiesAPIModel) Pop(
	name string,
) (PropertyAPIModel, bool)

Drop the property if present. Return the property (if found) and a flag indicating if the property was found.

func (*OrderedPropertiesAPIModel) Set added in v0.4.0

func (self *OrderedPropertiesAPIModel) Set(
	name string,
	property PropertyAPIModel,
) bool

Set the property by name, this will remember the order of insertion. The initial insertion order is kept even if the property is overwritten. Returns a boolean indicating if the value is newly inserted (not overwritten).

func (*OrderedPropertiesAPIModel) UnmarshalJSON added in v0.4.0

func (self *OrderedPropertiesAPIModel) UnmarshalJSON(data []byte) error

Implement type json.Unmarshaler interface. Will be called when unmarshaling OrderedPropertiesAPIModel.

type OrderedPropertiesAPIModelItem added in v0.4.0

type OrderedPropertiesAPIModelItem struct {
	Name     string
	Property PropertyAPIModel
}

type OrderedPropertiesModel added in v0.4.0

type OrderedPropertiesModel []PropertyModel

OrderedPropertiesModel describes the resource data model.

func (*OrderedPropertiesModel) FromAPI added in v0.4.0

func (OrderedPropertiesModel) ToAPI added in v0.4.0

type PropertyAPIModel added in v0.2.3

type PropertyAPIModel struct {
	Title            string `json:"title"`
	Description      string `json:"description"`
	Type             string `json:"type"`
	Default          any    `json:"default,omitempty"`
	Encrypted        bool   `json:"encrypted"`
	ReadOnly         bool   `tfsdk:"readOnly"`
	RecreateOnUpdate bool   `json:"recreateOnUpdate"`

	// Specifications
	Minimum   *int64                  `json:"minimum,omitempty"`
	Maximum   *int64                  `json:"maximum,omitempty"`
	MinLength *int32                  `json:"minLength,omitempty"`
	MaxLength *int32                  `json:"maxLength,omitempty"`
	Pattern   string                  `json:"pattern"`
	OneOf     []PropertyOneOfAPIModel `json:"oneOf,omitempty"`
}

PropertyAPIModel describes the resource API model.

type PropertyGroupAPIModel added in v0.3.0

type PropertyGroupAPIModel struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Type        string `json:"type"`

	Properties UnorderedPropertiesAPIModel `json:"properties"`

	ProjectId string `json:"projectId,omitempty"`
	OrgId     string `json:"orgId,omitempty"`
}

PropertyGroupAPIModel describes the resource API model.

type PropertyGroupModel added in v0.3.0

type PropertyGroupModel struct {
	Id          types.String `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Description types.String `tfsdk:"description"`
	Type        types.String `tfsdk:"type"`

	Properties UnorderedPropertiesModel `tfsdk:"properties"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

PropertyGroupModel describes the resource data model.

func (*PropertyGroupModel) FromAPI added in v0.3.0

func (PropertyGroupModel) String added in v0.3.0

func (self PropertyGroupModel) String() string

func (PropertyGroupModel) ToAPI added in v0.3.0

type PropertyGroupResource added in v0.3.0

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

PropertyGroupResource defines the resource implementation.

func (*PropertyGroupResource) Configure added in v0.3.0

func (*PropertyGroupResource) Create added in v0.3.0

func (*PropertyGroupResource) Delete added in v0.3.0

func (*PropertyGroupResource) ImportState added in v0.3.0

func (*PropertyGroupResource) Metadata added in v0.3.0

func (*PropertyGroupResource) Read added in v0.3.0

func (*PropertyGroupResource) Schema added in v0.3.0

func (*PropertyGroupResource) Update added in v0.3.0

type PropertyModel added in v0.2.3

type PropertyModel struct {
	Name             types.String `tfsdk:"name"`
	Title            types.String `tfsdk:"title"`
	Description      types.String `tfsdk:"description"`
	Type             types.String `tfsdk:"type"`
	Default          types.String `tfsdk:"default"`
	Encrypted        types.Bool   `tfsdk:"encrypted"`
	ReadOnly         types.Bool   `tfsdk:"read_only"`
	RecreateOnUpdate types.Bool   `tfsdk:"recreate_on_update"`

	// Specifications
	Minimum   types.Int64          `tfsdk:"minimum"`
	Maximum   types.Int64          `tfsdk:"maximum"`
	MinLength types.Int32          `tfsdk:"min_length"`
	MaxLength types.Int32          `tfsdk:"max_length"`
	Pattern   types.String         `tfsdk:"pattern"`
	OneOf     []PropertyOneOfModel `tfsdk:"one_of"`
}

CustomResourcPropertyeModel describes the resource data model.

func (*PropertyModel) FromAPI added in v0.2.3

func (self *PropertyModel) FromAPI(
	ctx context.Context,
	name string,
	raw PropertyAPIModel,
) diag.Diagnostics

func (PropertyModel) String added in v0.4.0

func (self PropertyModel) String() string

func (PropertyModel) ToAPI added in v0.2.3

type PropertyOneOfAPIModel added in v0.2.3

type PropertyOneOfAPIModel struct {
	Const     string `json:"const"`
	Title     string `json:"title"`
	Encrypted bool   `json:"encrypted"`
}

PropertyOneOfAPIModel describes the resource API model.

type PropertyOneOfModel added in v0.2.3

type PropertyOneOfModel struct {
	Const     types.String `tfsdk:"const"`
	Title     types.String `tfsdk:"title"`
	Encrypted types.Bool   `tfsdk:"encrypted"`
}

PropertyOneOfModel describes the resource data model.

func (*PropertyOneOfModel) FromAPI added in v0.2.3

func (PropertyOneOfModel) ToAPI added in v0.2.3

type ResourceActionAPIModel added in v0.2.3

type ResourceActionAPIModel struct {
	Id           string                         `json:"id,omitempty"`
	Name         string                         `json:"name"`
	DisplayName  string                         `json:"displayName"`
	Description  string                         `json:"description"`
	ProviderName string                         `json:"providerName"`
	ResourceType string                         `json:"resourceType"`
	RunnableItem ResourceActionRunnableAPIModel `json:"runnableItem"`
	Criteria     map[string]interface{}         `json:"criteria,omitempty"`
	Status       string                         `json:"status"`

	FormDefinition *CustomFormAPIModel `json:"formDefinition,omitempty"`

	ProjectId string `json:"projectId,omitempty"`
	OrgId     string `json:"orgId,omitempty"`
}

ResourceActionAPIModel describes the resource API model.

type ResourceActionModel added in v0.2.3

type ResourceActionModel struct {
	Id           types.String                `tfsdk:"id"`
	Name         types.String                `tfsdk:"name"`
	DisplayName  types.String                `tfsdk:"display_name"`
	Description  types.String                `tfsdk:"description"`
	ProviderName types.String                `tfsdk:"provider_name"`
	ResourceType types.String                `tfsdk:"resource_type"`
	RunnableItem ResourceActionRunnableModel `tfsdk:"runnable_item"`
	Criteria     types.String                `tfsdk:"criteria"`
	Status       types.String                `tfsdk:"status"`

	// Of type CustomFormModel
	FormDefinition types.Object `tfsdk:"form_definition"`

	ProjectId types.String `tfsdk:"project_id"`
	OrgId     types.String `tfsdk:"org_id"`
}

ResourceActionModel describes the resource data model.

func (*ResourceActionModel) FromAPI added in v0.2.3

func (ResourceActionModel) String added in v0.2.3

func (self ResourceActionModel) String() string

func (ResourceActionModel) ToAPI added in v0.2.3

type ResourceActionResource added in v0.2.3

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

ResourceActionResource defines the resource implementation.

func (*ResourceActionResource) Configure added in v0.2.3

func (*ResourceActionResource) Create added in v0.2.3

func (*ResourceActionResource) Delete added in v0.2.3

func (*ResourceActionResource) ImportState added in v0.2.3

func (*ResourceActionResource) Metadata added in v0.2.3

func (*ResourceActionResource) Read added in v0.2.3

func (*ResourceActionResource) Schema added in v0.2.3

func (*ResourceActionResource) Update added in v0.2.3

type ResourceActionRunnableAPIModel added in v0.2.3

type ResourceActionRunnableAPIModel struct {
	Id               string                    `json:"id,omitempty"`
	Name             string                    `json:"name"`
	Type             string                    `json:"type"`
	ProjectId        string                    `json:"projectId"`
	InputParameters  []ActionParameterAPIModel `json:"inputParameters"`
	OutputParameters []ActionParameterAPIModel `json:"outputParameters"`
}

ResourceActionRunnableAPIModel describes the resource API model.

type ResourceActionRunnableModel added in v0.2.3

type ResourceActionRunnableModel struct {
	Id               types.String           `tfsdk:"id"`
	Name             types.String           `tfsdk:"name"`
	Type             types.String           `tfsdk:"type"`
	ProjectId        types.String           `tfsdk:"project_id"`
	InputParameters  []ActionParameterModel `tfsdk:"input_parameters"`
	OutputParameters []ActionParameterModel `tfsdk:"output_parameters"`
}

ResourceActionRunnableModel describes the resource data model.

func (*ResourceActionRunnableModel) FromAPI added in v0.2.3

func (ResourceActionRunnableModel) ToAPI added in v0.2.3

type SecretAPIModel added in v0.2.2

type SecretAPIModel struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name"`
	// Value
	Description string   `json:"description"`
	OrgId       string   `json:"orgId"`
	OrgScoped   bool     `json:"orgScoped"`
	ProjectIds  []string `json:"projectIds"`
	CreatedAt   string   `json:"createdAt"`
	CreatedBy   string   `json:"createdBy"`
	UpdatedAt   string   `json:"updatedAt"`
	UpdatedBy   string   `json:"updatedBy"`
}

SecretAPIModel describes the secret API model.

type SecretDataSource added in v0.2.2

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

SecretDataSource defines the data source implementation.

func (*SecretDataSource) Configure added in v0.2.2

func (*SecretDataSource) Metadata added in v0.2.2

func (*SecretDataSource) Read added in v0.2.2

func (*SecretDataSource) Schema added in v0.2.2

type SecretModel added in v0.2.2

type SecretModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
	// Value
	Description types.String `tfsdk:"description"`
	OrgId       types.String `tfsdk:"org_id"`
	OrgScoped   types.Bool   `tfsdk:"org_scoped"`
	ProjectIds  types.Set    `tfsdk:"project_ids"`
	CreatedAt   types.String `tfsdk:"created_at"`
	CreatedBy   types.String `tfsdk:"created_by"`
	UpdatedAt   types.String `tfsdk:"updated_at"`
	UpdatedBy   types.String `tfsdk:"updated_by"`
}

SecretModel describes the secret model.

func (*SecretModel) FromAPI added in v0.2.2

func (self *SecretModel) FromAPI(
	ctx context.Context,
	raw SecretAPIModel,
) diag.Diagnostics

type SubscriptionAPIModel added in v0.1.1

type SubscriptionAPIModel struct {
	Id                  string `json:"id,omitempty"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	Type                string `json:"type"`
	RunnableType        string `json:"runnableType"`
	RunnableId          string `json:"runnableId"`
	RecoverRunnableType string `json:"recoverRunnableType"`
	RecoverRunnableId   string `json:"recoverRunnableId"`
	EventTopicId        string `json:"eventTopicId"`

	Constraints map[string][]string `json:"constraints"`

	Blocking   bool   `json:"blocking"`
	Broadcast  bool   `json:"broadcast"`
	Contextual bool   `json:"contextual"`
	Criteria   string `json:"criteria"`
	Disabled   bool   `json:"disabled"`
	Priority   int64  `json:"priority"`
	System     bool   `json:"system"`
	Timeout    int64  `json:"timeout"`

	OrgId        string `json:"orgId"`
	OwnerId      string `json:"ownerId"`
	SubscriberId string `json:"subscriberId"`
}

SubscriptionAPIModel describes the resource API model.

type SubscriptionModel added in v0.1.1

type SubscriptionModel struct {
	Id                  types.String `tfsdk:"id"`
	Name                types.String `tfsdk:"name"`
	Description         types.String `tfsdk:"description"`
	Type                types.String `tfsdk:"type"`
	RunnableType        types.String `tfsdk:"runnable_type"`
	RunnableId          types.String `tfsdk:"runnable_id"`
	RecoverRunnableType types.String `tfsdk:"recover_runnable_type"`
	RecoverRunnableId   types.String `tfsdk:"recover_runnable_id"`
	EventTopicId        types.String `tfsdk:"event_topic_id"`

	ProjectIds types.Set `tfsdk:"project_ids"`

	Blocking   types.Bool   `tfsdk:"blocking"`
	Broadcast  types.Bool   `tfsdk:"broadcast"`
	Contextual types.Bool   `tfsdk:"contextual"`
	Criteria   types.String `tfsdk:"criteria"`
	Disabled   types.Bool   `tfsdk:"disabled"`
	Priority   types.Int64  `tfsdk:"priority"`
	System     types.Bool   `tfsdk:"system"`
	Timeout    types.Int64  `tfsdk:"timeout"`

	OrgId        types.String `tfsdk:"org_id"`
	OwnerId      types.String `tfsdk:"owner_id"`
	SubscriberId types.String `tfsdk:"subscriber_id"`
}

SubscriptionModel describes the resource data model.

func (*SubscriptionModel) FromAPI added in v0.1.1

func (*SubscriptionModel) GenerateId added in v0.1.1

func (self *SubscriptionModel) GenerateId()

func (SubscriptionModel) String added in v0.2.3

func (self SubscriptionModel) String() string

func (SubscriptionModel) ToAPI added in v0.1.1

type SubscriptionResource added in v0.1.1

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

SubscriptionResource defines the resource implementation.

func (*SubscriptionResource) Configure added in v0.1.1

func (*SubscriptionResource) Create added in v0.1.1

func (*SubscriptionResource) Delete added in v0.1.1

func (*SubscriptionResource) ImportState added in v0.1.1

func (*SubscriptionResource) Metadata added in v0.1.1

func (*SubscriptionResource) Read added in v0.1.1

func (*SubscriptionResource) Schema added in v0.1.1

func (*SubscriptionResource) Update added in v0.1.1

type UnorderedPropertiesAPIModel added in v0.4.0

type UnorderedPropertiesAPIModel map[string]PropertyAPIModel

UnorderedPropertiesAPIModel describes the resource API model.

type UnorderedPropertiesModel added in v0.4.0

type UnorderedPropertiesModel map[string]PropertyModel

UnorderedPropertiesModel describes the resource data model.

func (*UnorderedPropertiesModel) FromAPI added in v0.4.0

func (UnorderedPropertiesModel) ToAPI added in v0.4.0

Jump to

Keyboard shortcuts

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