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
- type AuthorizedEndEntityProfilesDataSource
- func (d *AuthorizedEndEntityProfilesDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *AuthorizedEndEntityProfilesDataSource) Metadata(_ 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(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *CaPemDataSource) Metadata(_ 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 CertAuthProviderModel
- type CertificateContext
- func (c *CertificateContext) ComposeStateFromCertificateResponse(certificate *ejbca.CertificateRestResponse, state *CertificateResourceModel) diag.Diagnostics
- func (c *CertificateContext) DownloadCAChain(issuerDN string) ([]*x509.Certificate, diag.Diagnostics)
- func (c *CertificateContext) EnrollPkcs10Certificate(state *CertificateResourceModel) diag.Diagnostics
- func (c *CertificateContext) IsCertificateRevoked(issuerDN string, serialNumber string) (bool, diag.Diagnostics)
- func (c *CertificateContext) ReadCertificate(state *CertificateResourceModel) 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) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r *CertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *CertificateResource) Schema(ctx context.Context, _ 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(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *EndEntityProfileDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *EndEntityProfileDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *EndEntityProfileDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- 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 OAuthProviderModel
- type Provider
- func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *Provider) DataSources(context.Context) []func() datasource.DataSource
- func (p *Provider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
- func (p *Provider) Resources(context.Context) []func() resource.Resource
- func (p *Provider) Schema(_ context.Context, _ 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 ¶
Types ¶
type AuthorizedEndEntityProfilesDataSource ¶
type AuthorizedEndEntityProfilesDataSource struct {
// contains filtered or unexported fields
}
AuthorizedEndEntityProfilesDataSource defines the data source implementation.
func (*AuthorizedEndEntityProfilesDataSource) Configure ¶
func (d *AuthorizedEndEntityProfilesDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*AuthorizedEndEntityProfilesDataSource) Metadata ¶
func (d *AuthorizedEndEntityProfilesDataSource) Metadata(_ 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(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*CaPemDataSource) Metadata ¶
func (d *CaPemDataSource) Metadata(_ 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 CertAuthProviderModel ¶ added in v1.1.0
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) DownloadCAChain ¶ added in v1.1.0
func (c *CertificateContext) DownloadCAChain(issuerDN string) ([]*x509.Certificate, diag.Diagnostics)
func (*CertificateContext) EnrollPkcs10Certificate ¶
func (c *CertificateContext) EnrollPkcs10Certificate(state *CertificateResourceModel) diag.Diagnostics
func (*CertificateContext) IsCertificateRevoked ¶ added in v1.1.0
func (c *CertificateContext) IsCertificateRevoked(issuerDN string, serialNumber string) (bool, diag.Diagnostics)
func (*CertificateContext) ReadCertificate ¶ added in v1.1.0
func (c *CertificateContext) ReadCertificate(state *CertificateResourceModel) 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) ModifyPlan ¶ added in v1.1.0
func (r *CertificateResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
ModifyPlan determines if the certificate resource needs to be replaced. The two cases where this is true are:
- The certificate is expired (-early_renewal_hours)
- The certificate is revoked
func (*CertificateResource) Read ¶
func (r *CertificateResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*CertificateResource) Schema ¶
func (r *CertificateResource) Schema(ctx context.Context, _ 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"` Certificate types.String `tfsdk:"certificate"` Chain types.String `tfsdk:"chain"` IssuerDn types.String `tfsdk:"issuer_dn"` AccountBindingID types.String `tfsdk:"account_binding_id"` ValidityEndTime types.String `tfsdk:"validity_end_time"` ValidityStartTime types.String `tfsdk:"validity_start_time"` EarlyRenewalHours types.Int64 `tfsdk:"early_renewal_hours"` ReadyForRenewal types.Bool `tfsdk:"ready_for_renewal"` IsRevoked types.Bool `tfsdk:"is_revoked"` }
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(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*EndEntityProfileDataSource) Metadata ¶
func (d *EndEntityProfileDataSource) Metadata(_ 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(_ context.Context, _ 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 OAuthProviderModel ¶ added in v1.1.0
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(context.Context) []func() datasource.DataSource
func (*Provider) Metadata ¶
func (p *Provider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse)
func (*Provider) Schema ¶
func (p *Provider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse)