Documentation ¶
Index ¶
- func New(version string) func() provider.Provider
- func NewAuthorizedEndEntityProfilesDataSource() datasource.DataSource
- func NewCaPemDataSource() datasource.DataSource
- func NewCertificateResource() resource.Resource
- func NewEndEntityProfileDataSource() datasource.DataSource
- func NewEndEntityResource() resource.Resource
- func NewKeystoreResource() resource.Resource
- type AuthorizedEndEntityProfilesDataSource
- func (d *AuthorizedEndEntityProfilesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *AuthorizedEndEntityProfilesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *AuthorizedEndEntityProfilesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *AuthorizedEndEntityProfilesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type AuthorizedEndEntityProfilesDataSourceModel
- type CaPemDataSource
- func (d *CaPemDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *CaPemDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *CaPemDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *CaPemDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type CaPemDataSourceModel
- type CertificateContext
- func (c *CertificateContext) ComposeStateFromCertificateResponse(certificate *ejbca.CertificateRestResponse, state *CertificateResourceModel) diag.Diagnostics
- func (c *CertificateContext) ComposeStateFromKeystoreResponse(certificate *ejbca.CertificateRestResponse, state *KeystoreResourceModel) diag.Diagnostics
- func (c *CertificateContext) DownloadCaChain(issuerDn string) ([]*x509.Certificate, error)
- func (c *CertificateContext) EnrollKeystore(state *KeystoreResourceModel) diag.Diagnostics
- func (c *CertificateContext) EnrollPkcs10Certificate(state *CertificateResourceModel) diag.Diagnostics
- func (c *CertificateContext) ReadCertificateContext(state *CertificateResourceModel) diag.Diagnostics
- func (c *CertificateContext) ReadKeystoreContext(state *KeystoreResourceModel) diag.Diagnostics
- func (c *CertificateContext) RevokeCertificate(issuerDn string, certificateSerialNumber string) diag.Diagnostics
- type CertificateResource
- func (r *CertificateResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *CertificateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *CertificateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *CertificateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *CertificateResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *CertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *CertificateResource) Schema(_ context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *CertificateResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
- type CertificateResourceModel
- type EndEntityContext
- func (c *EndEntityContext) CreateEndEntity(state *EndEntityResourceModel) diag.Diagnostics
- func (c *EndEntityContext) DeleteEndEntity(state *EndEntityResourceModel) diag.Diagnostics
- func (c *EndEntityContext) ReadEndEntityContext(state *EndEntityResourceModel) diag.Diagnostics
- func (c *EndEntityContext) UpdateEndEntityStatus(state *EndEntityResourceModel) diag.Diagnostics
- type EndEntityProfileDataSource
- func (d *EndEntityProfileDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *EndEntityProfileDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *EndEntityProfileDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *EndEntityProfileDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type EndEntityProfileDataSourceModel
- type EndEntityResource
- func (r *EndEntityResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *EndEntityResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *EndEntityResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *EndEntityResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *EndEntityResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *EndEntityResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *EndEntityResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *EndEntityResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
- type EndEntityResourceModel
- type KeystoreResource
- func (r *KeystoreResource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *KeystoreResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *KeystoreResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *KeystoreResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *KeystoreResource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *KeystoreResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *KeystoreResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *KeystoreResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
- type KeystoreResourceModel
- type Provider
- func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *Provider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *Provider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *Provider) Resources(ctx context.Context) []func() resource.Resource
- func (p *Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type ProviderModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthorizedEndEntityProfilesDataSource ¶
func NewAuthorizedEndEntityProfilesDataSource() datasource.DataSource
func NewCaPemDataSource ¶
func NewCaPemDataSource() datasource.DataSource
func NewCertificateResource ¶
func NewEndEntityProfileDataSource ¶
func NewEndEntityProfileDataSource() datasource.DataSource
func NewEndEntityResource ¶
func NewKeystoreResource ¶
Types ¶
type AuthorizedEndEntityProfilesDataSource ¶
type AuthorizedEndEntityProfilesDataSource struct {
// contains filtered or unexported fields
}
AuthorizedEndEntityProfilesDataSource defines the data source implementation.
func (*AuthorizedEndEntityProfilesDataSource) Configure ¶
func (d *AuthorizedEndEntityProfilesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*AuthorizedEndEntityProfilesDataSource) Metadata ¶
func (d *AuthorizedEndEntityProfilesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*AuthorizedEndEntityProfilesDataSource) Read ¶
func (d *AuthorizedEndEntityProfilesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*AuthorizedEndEntityProfilesDataSource) Schema ¶
func (d *AuthorizedEndEntityProfilesDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
type AuthorizedEndEntityProfilesDataSourceModel ¶
type AuthorizedEndEntityProfilesDataSourceModel struct { AuthorizedEndEntityProfiles types.Set `tfsdk:"authorized_end_entity_profiles"` Id types.Int64 `tfsdk:"id"` }
AuthorizedEndEntityProfilesDataSourceModel describes the data source data model.
type CaPemDataSource ¶
type CaPemDataSource struct {
// contains filtered or unexported fields
}
CaPemDataSource defines the data source implementation.
func (*CaPemDataSource) Configure ¶
func (d *CaPemDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*CaPemDataSource) Metadata ¶
func (d *CaPemDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*CaPemDataSource) Read ¶
func (d *CaPemDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*CaPemDataSource) Schema ¶
func (d *CaPemDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
type CaPemDataSourceModel ¶
type CertificateContext ¶
type CertificateContext struct {
// contains filtered or unexported fields
}
func CreateCertificateContext ¶
func CreateCertificateContext(ctx context.Context, client *ejbca.APIClient) *CertificateContext
func (*CertificateContext) ComposeStateFromCertificateResponse ¶
func (c *CertificateContext) ComposeStateFromCertificateResponse(certificate *ejbca.CertificateRestResponse, state *CertificateResourceModel) diag.Diagnostics
ComposeStateFromCertificateResponse extracts the certificate from an EJBCA CertificateRestResponse, encodes it to PEM format if necessary, and either extracts or downloads the certificate chain.
func (*CertificateContext) ComposeStateFromKeystoreResponse ¶
func (c *CertificateContext) ComposeStateFromKeystoreResponse(certificate *ejbca.CertificateRestResponse, state *KeystoreResourceModel) diag.Diagnostics
func (*CertificateContext) DownloadCaChain ¶
func (c *CertificateContext) DownloadCaChain(issuerDn string) ([]*x509.Certificate, error)
func (*CertificateContext) EnrollKeystore ¶
func (c *CertificateContext) EnrollKeystore(state *KeystoreResourceModel) diag.Diagnostics
func (*CertificateContext) EnrollPkcs10Certificate ¶
func (c *CertificateContext) EnrollPkcs10Certificate(state *CertificateResourceModel) diag.Diagnostics
func (*CertificateContext) ReadCertificateContext ¶
func (c *CertificateContext) ReadCertificateContext(state *CertificateResourceModel) diag.Diagnostics
func (*CertificateContext) ReadKeystoreContext ¶
func (c *CertificateContext) ReadKeystoreContext(state *KeystoreResourceModel) diag.Diagnostics
func (*CertificateContext) RevokeCertificate ¶
func (c *CertificateContext) RevokeCertificate(issuerDn string, certificateSerialNumber string) diag.Diagnostics
type CertificateResource ¶
type CertificateResource struct {
// contains filtered or unexported fields
}
CertificateResource defines the resource implementation.
func (*CertificateResource) Configure ¶
func (r *CertificateResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*CertificateResource) Create ¶
func (r *CertificateResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*CertificateResource) Delete ¶
func (r *CertificateResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*CertificateResource) ImportState ¶
func (r *CertificateResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*CertificateResource) Metadata ¶
func (r *CertificateResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*CertificateResource) Read ¶
func (r *CertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*CertificateResource) Schema ¶
func (r *CertificateResource) Schema(_ context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*CertificateResource) Update ¶
func (r *CertificateResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
type CertificateResourceModel ¶
type CertificateResourceModel struct { Id types.String `tfsdk:"id"` CertificateSigningRequest types.String `tfsdk:"certificate_signing_request"` CertificateProfileName types.String `tfsdk:"certificate_profile_name"` EndEntityProfileName types.String `tfsdk:"end_entity_profile_name"` CertificateAuthorityName types.String `tfsdk:"certificate_authority_name"` EndEntityName types.String `tfsdk:"end_entity_name"` EndEntityPassword types.String `tfsdk:"end_entity_password"` Certificate types.String `tfsdk:"certificate"` IssuerDn types.String `tfsdk:"issuer_dn"` }
CertificateResourceModel describes the resource data model.
type EndEntityContext ¶
type EndEntityContext struct {
// contains filtered or unexported fields
}
func CreateEndEntityContext ¶
func CreateEndEntityContext(ctx context.Context, client *ejbca.APIClient) *EndEntityContext
func (*EndEntityContext) CreateEndEntity ¶
func (c *EndEntityContext) CreateEndEntity(state *EndEntityResourceModel) diag.Diagnostics
func (*EndEntityContext) DeleteEndEntity ¶
func (c *EndEntityContext) DeleteEndEntity(state *EndEntityResourceModel) diag.Diagnostics
func (*EndEntityContext) ReadEndEntityContext ¶
func (c *EndEntityContext) ReadEndEntityContext(state *EndEntityResourceModel) diag.Diagnostics
func (*EndEntityContext) UpdateEndEntityStatus ¶
func (c *EndEntityContext) UpdateEndEntityStatus(state *EndEntityResourceModel) diag.Diagnostics
type EndEntityProfileDataSource ¶
type EndEntityProfileDataSource struct {
// contains filtered or unexported fields
}
EndEntityProfileDataSource defines the data source implementation.
func (*EndEntityProfileDataSource) Configure ¶
func (d *EndEntityProfileDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*EndEntityProfileDataSource) Metadata ¶
func (d *EndEntityProfileDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*EndEntityProfileDataSource) Read ¶
func (d *EndEntityProfileDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*EndEntityProfileDataSource) Schema ¶
func (d *EndEntityProfileDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type EndEntityProfileDataSourceModel ¶
type EndEntityProfileDataSourceModel struct { EndEntityProfileName types.String `tfsdk:"end_entity_profile_name"` SubjectDistinguishedNameFields types.Set `tfsdk:"subject_distinguished_name_fields"` SubjectAlternativeNameFields types.List `tfsdk:"subject_alternative_name_fields"` AvailableCertificateProfiles types.Set `tfsdk:"available_certificate_profiles"` AvailableCAs types.Set `tfsdk:"available_cas"` Id types.String `tfsdk:"id"` }
EndEntityProfileDataSourceModel describes the data source data model.
type EndEntityResource ¶
type EndEntityResource struct {
// contains filtered or unexported fields
}
EndEntityResource defines the resource implementation.
func (*EndEntityResource) Configure ¶
func (r *EndEntityResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*EndEntityResource) Create ¶
func (r *EndEntityResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*EndEntityResource) Delete ¶
func (r *EndEntityResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*EndEntityResource) ImportState ¶
func (r *EndEntityResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*EndEntityResource) Metadata ¶
func (r *EndEntityResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*EndEntityResource) Read ¶
func (r *EndEntityResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*EndEntityResource) Schema ¶
func (r *EndEntityResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*EndEntityResource) Update ¶
func (r *EndEntityResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
type EndEntityResourceModel ¶
type EndEntityResourceModel struct { Id types.String `tfsdk:"id"` EndEntityName types.String `tfsdk:"end_entity_name"` EndEntityPassword types.String `tfsdk:"end_entity_password"` // Not returned SubjectDn types.String `tfsdk:"subject_dn"` SubjectAltName types.String `tfsdk:"subject_alt_name"` Email types.String `tfsdk:"email"` CaName types.String `tfsdk:"ca_name"` // Not returned CertificateProfileName types.String `tfsdk:"certificate_profile_name"` // Not returned EndEntityProfileName types.String `tfsdk:"end_entity_profile_name"` // Not returned Token types.String `tfsdk:"token"` AccountBindingId types.String `tfsdk:"account_binding_id"` // Not returned Status types.String `tfsdk:"status"` }
type KeystoreResource ¶
type KeystoreResource struct {
// contains filtered or unexported fields
}
KeystoreResource defines the resource implementation.
func (*KeystoreResource) Configure ¶
func (r *KeystoreResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*KeystoreResource) Create ¶
func (r *KeystoreResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*KeystoreResource) Delete ¶
func (r *KeystoreResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*KeystoreResource) ImportState ¶
func (r *KeystoreResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*KeystoreResource) Metadata ¶
func (r *KeystoreResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*KeystoreResource) Read ¶
func (r *KeystoreResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*KeystoreResource) Schema ¶
func (r *KeystoreResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*KeystoreResource) Update ¶
func (r *KeystoreResource) Update(_ context.Context, _ resource.UpdateRequest, resp *resource.UpdateResponse)
type KeystoreResourceModel ¶
type KeystoreResourceModel struct { Id types.String `tfsdk:"id"` EndEntityName types.String `tfsdk:"end_entity_name"` EndEntityPassword types.String `tfsdk:"end_entity_password"` KeyAlg types.String `tfsdk:"key_alg"` KeySpec types.String `tfsdk:"key_spec"` Certificate types.String `tfsdk:"certificate"` Key types.String `tfsdk:"key"` IssuerDn types.String `tfsdk:"issuer_dn"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider defines the ejbca implementation.
func (*Provider) Configure ¶
func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*Provider) DataSources ¶
func (p *Provider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*Provider) Metadata ¶
func (p *Provider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*Provider) Schema ¶
func (p *Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)