Documentation
¶
Index ¶
- func ConvertStringPtrMapToTerraform(p map[string]*string) basetypes.MapValue
- func CreateDriftMessage(tkn string) string
- func IsDriftMessage(v string) bool
- func WrappedAzKeyVaultObjectConfidentialMaterialModelSchema(oreAttrs map[string]resourceSchema.Attribute) map[string]resourceSchema.Attribute
- func WrappedConfidentialMaterialModelDatasourceSchema(moreAttrs map[string]datasourceSchema.Attribute) map[string]datasourceSchema.Attribute
- func WrappedConfidentialMaterialModelSchema(moreAttrs map[string]resourceSchema.Attribute, requireReplace bool) map[string]resourceSchema.Attribute
- type APIObjectToStateImporter
- type AttributeTyped
- type CommonConfidentialResource
- type CommonConfidentialResourceSpecialization
- type ConfidentialDatasourceBase
- type ConfidentialGenericResource
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) CreateT(ctx context.Context, req RequestAbstraction, resp ResponseAbstraction)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) ReadT(ctx context.Context, req RequestAbstraction, resp ResponseAbstraction)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ConfidentialMaterialLocator
- type ConfidentialMaterialModel
- type ConfidentialResourceBase
- type Exportable
- type FunctionTemplate
- func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Definition(_ context.Context, _ function.DefinitionRequest, ...)
- func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Metadata(_ context.Context, _ function.MetadataRequest, resp *function.MetadataResponse)
- func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse)
- type IdAssigner
- type ImmutableConfidentialResourceRU
- type LimitedCreateProtectionParam
- type MutableConfidentialResourceRU
- type ProtectionParameterized
- type ProtectionParams
- type PublicKeyValidator
- type RequestAbstraction
- type ResourceExistenceCheck
- type ResourceProtectionParams
- type ResponseAbstraction
- type WrappedAzKeyVaultObjectConfidentialMaterialModel
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzBool(p *bool, into *basetypes.BoolValue)
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzMap(p map[string]*string, into *basetypes.MapValue)
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzString(p *string, into *basetypes.StringValue)
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) NotAfterDateAtPtr() *time.Time
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) NotBeforeDateAtPtr() *time.Time
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) StringTypeAsPtr(tfVal *types.String) *string
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsPtr() map[string]*string
- func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsStr() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStringPtrMapToTerraform ¶ added in v0.9.2
TODO replcae with the implemetnation in core
func CreateDriftMessage ¶ added in v0.10.0
func IsDriftMessage ¶ added in v0.10.0
func WrappedAzKeyVaultObjectConfidentialMaterialModelSchema ¶
func WrappedAzKeyVaultObjectConfidentialMaterialModelSchema(oreAttrs map[string]resourceSchema.Attribute) map[string]resourceSchema.Attribute
func WrappedConfidentialMaterialModelDatasourceSchema ¶
func WrappedConfidentialMaterialModelDatasourceSchema(moreAttrs map[string]datasourceSchema.Attribute) map[string]datasourceSchema.Attribute
func WrappedConfidentialMaterialModelSchema ¶
func WrappedConfidentialMaterialModelSchema(moreAttrs map[string]resourceSchema.Attribute, requireReplace bool) map[string]resourceSchema.Attribute
Types ¶
type APIObjectToStateImporter ¶ added in v0.10.0
type APIObjectToStateImporter[TMdl, AZAPIObject any] func(azObj AZAPIObject, tfModel *TMdl)
APIObjectToStateImporter an API object into the state
type AttributeTyped ¶ added in v0.10.0
type CommonConfidentialResource ¶
type CommonConfidentialResource struct {
Factory core.AZClientsFactory
}
CommonConfidentialResource common methods for all confidential resources
func (*CommonConfidentialResource) CheckCiphertextCreateExpiry ¶ added in v0.10.0
func (d *CommonConfidentialResource) CheckCiphertextCreateExpiry(ctx context.Context, header core.ConfidentialDataJsonHeader, dg *diag.Diagnostics)
func (*CommonConfidentialResource) CheckCiphertextExpiry ¶ added in v0.10.0
func (d *CommonConfidentialResource) CheckCiphertextExpiry(ctx context.Context, header core.ConfidentialDataJsonHeader, dg *diag.Diagnostics)
type CommonConfidentialResourceSpecialization ¶ added in v0.10.0
type CommonConfidentialResourceSpecialization[TMdl any, TConfData any, AZAPIObject any] interface { SetFactory(factory core.AZClientsFactory) NewTerraformModel() TMdl ConvertToTerraform(ctx context.Context, azObj AZAPIObject, tfModel *TMdl) diag.Diagnostics GetConfidentialMaterialFrom(mdl TMdl) ConfidentialMaterialModel Decrypt(ctx context.Context, em core.EncryptedMessage, decr core.RSADecrypter) (core.ConfidentialDataJsonHeader, TConfData, error) CheckPlacement(ctx context.Context, providerConstraints []core.ProviderConstraint, placementConstraints []core.PlacementConstraint, tfModel *TMdl) diag.Diagnostics DoCreate(ctx context.Context, planData *TMdl, plainData TConfData) (AZAPIObject, diag.Diagnostics) DoDelete(ctx context.Context, planData *TMdl) diag.Diagnostics }
type ConfidentialDatasourceBase ¶
type ConfidentialDatasourceBase struct {
CommonConfidentialResource
}
func (*ConfidentialDatasourceBase) Configure ¶
func (d *ConfidentialDatasourceBase) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
type ConfidentialGenericResource ¶ added in v0.10.0
type ConfidentialGenericResource[TMdl, TIdentity any, TConfData any, AZAPIObject any] struct { ConfidentialResourceBase Specializer CommonConfidentialResourceSpecialization[TMdl, TConfData, AZAPIObject] ImmutableRU ImmutableConfidentialResourceRU[TMdl, TConfData, AZAPIObject] MutableRU MutableConfidentialResourceRU[TMdl, TConfData, AZAPIObject] ResourceName string ResourceSchema schema.Schema }
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Configure ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Create ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) CreateT ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) CreateT(ctx context.Context, req RequestAbstraction, resp ResponseAbstraction)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Delete ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Metadata ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Read ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) ReadT ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) ReadT(ctx context.Context, req RequestAbstraction, resp ResponseAbstraction)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Schema ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Update ¶ added in v0.10.0
func (d *ConfidentialGenericResource[TMdl, TIdentity, TConfData, AZAPIObject]) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ConfidentialMaterialLocator ¶ added in v0.10.0
type ConfidentialMaterialLocator[TMdl any] func(mdl TMdl) ConfidentialMaterialModel
type ConfidentialMaterialModel ¶
type ConfidentialMaterialModel struct { Id types.String `tfsdk:"id"` WrappingKeyCoordinate *core.WrappingKeyCoordinateModel `tfsdk:"wrapping_key"` EncryptedSecret types.String `tfsdk:"content"` }
func (*ConfidentialMaterialModel) GetDestinationCoordinateFromId ¶
func (wcmm *ConfidentialMaterialModel) GetDestinationCoordinateFromId() (core.AzKeyVaultObjectVersionedCoordinate, error)
TODO: This method must be attached elsewhere in the inheritence hierarcy; as it is meansingful only with the Az Key Vault objects.
func (*ConfidentialMaterialModel) SetContainsValues ¶ added in v0.10.0
func (wcmmm *ConfidentialMaterialModel) SetContainsValues(s *types.Set) bool
type ConfidentialResourceBase ¶
type ConfidentialResourceBase struct {
CommonConfidentialResource
}
func (*ConfidentialResourceBase) Configure ¶
func (d *ConfidentialResourceBase) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
type Exportable ¶ added in v0.10.0
type Exportable interface {
Into(ctx context.Context, c *core.SecondaryProtectionParameters) error
}
type FunctionTemplate ¶ added in v0.10.0
type FunctionTemplate[TMdl any, TProtection ProtectionParameterized, DestMdl any] struct { Name string Summary string MarkdownDescription string DataParameter function.Parameter ProtectionParameterSupplier core.Supplier[TProtection] DestinationParameter function.Parameter DestinationParameterMarkdownDescription string ConfidentialModelSupplier core.Supplier[TMdl] DestinationModelSupplier core.Supplier[*DestMdl] CreatEncryptedMessage func(confidentialModel TMdl, dest *DestMdl, md core.SecondaryProtectionParameters, pubKey *rsa.PublicKey) (core.EncryptedMessage, error) }
func (*FunctionTemplate[TMdl, TProtection, DestMdl]) Definition ¶ added in v0.10.0
func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Definition(_ context.Context, _ function.DefinitionRequest, resp *function.DefinitionResponse)
func (*FunctionTemplate[TMdl, TProtection, DestMdl]) Metadata ¶ added in v0.10.0
func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Metadata(_ context.Context, _ function.MetadataRequest, resp *function.MetadataResponse)
func (*FunctionTemplate[TMdl, TProtection, DestMdl]) Run ¶ added in v0.10.0
func (f *FunctionTemplate[TMdl, TProtection, DestMdl]) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse)
type IdAssigner ¶ added in v0.10.0
type IdAssigner[TMdl, AZAPIObject any] func(azObj AZAPIObject, tfModel *TMdl)
type ImmutableConfidentialResourceRU ¶ added in v0.10.0
type ImmutableConfidentialResourceRU[TMdl any, TConfData any, AZAPIObject any] interface { DoRead(ctx context.Context, planData *TMdl) (AZAPIObject, ResourceExistenceCheck, diag.Diagnostics) DoUpdate(ctx context.Context, planData *TMdl) (AZAPIObject, diag.Diagnostics) }
type LimitedCreateProtectionParam ¶ added in v0.10.0
func (LimitedCreateProtectionParam) GetAttributeTypes ¶ added in v0.10.0
func (p LimitedCreateProtectionParam) GetAttributeTypes() map[string]attr.Type
func (LimitedCreateProtectionParam) Into ¶ added in v0.10.0
func (p LimitedCreateProtectionParam) Into(c *core.SecondaryProtectionParameters) error
type MutableConfidentialResourceRU ¶ added in v0.10.0
type MutableConfidentialResourceRU[TMdl any, TConfData any, AZAPIObject any] interface { DoRead(ctx context.Context, planData *TMdl, lainData TConfData) (AZAPIObject, ResourceExistenceCheck, diag.Diagnostics) DoUpdate(ctx context.Context, planData *TMdl, lainData TConfData) (AZAPIObject, diag.Diagnostics) // SetDriftToConfidentialData changes the confidential data on the plan to trigger the // update. SetDriftToConfidentialData(ctx context.Context, planData *TMdl) }
type ProtectionParameterized ¶ added in v0.10.0
type ProtectionParameterized interface { AttributeTyped Exportable }
type ProtectionParams ¶ added in v0.10.0
type ProtectionParams struct { ExpiresAfterDays types.Int32 `tfsdk:"expires_after"` NumUses types.Int32 `tfsdk:"num_uses"` ProviderConstraints types.Set `tfsdk:"provider_constraints"` }
func (ProtectionParams) GetAttributeTypes ¶ added in v0.10.0
func (p ProtectionParams) GetAttributeTypes() map[string]attr.Type
func (ProtectionParams) GetMarkdownDescription ¶ added in v0.10.0
func (p ProtectionParams) GetMarkdownDescription() string
func (ProtectionParams) Into ¶ added in v0.10.0
func (p ProtectionParams) Into(ctx context.Context, c *core.SecondaryProtectionParameters) error
type PublicKeyValidator ¶ added in v0.10.0
type PublicKeyValidator struct{}
func (*PublicKeyValidator) ValidateParameterString ¶ added in v0.10.0
func (pkv *PublicKeyValidator) ValidateParameterString(_ context.Context, req function.StringParameterValidatorRequest, res *function.StringParameterValidatorResponse)
type RequestAbstraction ¶ added in v0.10.0
type RequestAbstraction struct { Get func(ctx context.Context, val interface{}) diag.Diagnostics HasError func() bool }
type ResourceExistenceCheck ¶ added in v0.10.0
type ResourceExistenceCheck int
const ( ResourceCheckNotAttempted ResourceExistenceCheck = iota ResourceExists ResourceNotFound ResourceNotYetCreated ResourceCheckError ResourceConfidentialDataDrift )
func (ResourceExistenceCheck) String ¶ added in v0.10.0
func (t ResourceExistenceCheck) String() string
type ResourceProtectionParams ¶ added in v0.10.0
type ResourceProtectionParams struct { ProtectionParams LimitedCreateProtectionParam }
func (ResourceProtectionParams) GetAttributeTypes ¶ added in v0.10.0
func (p ResourceProtectionParams) GetAttributeTypes() map[string]attr.Type
func (ResourceProtectionParams) GetMarkdownDescription ¶ added in v0.10.0
func (p ResourceProtectionParams) GetMarkdownDescription() string
func (ResourceProtectionParams) Into ¶ added in v0.10.0
func (p ResourceProtectionParams) Into(ctx context.Context, c *core.SecondaryProtectionParameters) error
type ResponseAbstraction ¶ added in v0.10.0
type ResponseAbstraction struct { Set func(ctx context.Context, val interface{}) diag.Diagnostics RemoveResource func(context.Context) Diagnostics *diag.Diagnostics }
type WrappedAzKeyVaultObjectConfidentialMaterialModel ¶
type WrappedAzKeyVaultObjectConfidentialMaterialModel struct { ConfidentialMaterialModel Tags types.Map `tfsdk:"tags"` NotBefore types.String `tfsdk:"not_before_date"` NotAfter types.String `tfsdk:"not_after_date"` Enabled types.Bool `tfsdk:"enabled"` }
WrappedAzKeyVaultObjectConfidentialMaterialModel a model for the Azure KeyVault object. It includes wrapped confidential data and repeated elements (not-before, not-after, tags, and enabled)
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzBool ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzBool(p *bool, into *basetypes.BoolValue)
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzMap ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzMap(p map[string]*string, into *basetypes.MapValue)
TODO replace with the implementation in core
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzString ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) ConvertAzString(p *string, into *basetypes.StringValue)
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) NotAfterDateAtPtr ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) NotAfterDateAtPtr() *time.Time
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) NotBeforeDateAtPtr ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) NotBeforeDateAtPtr() *time.Time
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) StringTypeAsPtr ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) StringTypeAsPtr(tfVal *types.String) *string
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsPtr ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsPtr() map[string]*string
func (*WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsStr ¶
func (cm *WrappedAzKeyVaultObjectConfidentialMaterialModel) TagsAsStr() map[string]string
Click to show internal directories.
Click to hide internal directories.