Documentation ¶
Index ¶
- Constants
- func IsMachineNotFound(err error) bool
- func NewAccessModelResource() resource.Resource
- func NewAccessSecretResource() resource.Resource
- func NewApplicationResource() resource.Resource
- func NewCredentialResource() resource.Resource
- func NewIntegrationResource() resource.Resource
- func NewJAASAccessCloudResource() resource.Resource
- func NewJAASAccessControllerResource() resource.Resource
- func NewJAASAccessGroupResource() resource.Resource
- func NewJAASAccessModelResource() resource.Resource
- func NewJAASAccessOfferResource() resource.Resource
- func NewJAASAccessServiceAccountResource() resource.Resource
- func NewJAASGroupResource() resource.Resource
- func NewJujuProvider(version string) provider.Provider
- func NewKubernetesCloudResource() resource.Resource
- func NewMachineDataSource() datasource.DataSourceWithConfigure
- func NewMachineResource() resource.Resource
- func NewModelDataSource() datasource.DataSourceWithConfigure
- func NewModelResource() resource.Resource
- func NewOfferDataSource() datasource.DataSource
- func NewOfferResource() resource.Resource
- func NewSSHKeyResource() resource.Resource
- func NewSecretDataSource() datasource.DataSource
- func NewSecretResource() resource.Resource
- func NewUserResource() resource.Resource
- func ValidatorMatchString(isValid func(string) bool, message string) validator.String
- type AvoidJAASValidator
- func (v AvoidJAASValidator) Description(ctx context.Context) string
- func (v AvoidJAASValidator) MarkdownDescription(_ context.Context) string
- func (v AvoidJAASValidator) ValidateDataSource(ctx context.Context, req datasource.ValidateConfigRequest, ...)
- func (v AvoidJAASValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, ...)
- type Getter
- type RequiresJAASValidator
- func (v RequiresJAASValidator) Description(ctx context.Context) string
- func (v RequiresJAASValidator) MarkdownDescription(_ context.Context) string
- func (v RequiresJAASValidator) ValidateDataSource(ctx context.Context, req datasource.ValidateConfigRequest, ...)
- func (v RequiresJAASValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, ...)
- type Setter
- type StringIsChannelValidator
- type StringIsResourceKeyValidator
Constants ¶
const ( LogDataSourceMachine = "datasource-machine" LogDataSourceModel = "datasource-model" LogDataSourceOffer = "datasource-offer" LogDataSourceSecret = "datasource-secret" LogResourceApplication = "resource-application" LogResourceAccessModel = "resource-access-model" LogResourceCredential = "resource-credential" LogResourceKubernetesCloud = "resource-kubernetes-cloud" LogResourceMachine = "resource-machine" LogResourceModel = "resource-model" LogResourceOffer = "resource-offer" LogResourceSSHKey = "resource-sshkey" LogResourceUser = "resource-user" LogResourceSecret = "resource-secret" LogResourceAccessSecret = "resource-access-secret" LogResourceJAASAccessModel = "resource-jaas-access-model" LogResourceJAASAccessCloud = "resource-jaas-access-cloud" LogResourceJAASAccessGroup = "resource-jaas-access-group" LogResourceJAASAccessOffer = "resource-jaas-access-offer" LogResourceJAASAccessController = "resource-jaas-access-controller" LogResourceJAASAccessSvcAcc = "resource-jaas-access-service-account" LogResourceJAASGroup = "resource-jaas-group" )
model names for logging @module=juju.<subsystem> e.g.:
@module=juju.resource-application
const ( JujuControllerEnvKey = "JUJU_CONTROLLER_ADDRESSES" JujuUsernameEnvKey = "JUJU_USERNAME" JujuPasswordEnvKey = "JUJU_PASSWORD" JujuCACertEnvKey = "JUJU_CA_CERT" JujuClientIDEnvKey = "JUJU_CLIENT_ID" JujuClientSecretEnvKey = "JUJU_CLIENT_SECRET" JujuController = "controller_addresses" JujuUsername = "username" JujuPassword = "password" JujuClientID = "client_id" JujuClientSecret = "client_secret" JujuCACert = "ca_certificate" TwoSourcesAuthWarning = "Two sources of identity for controller login" )
const ( CharmKey = "charm" CidrsKey = "cidrs" ConfigKey = "config" EndpointsKey = "endpoints" ExposeKey = "expose" SpacesKey = "spaces" EndpointBindingsKey = "endpoint_bindings" ResourceKey = "resources" StorageKey = "storage" )
const ( NameKey = "name" ModelKey = "model" ConstraintsKey = "constraints" DisksKey = "disks" SeriesKey = "series" PlacementKey = "placement" BaseKey = "base" MachineIDKey = "machine_id" SSHAddressKey = "ssh_address" PrivateKeyFileKey = "private_key_file" PublicKeyFileKey = "public_key_file" )
const LogResourceIntegration = "resource-integration"
Variables ¶
This section is empty.
Functions ¶
func IsMachineNotFound ¶ added in v0.7.0
func NewAccessModelResource ¶ added in v0.9.0
func NewAccessSecretResource ¶ added in v0.12.0
func NewApplicationResource ¶ added in v0.9.0
func NewCredentialResource ¶ added in v0.9.0
func NewIntegrationResource ¶ added in v0.9.0
func NewJAASAccessCloudResource ¶ added in v0.15.0
NewJAASAccessCloudResource returns a new resource for JAAS cloud access.
func NewJAASAccessControllerResource ¶ added in v0.15.0
NewJAASAccessControllerResource returns a new resource for JAAS controller access.
func NewJAASAccessGroupResource ¶ added in v0.15.0
NewJAASAccessGroupResource returns a new resource for JAAS group access.
func NewJAASAccessModelResource ¶ added in v0.15.0
NewJAASAccessModelResource returns a new resource for JAAS model access.
func NewJAASAccessOfferResource ¶ added in v0.15.0
NewJAASAccessOfferResource returns a new resource for JAAS offer access.
func NewJAASAccessServiceAccountResource ¶ added in v0.15.0
NewJAASAccessServiceAccountResource returns a new resource for JAAS service account access.
func NewJAASGroupResource ¶ added in v0.15.0
NewJAASGroupResource returns a new instance of the JAAS group resource.
func NewJujuProvider ¶ added in v0.9.0
NewJujuProvider returns a framework style terraform provider.
func NewKubernetesCloudResource ¶ added in v0.15.0
func NewMachineDataSource ¶ added in v0.9.0
func NewMachineDataSource() datasource.DataSourceWithConfigure
func NewMachineResource ¶ added in v0.9.0
func NewModelDataSource ¶ added in v0.9.0
func NewModelDataSource() datasource.DataSourceWithConfigure
func NewModelResource ¶ added in v0.9.0
func NewOfferDataSource ¶ added in v0.9.0
func NewOfferDataSource() datasource.DataSource
func NewOfferResource ¶ added in v0.9.0
func NewSSHKeyResource ¶ added in v0.9.0
func NewSecretDataSource ¶ added in v0.12.0
func NewSecretDataSource() datasource.DataSource
func NewSecretResource ¶ added in v0.12.0
func NewUserResource ¶ added in v0.9.0
func ValidatorMatchString ¶ added in v0.15.0
ValidatorMatchString returns an AttributeValidator which ensures that any configured field is valid according to the validation function passed in.
message will be used when printing error messages for invalid values.
Types ¶
type AvoidJAASValidator ¶ added in v0.15.0
type AvoidJAASValidator struct {
// contains filtered or unexported fields
}
AvoidJAASValidator enforces that the resource is not used with JAAS. Useful to direct users to more capable resources.
func NewAvoidJAASValidator ¶ added in v0.15.0
func NewAvoidJAASValidator(client *juju.Client, preferredObject string) AvoidJAASValidator
NewAvoidJAASValidator creates a new validator that can be used with resources or data sources to enforce that the resource cannot be used with JAAS. Provide a non-empty string for preferredObject to point users to an alternate object in the error messsage. If preferredObject is empty, no hint on an alternate object will be offered in the error message.
func (AvoidJAASValidator) Description ¶ added in v0.15.0
func (v AvoidJAASValidator) Description(ctx context.Context) string
Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.
func (AvoidJAASValidator) MarkdownDescription ¶ added in v0.15.0
func (v AvoidJAASValidator) MarkdownDescription(_ context.Context) string
MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (AvoidJAASValidator) ValidateDataSource ¶ added in v0.15.0
func (v AvoidJAASValidator) ValidateDataSource(ctx context.Context, req datasource.ValidateConfigRequest, resp *datasource.ValidateConfigResponse)
ValidateResource performs the validation on the data source.
func (AvoidJAASValidator) ValidateResource ¶ added in v0.15.0
func (v AvoidJAASValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse)
ValidateResource performs the validation on the resource.
type Getter ¶ added in v0.15.0
type Getter interface {
Get(ctx context.Context, target interface{}) diag.Diagnostics
}
Getter is used to get details from a plan or state object. Implemented by Terraform's [State] and [Plan] types.
type RequiresJAASValidator ¶ added in v0.15.0
type RequiresJAASValidator struct {
// contains filtered or unexported fields
}
RequiresJAASValidator enforces that the resource can only be used with JAAS.
func NewRequiresJAASValidator ¶ added in v0.15.0
func NewRequiresJAASValidator(client *juju.Client) RequiresJAASValidator
NewRequiresJAASValidator returns a new validator that enforces a resource can only be created against JAAS.
func (RequiresJAASValidator) Description ¶ added in v0.15.0
func (v RequiresJAASValidator) Description(ctx context.Context) string
Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.
func (RequiresJAASValidator) MarkdownDescription ¶ added in v0.15.0
func (v RequiresJAASValidator) MarkdownDescription(_ context.Context) string
MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (RequiresJAASValidator) ValidateDataSource ¶ added in v0.15.0
func (v RequiresJAASValidator) ValidateDataSource(ctx context.Context, req datasource.ValidateConfigRequest, resp *datasource.ValidateConfigResponse)
ValidateResource performs the validation on the data source.
func (RequiresJAASValidator) ValidateResource ¶ added in v0.15.0
func (v RequiresJAASValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse)
ValidateResource performs the validation on the resource.
type Setter ¶ added in v0.15.0
type Setter interface {
Set(ctx context.Context, target interface{}) diag.Diagnostics
}
Setter is used to set details on a state object. Implemented by Terraform's [State] type.
type StringIsChannelValidator ¶ added in v0.12.0
type StringIsChannelValidator struct{}
func (StringIsChannelValidator) Description ¶ added in v0.12.0
func (v StringIsChannelValidator) Description(context.Context) string
Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.
func (StringIsChannelValidator) MarkdownDescription ¶ added in v0.12.0
func (v StringIsChannelValidator) MarkdownDescription(context.Context) string
MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (StringIsChannelValidator) ValidateString ¶ added in v0.12.0
func (v StringIsChannelValidator) ValidateString(_ context.Context, req validator.StringRequest, resp *validator.StringResponse)
Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.
type StringIsResourceKeyValidator ¶ added in v0.14.0
type StringIsResourceKeyValidator struct{}
func (StringIsResourceKeyValidator) Description ¶ added in v0.14.0
func (v StringIsResourceKeyValidator) Description(context.Context) string
Description returns a plain text description of the validator's behavior, suitable for a practitioner to understand its impact.
func (StringIsResourceKeyValidator) MarkdownDescription ¶ added in v0.14.0
func (v StringIsResourceKeyValidator) MarkdownDescription(context.Context) string
MarkdownDescription returns a markdown formatted description of the validator's behavior, suitable for a practitioner to understand its impact.
func (StringIsResourceKeyValidator) ValidateMap ¶ added in v0.14.0
func (v StringIsResourceKeyValidator) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse)
ValidateMap Validate runs the main validation logic of the validator, reading configuration data out of `req` and updating `resp` with diagnostics.
Source Files ¶
- data_source_machine.go
- data_source_model.go
- data_source_offer.go
- data_source_secrets.go
- helpers.go
- modifer_storagedirectiveset.go
- provider.go
- resource_access_generic.go
- resource_access_jaas_cloud.go
- resource_access_jaas_controller.go
- resource_access_jaas_group.go
- resource_access_jaas_model.go
- resource_access_jaas_offer.go
- resource_access_jaas_service_account.go
- resource_access_model.go
- resource_access_secret.go
- resource_application.go
- resource_credential.go
- resource_integration.go
- resource_jaas_group.go
- resource_kubernetes_cloud.go
- resource_machine.go
- resource_model.go
- resource_offer.go
- resource_secret.go
- resource_ssh_key.go
- resource_user.go
- validator_avoid_jaas.go
- validator_base.go
- validator_channel.go
- validator_match_string.go
- validator_require_jaas.go
- validator_resourcekey.go
- validator_set_unique_attribute.go
- validator_storagedirective.go