Documentation ¶
Index ¶
- Variables
- func DataSourceFlattenInfraHost(ctx context.Context, from *inframgmt.Host, diags *diag.Diagnostics) types.Object
- func DataSourceFlattenInfraService(ctx context.Context, from *inframgmt.Service, diags *diag.Diagnostics) types.Object
- func ExpandInfraHost(ctx context.Context, o types.Object, diags *diag.Diagnostics) *inframgmt.Host
- func ExpandInfraService(ctx context.Context, o types.Object, diags *diag.Diagnostics) *inframgmt.Service
- func ExpandInfraServiceHostConfig(ctx context.Context, o types.Object, diags *diag.Diagnostics) *inframgmt.ServiceHostConfig
- func FlattenInfraServiceHostConfig(ctx context.Context, from *inframgmt.ServiceHostConfig, ...) types.Object
- func InfraServiceResourceSchemaAttributes() map[string]schema.Attribute
- func InfraServiceResourceSchemaAttributesWithTimeouts(ctx context.Context) map[string]schema.Attribute
- func NewHostsDataSource() datasource.DataSource
- func NewHostsResource() resource.Resource
- func NewServicesDataSource() datasource.DataSource
- func NewServicesResource() resource.Resource
- type HostsDataSource
- func (d *HostsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *HostsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *HostsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *HostsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type HostsResource
- func (r *HostsResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *HostsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *HostsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *HostsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *HostsResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *HostsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *HostsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *HostsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type InfraHostModel
- type InfraHostModelWithFilter
- type InfraServiceHostConfigModel
- type InfraServiceModel
- type InfraServiceModelWithFilter
- type InfraServiceModelWithTimeouts
- type ServicesDataSource
- func (d *ServicesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *ServicesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *ServicesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *ServicesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type ServicesResource
- func (r *ServicesResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ServicesResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ServicesResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ServicesResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ServicesResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ServicesResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ServicesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ServicesResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Constants ¶
This section is empty.
Variables ¶
View Source
var InfraHostAttrTypes = map[string]attr.Type{ "configs": types.ListType{ElemType: types.ObjectType{AttrTypes: InfraServiceHostConfigAttrTypes}}, "connectivity_monitor": types.MapType{ElemType: types.StringType}, "created_at": timetypes.RFC3339Type{}, "created_by": types.StringType, "description": types.StringType, "display_name": types.StringType, "host_subtype": types.StringType, "host_type": types.StringType, "host_version": types.StringType, "id": types.StringType, "ip_address": types.StringType, "ip_space": types.StringType, "legacy_id": types.StringType, "location_id": types.StringType, "mac_address": types.StringType, "maintenance_mode": types.StringType, "nat_ip": types.StringType, "noa_cluster": types.StringType, "ophid": types.StringType, "pool_id": types.StringType, "serial_number": types.StringType, "tags": types.MapType{ElemType: types.StringType}, "tags_all": types.MapType{ElemType: types.StringType}, "timezone": types.StringType, "updated_at": timetypes.RFC3339Type{}, }
View Source
var InfraHostResourceSchemaAttributes = map[string]schema.Attribute{ "configs": schema.ListNestedAttribute{ NestedObject: schema.NestedAttributeObject{ Attributes: InfraServiceHostConfigResourceSchemaAttributes, }, Computed: true, MarkdownDescription: "The list of Host-specific configurations for each Service deployed on this Host.", }, "connectivity_monitor": schema.MapAttribute{ ElementType: types.StringType, Computed: true, MarkdownDescription: "Represents the connectivity monitor properties of a Host, to enable/disable connectivity monitoring for redundant network interfaces.\n\n" + " The \"endpoint_type\" is:\n" + " - `\"csp\"` for enabling monitoring\n" + " - `\"\"` for disabling monitoring (default)\n\n" + " Note: Currently, all fields except \"endpoint_type\" are read-only, and will be overridden to default values in case they are edited.\n\n" + " Example:\n" + " ```\n{\n \"connectivity_monitor\": {\n \"cost\":1000000,\n \"endpoint_type\":\"csp\",\n \"endpoint\":\"http://csp.infoblox.com\",\n \"interval\":15,\n \"failure_threshold\":1,\n \"success_threshold\":2\n }\n }\n```", }, "created_at": schema.StringAttribute{ CustomType: timetypes.RFC3339Type{}, Computed: true, MarkdownDescription: "The timestamp of creation of Host.", }, "created_by": schema.StringAttribute{ Computed: true, MarkdownDescription: "The creator of the Host (internal use only).", }, "description": schema.StringAttribute{ Optional: true, MarkdownDescription: "The description of the Host (optional).", }, "display_name": schema.StringAttribute{ Required: true, MarkdownDescription: "The name of the Host (unique).", }, "host_subtype": schema.StringAttribute{ Computed: true, MarkdownDescription: "The sub-type of a specific Host type. Example: For Host type BloxOne Appliance, sub-type could be \"B105\" or \"VEP1425\"", }, "host_type": schema.StringAttribute{ Computed: true, MarkdownDescription: "The type of Host. Should be one of: 1. NIOS , 2. NIOS HA, 3. BloxOne VM , 4. BloxOne Appliance, 5. BloxOne Container, 6. CNIOS", }, "host_version": schema.StringAttribute{ Computed: true, MarkdownDescription: "The version of the Host platform services.", }, "id": schema.StringAttribute{ Computed: true, MarkdownDescription: "The resource identifier.", PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, }, "ip_address": schema.StringAttribute{ Computed: true, MarkdownDescription: "The IP address of the Host.", }, "ip_space": schema.StringAttribute{ Optional: true, MarkdownDescription: "The IP Space of the Host.", }, "legacy_id": schema.StringAttribute{ Computed: true, MarkdownDescription: "The legacy Host object identifier.", }, "location_id": schema.StringAttribute{ Optional: true, MarkdownDescription: "The resource identifier.", }, "mac_address": schema.StringAttribute{ Computed: true, MarkdownDescription: "The MAC address of the Host.", }, "maintenance_mode": schema.StringAttribute{ Optional: true, Computed: true, Default: stringdefault.StaticString("disabled"), }, "nat_ip": schema.StringAttribute{ Computed: true, MarkdownDescription: "The NAT IP address of the Host.", }, "noa_cluster": schema.StringAttribute{ Computed: true, MarkdownDescription: "The CSP cluster identifier (internal use only).", }, "ophid": schema.StringAttribute{ Computed: true, MarkdownDescription: "The unique On-Prem Host ID generated by the On-Prem device and assigned to the Host once it is registered and logged into the Infoblox Cloud.", }, "pool_id": schema.StringAttribute{ Optional: true, Computed: true, PlanModifiers: []planmodifier.String{ stringplanmodifier.UseStateForUnknown(), }, MarkdownDescription: "The resource identifier.", }, "serial_number": schema.StringAttribute{ Optional: true, MarkdownDescription: "The unique serial number of the Host.", }, "tags": schema.MapAttribute{ ElementType: types.StringType, Optional: true, Computed: true, Default: mapdefault.StaticValue(types.MapNull(types.StringType)), MarkdownDescription: "Tags associated with this Host.", }, "tags_all": schema.MapAttribute{ ElementType: types.StringType, Computed: true, MarkdownDescription: "Tags associated with this Host including default tags.", }, "timezone": schema.StringAttribute{ Computed: true, MarkdownDescription: "The timezone of the Host.", }, "updated_at": schema.StringAttribute{ CustomType: timetypes.RFC3339Type{}, Computed: true, MarkdownDescription: "The timestamp of the latest update on Host.", }, }
View Source
var InfraServiceAttrTypes = map[string]attr.Type{ "configs": types.ListType{ElemType: types.ObjectType{AttrTypes: InfraServiceHostConfigAttrTypes}}, "created_at": timetypes.RFC3339Type{}, "description": types.StringType, "desired_state": types.StringType, "desired_version": types.StringType, "id": types.StringType, "interface_labels": types.ListType{ElemType: types.StringType}, "name": types.StringType, "pool_id": types.StringType, "service_type": types.StringType, "tags": types.MapType{ElemType: types.StringType}, "tags_all": types.MapType{ElemType: types.StringType}, "updated_at": timetypes.RFC3339Type{}, }
View Source
var InfraServiceHostConfigAttrTypes = map[string]attr.Type{ "current_version": types.StringType, "extra_data": types.StringType, "host_id": types.StringType, "id": types.StringType, "service_id": types.StringType, "service_type": types.StringType, "upgraded_at": timetypes.RFC3339Type{}, }
View Source
var InfraServiceHostConfigResourceSchemaAttributes = map[string]schema.Attribute{ "current_version": schema.StringAttribute{ Optional: true, MarkdownDescription: "The current version of the Service deployed on the Host.", }, "extra_data": schema.StringAttribute{ Optional: true, MarkdownDescription: "The field to carry any extra data specific to this configuration.", }, "host_id": schema.StringAttribute{ Optional: true, MarkdownDescription: "The resource identifier.", }, "id": schema.StringAttribute{ Computed: true, MarkdownDescription: "The resource identifier.", }, "service_id": schema.StringAttribute{ Optional: true, MarkdownDescription: "The resource identifier.", }, "service_type": schema.StringAttribute{ Optional: true, MarkdownDescription: "The type of the Service deployed on the Host (`dns`, `cdc`, etc.). The following is a list of the different Services and their string types (the string types are to be used with the APIs for the `service_type` field):\n\n | Service name | Service type | \n | ------ | ------ | \n | Access Authentication | authn | \n | Anycast | anycast | \n | Data Connector | cdc | \n | DHCP | dhcp | \n | DNS | dns | \n | DNS Forwarding Proxy | dfp | \n | NIOS Grid Connector | orpheus | \n | MS AD Sync | msad | \n | NTP | ntp | \n | BGP | bgp | \n | RIP | rip | \n | OSPF | ospf | \n", }, "upgraded_at": schema.StringAttribute{ CustomType: timetypes.RFC3339Type{}, Optional: true, MarkdownDescription: "The timestamp of the latest upgrade of the Host-specific Service configuration.", }, }
Functions ¶
func DataSourceFlattenInfraHost ¶ added in v1.3.0
func DataSourceFlattenInfraService ¶ added in v1.3.0
func ExpandInfraHost ¶
func ExpandInfraService ¶
func ExpandInfraServiceHostConfig ¶
func ExpandInfraServiceHostConfig(ctx context.Context, o types.Object, diags *diag.Diagnostics) *inframgmt.ServiceHostConfig
func FlattenInfraServiceHostConfig ¶
func FlattenInfraServiceHostConfig(ctx context.Context, from *inframgmt.ServiceHostConfig, diags *diag.Diagnostics) types.Object
func NewHostsDataSource ¶
func NewHostsDataSource() datasource.DataSource
func NewHostsResource ¶
func NewServicesDataSource ¶
func NewServicesDataSource() datasource.DataSource
func NewServicesResource ¶
Types ¶
type HostsDataSource ¶
type HostsDataSource struct {
// contains filtered or unexported fields
}
HostsDataSource defines the data source implementation.
func (*HostsDataSource) Configure ¶
func (d *HostsDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*HostsDataSource) Metadata ¶
func (d *HostsDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*HostsDataSource) Read ¶
func (d *HostsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*HostsDataSource) Schema ¶
func (d *HostsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type HostsResource ¶
type HostsResource struct {
// contains filtered or unexported fields
}
HostsResource defines the resource implementation.
func (*HostsResource) Configure ¶
func (r *HostsResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*HostsResource) Create ¶
func (r *HostsResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*HostsResource) Delete ¶
func (r *HostsResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*HostsResource) ImportState ¶
func (r *HostsResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*HostsResource) Metadata ¶
func (r *HostsResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*HostsResource) Read ¶
func (r *HostsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*HostsResource) Schema ¶
func (r *HostsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*HostsResource) Update ¶
func (r *HostsResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type InfraHostModel ¶
type InfraHostModel struct { Configs types.List `tfsdk:"configs"` ConnectivityMonitor types.Map `tfsdk:"connectivity_monitor"` CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` CreatedBy types.String `tfsdk:"created_by"` Description types.String `tfsdk:"description"` DisplayName types.String `tfsdk:"display_name"` HostSubtype types.String `tfsdk:"host_subtype"` HostType types.String `tfsdk:"host_type"` HostVersion types.String `tfsdk:"host_version"` Id types.String `tfsdk:"id"` IpAddress types.String `tfsdk:"ip_address"` IpSpace types.String `tfsdk:"ip_space"` LegacyId types.String `tfsdk:"legacy_id"` LocationId types.String `tfsdk:"location_id"` MacAddress types.String `tfsdk:"mac_address"` MaintenanceMode types.String `tfsdk:"maintenance_mode"` NatIp types.String `tfsdk:"nat_ip"` NoaCluster types.String `tfsdk:"noa_cluster"` Ophid types.String `tfsdk:"ophid"` PoolId types.String `tfsdk:"pool_id"` SerialNumber types.String `tfsdk:"serial_number"` Tags types.Map `tfsdk:"tags"` TagsAll types.Map `tfsdk:"tags_all"` Timezone types.String `tfsdk:"timezone"` UpdatedAt timetypes.RFC3339 `tfsdk:"updated_at"` }
func (*InfraHostModel) Expand ¶
func (m *InfraHostModel) Expand(ctx context.Context, diags *diag.Diagnostics) *inframgmt.Host
func (*InfraHostModel) Flatten ¶
func (m *InfraHostModel) Flatten(ctx context.Context, from *inframgmt.Host, diags *diag.Diagnostics)
type InfraHostModelWithFilter ¶
type InfraHostModelWithFilter struct { Filters types.Map `tfsdk:"filters"` TagFilters types.Map `tfsdk:"tag_filters"` Results types.List `tfsdk:"results"` RetryIfNotFound types.Bool `tfsdk:"retry_if_not_found"` Timeouts timeouts.Value `tfsdk:"timeouts"` }
func (*InfraHostModelWithFilter) FlattenResults ¶
func (m *InfraHostModelWithFilter) FlattenResults(ctx context.Context, from []inframgmt.Host, diags *diag.Diagnostics)
type InfraServiceHostConfigModel ¶
type InfraServiceHostConfigModel struct { CurrentVersion types.String `tfsdk:"current_version"` ExtraData types.String `tfsdk:"extra_data"` HostId types.String `tfsdk:"host_id"` Id types.String `tfsdk:"id"` ServiceId types.String `tfsdk:"service_id"` ServiceType types.String `tfsdk:"service_type"` UpgradedAt timetypes.RFC3339 `tfsdk:"upgraded_at"` }
func (*InfraServiceHostConfigModel) Expand ¶
func (m *InfraServiceHostConfigModel) Expand(ctx context.Context, diags *diag.Diagnostics) *inframgmt.ServiceHostConfig
func (*InfraServiceHostConfigModel) Flatten ¶
func (m *InfraServiceHostConfigModel) Flatten(ctx context.Context, from *inframgmt.ServiceHostConfig, diags *diag.Diagnostics)
type InfraServiceModel ¶
type InfraServiceModel struct { Configs types.List `tfsdk:"configs"` CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` Description types.String `tfsdk:"description"` DesiredState types.String `tfsdk:"desired_state"` DesiredVersion types.String `tfsdk:"desired_version"` Id types.String `tfsdk:"id"` InterfaceLabels types.List `tfsdk:"interface_labels"` Name types.String `tfsdk:"name"` PoolId types.String `tfsdk:"pool_id"` ServiceType types.String `tfsdk:"service_type"` Tags types.Map `tfsdk:"tags"` TagsAll types.Map `tfsdk:"tags_all"` UpdatedAt timetypes.RFC3339 `tfsdk:"updated_at"` }
func (*InfraServiceModel) Expand ¶
func (m *InfraServiceModel) Expand(ctx context.Context, diags *diag.Diagnostics) *inframgmt.Service
func (*InfraServiceModel) Flatten ¶
func (m *InfraServiceModel) Flatten(ctx context.Context, from *inframgmt.Service, diags *diag.Diagnostics)
type InfraServiceModelWithFilter ¶
type InfraServiceModelWithFilter struct { Filters types.Map `tfsdk:"filters"` TagFilters types.Map `tfsdk:"tag_filters"` Results types.List `tfsdk:"results"` }
func (*InfraServiceModelWithFilter) FlattenResults ¶
func (m *InfraServiceModelWithFilter) FlattenResults(ctx context.Context, from []inframgmt.Service, diags *diag.Diagnostics)
type InfraServiceModelWithTimeouts ¶
type InfraServiceModelWithTimeouts struct { Configs types.List `tfsdk:"configs"` CreatedAt timetypes.RFC3339 `tfsdk:"created_at"` Description types.String `tfsdk:"description"` DesiredState types.String `tfsdk:"desired_state"` DesiredVersion types.String `tfsdk:"desired_version"` Id types.String `tfsdk:"id"` InterfaceLabels types.List `tfsdk:"interface_labels"` Name types.String `tfsdk:"name"` PoolId types.String `tfsdk:"pool_id"` ServiceType types.String `tfsdk:"service_type"` Tags types.Map `tfsdk:"tags"` TagsAll types.Map `tfsdk:"tags_all"` UpdatedAt timetypes.RFC3339 `tfsdk:"updated_at"` Timeouts timeouts.Value `tfsdk:"timeouts"` WaitForState types.Bool `tfsdk:"wait_for_state"` }
InfraServiceModelWithTimeouts is a helper model that also contains the timeouts for the InfraServiceModel. The plugin framework does not deal well with embedded structs, so have to duplicate the fields and Flatten/Expand functions here from InfraServiceModel. https://github.com/hashicorp/terraform-plugin-framework/issues/242
func (*InfraServiceModelWithTimeouts) Expand ¶
func (m *InfraServiceModelWithTimeouts) Expand(ctx context.Context, diags *diag.Diagnostics) *inframgmt.Service
func (*InfraServiceModelWithTimeouts) Flatten ¶
func (m *InfraServiceModelWithTimeouts) Flatten(ctx context.Context, from *inframgmt.Service, diags *diag.Diagnostics)
type ServicesDataSource ¶
type ServicesDataSource struct {
// contains filtered or unexported fields
}
ServicesDataSource defines the data source implementation.
func (*ServicesDataSource) Configure ¶
func (d *ServicesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*ServicesDataSource) Metadata ¶
func (d *ServicesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*ServicesDataSource) Read ¶
func (d *ServicesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*ServicesDataSource) Schema ¶
func (d *ServicesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type ServicesResource ¶
type ServicesResource struct {
// contains filtered or unexported fields
}
ServicesResource defines the resource implementation.
func (*ServicesResource) Configure ¶
func (r *ServicesResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ServicesResource) Create ¶
func (r *ServicesResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ServicesResource) Delete ¶
func (r *ServicesResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ServicesResource) ImportState ¶
func (r *ServicesResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*ServicesResource) Metadata ¶
func (r *ServicesResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ServicesResource) Read ¶
func (r *ServicesResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ServicesResource) Schema ¶
func (r *ServicesResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ServicesResource) Update ¶
func (r *ServicesResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.