diff --git a/docs/data-sources/project.md b/docs/data-sources/project.md new file mode 100644 index 0000000..77395e7 --- /dev/null +++ b/docs/data-sources/project.md @@ -0,0 +1,25 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_project Data Source - ogc" +subcategory: "" +description: |- + +--- + +# ogc_project (Data Source) + + + + + + +## Schema + +### Optional + +- `display_name` (String) +- `name` (String) + +### Read-Only + +- `id` (String) The ID of this resource. diff --git a/docs/guides/aws_onoard.md b/docs/guides/aws_onboard.md similarity index 100% rename from docs/guides/aws_onoard.md rename to docs/guides/aws_onboard.md diff --git a/docs/guides/azure_onoard.md b/docs/guides/azure_onboard.md similarity index 100% rename from docs/guides/azure_onoard.md rename to docs/guides/azure_onboard.md diff --git a/docs/guides/gcp_onoard.md b/docs/guides/gcp_onboard.md similarity index 100% rename from docs/guides/gcp_onoard.md rename to docs/guides/gcp_onboard.md diff --git a/docs/resources/application.md b/docs/resources/application.md new file mode 100644 index 0000000..beca1a6 --- /dev/null +++ b/docs/resources/application.md @@ -0,0 +1,67 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_application Resource - ogc" +subcategory: "" +description: |- + Applications are groups of one or more containers, with shared resources such as networking and storage, that can be deployed and replicated across clusters or in a single cluster. +--- + +# ogc_application (Resource) + +Applications are groups of one or more containers, with shared resources such as networking and storage, that can be deployed and replicated across clusters or in a single cluster. + +## Example Usage + +```terraform +resource "ogc_package" "pkg" { + name = "example" + project_id = "0e145a36-1ee7-434c-9f30-9e1ba4da2d7c" +} + +resource "ogc_application" "app" { + name = "example" + package_id = ogc_package.pkg.id +} +``` + + +## Schema + +### Required + +- `package_id` (String) The id of the parent Package of the Application. + +### Optional + +- `display_name` (String) The user-supplied name of the Application. +- `fs_group` (Number) Supplemental group that applies to all containers in a pod. +- `max_instances` (Number) The maximum number of cross-cluster instances (Default = 1) of this application to deploy. 0 value has special meaning as noted in the Multiplicity section below. +- `min_instances` (Number) The minimum number of cross-cluster instances of this application to deploy. +- `min_ready_seconds` (Number) Setting for minReadySeconds on all Kubernetes Deployments which are generated by this Application. +- `name` (String) The user-supplied RFC 1123-compliant name of the Application. +- `progress_deadline_seconds` (Number) Setting for progressDeadlineSeconds on all Kubernetes Deployments which are generated by this Application. +- `reject_privileged_clusters` (Boolean) If true the planning algorithm will refuse to place the application on a Cluster for which permitPrivilegedContainers is true. Prevents owned Clusters setting privilegedAccess to true. +- `replicas` (Number) The number of replicas of the Application to be deployed to a single Cluster. +- `requires_redeploy` (Boolean) Set to true if the Application needs the entire owning Package to be redeployed when the Application is restarted for stability reasons. +- `selector` (Block List) An Application may have zero or more Selectors associated with it. These Selectors are used during deployment planning to select which clusters the application can run on. (see [below for nested schema](#nestedblock--selector)) + +### Read-Only + +- `id` (String) The unique identifier of the Application. +- `last_updated` (String) The timestamp of the last change to this entity and any sub-entities. + + +### Nested Schema for `selector` + +Required: + +- `key` (String) The key that is used to match the key property of a Label. + +Optional: + +- `operator` (String) The SelectorOp used as part of the label matching operation. Can be one of: Exists, NotExists, Equals, NotEquals, In, NotIn, MinOf, MaxOf. Defaults to In. +- `values` (List of String) The values to be used during deployment planning. If operator is Exists, NotExists, MinOf or MaxOf this should be empty. + +Read-Only: + +- `id` (String) The unique identifier of the Selector. diff --git a/docs/resources/container.md b/docs/resources/container.md new file mode 100644 index 0000000..b25d7fc --- /dev/null +++ b/docs/resources/container.md @@ -0,0 +1,61 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_container Resource - ogc" +subcategory: "" +description: |- + A Container entity encapsulates all the information required to run an OCI-compliant container image. +--- + +# ogc_container (Resource) + +A Container entity encapsulates all the information required to run an OCI-compliant container image. + +## Example Usage + +```terraform +resource "ogc_container" "container" { + name = "example" + application_id = ogc_application.app.id + image_name = "nginx" + env { + name = "PORT" + value = "80" + } +} +``` + + +## Schema + +### Required + +- `application_id` (String) The id of the parent Application of the Container. +- `image_name` (String) The name of the OCI container image in the associated ImageRegistry. + +### Optional + +- `args` (String) The arguments to pass to the command to execute in the Container as a single string to be tokenised at deployment. +- `command` (String) The command to execute in the Container. +- `display_name` (String) The user-supplied name of the Container. +- `env` (Block List) List of environment variables to set in the container as key/value pairs. (see [below for nested schema](#nestedblock--env)) +- `image_registry_id` (String) The id of the associated ImageRegistry of the Application. +- `image_tag` (String) The tag of the OCI container image in the associated ImageRegistry. +- `name` (String) The user-supplied RFC 1123-compliant name of the Container. +- `privileged_access` (Boolean) If true the container will be deployed in privileged access mode. Cannot be true if the owning Application's rejectPrivilegedClusters property is true or the owning Project's permitPrivilegedContainers property is false. + +### Read-Only + +- `id` (String) The unique identifier of the Container. +- `last_updated` (String) The timestamp of the last change to this entity and any sub-entities. + + +### Nested Schema for `env` + +Required: + +- `name` (String) Name of the environment variable. + +Optional: + +- `secret_id` (String) Secret to be used as value for the environment variable. +- `value` (String) Value of the environment variable. diff --git a/docs/resources/container_mount.md b/docs/resources/container_mount.md new file mode 100644 index 0000000..f10cc8d --- /dev/null +++ b/docs/resources/container_mount.md @@ -0,0 +1,40 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_container_mount Resource - ogc" +subcategory: "" +description: |- + Zero or more Mounts may be attached to a container to allow external drive-type content to be requested and assigned. +--- + +# ogc_container_mount (Resource) + +Zero or more Mounts may be attached to a container to allow external drive-type content to be requested and assigned. + +## Example Usage + +```terraform +resource "ogc_container_mount" "mount" { + container_id = ogc_container.container.id + filepath = "/mnt" + storage_request_id = ogc_storage_request.sr.id +} +``` + + +## Schema + +### Required + +- `container_id` (String) The id of the parent Container of the Mount. +- `filepath` (String) Mount point on the container where the requested resource is to be mounted. + +### Optional + +- `access_mode` (String) Required access mode to be applied for access to a Volume generated with a StorageRequest. Only applicable if the type is StorageRequest. +- `secret_id` (String) Secret to be mounted. +- `storage_request_id` (String) Storage Request to be mounted. +- `value` (String) Value to be mounted. + +### Read-Only + +- `id` (String) The unique identifier of the ContainerMount. diff --git a/docs/resources/container_port.md b/docs/resources/container_port.md new file mode 100644 index 0000000..fdde053 --- /dev/null +++ b/docs/resources/container_port.md @@ -0,0 +1,42 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_container_port Resource - ogc" +subcategory: "" +description: |- + Network port exposed by a container. +--- + +# ogc_container_port (Resource) + +Network port exposed by a container. + +## Example Usage + +```terraform +resource "ogc_container_port" "port" { + display_name = "http" + container_id = ogc_container.container.id + internal = 80 + external = 80 + protocol = "TCP" +} +``` + + +## Schema + +### Required + +- `container_id` (String) The id of the parent Container of the Port. +- `display_name` (String) The user-supplied name of the Container. +- `external` (Number) Port to be exposed externally where traffic will come from. +- `internal` (Number) Port within the container the traffic will be published on. + +### Optional + +- `family` (String) The address family the port will listen on. +- `protocol` (String) The IP Protocol the port listens on . + +### Read-Only + +- `id` (String) The unique identifier of the Port. diff --git a/docs/resources/container_resource_request.md b/docs/resources/container_resource_request.md new file mode 100644 index 0000000..af81dd6 --- /dev/null +++ b/docs/resources/container_resource_request.md @@ -0,0 +1,36 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_container_resource_request Resource - ogc" +subcategory: "" +description: |- + The ResourceRequest entity encapsulates an individual Containers requirements for a given resource. The content and use of these entities maps directly to the Kubernetes container resource limits, and in the same manner a ResourceRequest has a request property and a limit property. +--- + +# ogc_container_resource_request (Resource) + +The ResourceRequest entity encapsulates an individual Containers requirements for a given resource. The content and use of these entities maps directly to the Kubernetes container resource limits, and in the same manner a ResourceRequest has a request property and a limit property. + +## Example Usage + +```terraform +resource "ogc_container_resource_request" "rr" { + container_id = ogc_container.container.id + resource_type = "memory" + request = "1Gi" + limit = "1Gi" +} +``` + + +## Schema + +### Required + +- `container_id` (String) The id of the parent Container of the Resource Request. +- `limit` (String) The maximum amount of resource to be consumed. +- `request` (String) The amount of resource requested. +- `resource_type` (String) The kubernetes-reported name of the resource to request. + +### Read-Only + +- `id` (String) The unique identifier of the ContainerResourceRequest. diff --git a/docs/resources/package.md b/docs/resources/package.md new file mode 100644 index 0000000..5888106 --- /dev/null +++ b/docs/resources/package.md @@ -0,0 +1,54 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_package Resource - ogc" +subcategory: "" +description: |- + Packages are the smallest deployable unit in OGC. Packages can have one or more applications that can be connected between themselves through route policies. Applications within a single package may be deployed across multiple clusters. Package selectors decide which clusters will be selected during deployment planning. +--- + +# ogc_package (Resource) + +Packages are the smallest deployable unit in OGC. Packages can have one or more applications that can be connected between themselves through route policies. Applications within a single package may be deployed across multiple clusters. Package selectors decide which clusters will be selected during deployment planning. + +## Example Usage + +```terraform +resource "ogc_package" "pkg" { + name = "example" + project_id = "0e145a36-1ee7-434c-9f30-9e1ba4da2d7c" +} +``` + + +## Schema + +### Required + +- `project_id` (String) The id of the parent Project. + +### Optional + +- `display_name` (String) The user-supplied name of the Package. +- `name` (String) The user-supplied RFC 1123-compliant name of the Package. +- `selector` (Block List) A Package may have zero or more Selectors associated with it. These Selectors apply to all Applications in the Package during deployment planning. (see [below for nested schema](#nestedblock--selector)) + +### Read-Only + +- `id` (String) The unique identifier of the Package. +- `last_updated` (String) The timestamp of the last change to this entity and any sub-entities. + + +### Nested Schema for `selector` + +Required: + +- `key` (String) The key that is used to match the key property of a Label. + +Optional: + +- `operator` (String) The SelectorOp used as part of the label matching operation. Can be one of: Exists, NotExists, Equals, NotEquals, In, NotIn, MinOf, MaxOf. Defaults to In. +- `values` (List of String) The values to be used during deployment planning. If operator is Exists, NotExists, MinOf or MaxOf this should be empty. + +Read-Only: + +- `id` (String) The unique identifier of the Selector. diff --git a/docs/resources/remote_endpoint.md b/docs/resources/remote_endpoint.md new file mode 100644 index 0000000..fb945df --- /dev/null +++ b/docs/resources/remote_endpoint.md @@ -0,0 +1,39 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_remote_endpoint Resource - ogc" +subcategory: "" +description: |- + Represents a layer-3/4 network destination not directly managed by OGC, i.e. an accessible network resource outside the Ori configuration/deployment. +--- + +# ogc_remote_endpoint (Resource) + +Represents a layer-3/4 network destination not directly managed by OGC, i.e. an accessible network resource outside the Ori configuration/deployment. + +## Example Usage + +```terraform +resource "ogc_remote_endpoint" "re" { + display_name = "example" + package_id = ogc_package.pkg.id + address = "0.0.0.0/0" +} +``` + + +## Schema + +### Required + +- `address` (String) The address on which the parent RemoteEndpoint is to listen in CIDR format (e.g. 123.45.67.0/24). If the subnet portion is omitted it is assumed to be /32 for IPv4 addresses and /128 for IPv6 addresses, i.e. the address is treated as a single item. +- `display_name` (String) The user-supplied name of the RemoteEndpoint. +- `package_id` (String) The id of the parent Package of the RemoteEndpoint. + +### Optional + +- `port` (Number) Port number on which the endpoint is listening. If null then all ports will be used. +- `protocol` (String) TThe IP Protocol to which the endpoint is listening. If null then all protocols supported by K8s will be used. + +### Read-Only + +- `id` (String) The unique identifier of the RemoteEndpoint. diff --git a/docs/resources/route_policy.md b/docs/resources/route_policy.md new file mode 100644 index 0000000..5503f2d --- /dev/null +++ b/docs/resources/route_policy.md @@ -0,0 +1,58 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_route_policy Resource - ogc" +subcategory: "" +description: |- + These represent layer 4 traffic routes (effectively VPN connections) to allow traffic between specified points. + If a route policy is set up from an application to a port, then an internal FQDN for the target port will be created with the format appname.orinet.ori.cloud. This will only be accessible by the source application. + If a route policy is set up from a traffic source to a port, then an external FQDN for the target application will be created with the format appname.packagename.projectname.orgname.dns.ori.cloud. +--- + +# ogc_route_policy (Resource) + +These represent layer 4 traffic routes (effectively VPN connections) to allow traffic between specified points. +If a route policy is set up from an application to a port, then an internal FQDN for the target port will be created with the format appname.orinet.ori.cloud. This will only be accessible by the source application. +If a route policy is set up from a traffic source to a port, then an external FQDN for the target application will be created with the format appname.packagename.projectname.orgname.dns.ori.cloud. + +## Example Usage + +```terraform +# route policy between 2 applications +resource "ogc_route_policy" "internal" { + package_id = ogc_package.pkg.id + application_id = ogc_application.simple_app.id + port_id = ogc_container_port.port.id +} + +# expose an application to be accessible by the outside world +resource "ogc_route_policy" "external" { + package_id = ogc_package.pkg.id + traffic_source_id = ogc_traffic_source.internet.id + port_id = ogc_container_port.port.id +} + +# give internet access to an application +resource "ogc_route_policy" "internet" { + package_id = ogc_package.pkg.id + application_id = ogc_application.simple_app.id + remote_endpoint_id = ogc_remote_endpoint.internet.id +} +``` + + +## Schema + +### Required + +- `package_id` (String) The id of the parent Package of the RoutePolicy. + +### Optional + +- `application_id` (String) Id of source application. Either application_id or traffic_source_id must be set. +- `port_id` (String) Id of target port. Either port_id or remote_endpoint_id must be set. +- `remote_endpoint_id` (String) Id of target remote endpoint. Either port_id or remote_endpoint_id must be set. +- `traffic_source_id` (String) Id of external route policy. Either application_id or traffic_source_id must be set. + +### Read-Only + +- `id` (String) The unique identifier of the RoutePolicy. diff --git a/docs/resources/storage_request.md b/docs/resources/storage_request.md new file mode 100644 index 0000000..54e2ef6 --- /dev/null +++ b/docs/resources/storage_request.md @@ -0,0 +1,43 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_storage_request Resource - ogc" +subcategory: "" +description: |- + Encapsulates a request for ephemeral or persistent storage to be applied to one or more Mounts (if the MountType is set to StorageRequest). A StorageRequest is defined within the scope of a Package. +--- + +# ogc_storage_request (Resource) + +Encapsulates a request for ephemeral or persistent storage to be applied to one or more Mounts (if the MountType is set to StorageRequest). A StorageRequest is defined within the scope of a Package. + +## Example Usage + +```terraform +resource "ogc_storage_request" "sr" { + display_name = "MongoDb" + package_id = ogc_package.pkg.id + persistence_type = "Persistent" + type = "StandardHDD" + capacity_requested_mb = "1024" +} +``` + + +## Schema + +### Required + +- `capacity_requested_mb` (Number) The minimum capacity of the volume to be requested (in MB). +- `package_id` (String) The id of the parent Package of the StorageRequest. +- `persistence_type` (String) Overall storage persistence type to be requested. Can be one of Persistent or EmptyDirEphemeral. If EmptyDirEphemeral, storage can't be shared across multiple applications. +- `type` (String) OGC storage type to be requested. Can be one of StandardHDD, StandardSSD, PremiumSSD or ExtremeSSD. A plan will only be successful if there's a cluster that supports this type of storage. + +### Optional + +- `capacity_max_mb` (Number) The maximum capacity of the volume to be requested (in MB). Optional +- `display_name` (String) The user-supplied name of the StorageRequest. +- `mode` (String) File system or block mode needed. + +### Read-Only + +- `id` (String) The unique identifier of the StorageRequest. diff --git a/docs/resources/traffic_source.md b/docs/resources/traffic_source.md new file mode 100644 index 0000000..55c9c6a --- /dev/null +++ b/docs/resources/traffic_source.md @@ -0,0 +1,34 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "ogc_traffic_source Resource - ogc" +subcategory: "" +description: |- + Represents a published target for network communications external to the OGC-deployed entities to write to. This will then be connected via a RoutePolicy to a deployed Container. The TrafficSource largely maps to what would be referred to as a Load Balancer Service in Kubernetes with the caveat that multiple TrafficSources may be supported by one Load Balancer. +--- + +# ogc_traffic_source (Resource) + +Represents a published target for network communications external to the OGC-deployed entities to write to. This will then be connected via a RoutePolicy to a deployed Container. The TrafficSource largely maps to what would be referred to as a Load Balancer Service in Kubernetes with the caveat that multiple TrafficSources may be supported by one Load Balancer. + +## Example Usage + +```terraform +resource "ogc_traffic_source" "ts" { + display_name = "example" + package_id = ogc_package.pkg.id + address = "0.0.0.0/0" +} +``` + + +## Schema + +### Required + +- `address` (String) The address or address range from which the TrafficSource will accept communication in CIDR format (e.g. 123.45.67.0/24). If the subnet portion is omitted it is assumed to be /32 for IPv4 addresses and /128 for IPv6 addresses, i.e. the address is treated as a single item. +- `display_name` (String) The user-supplied name of the TrafficSource. +- `package_id` (String) The id of the parent Package of the TrafficSource. + +### Read-Only + +- `id` (String) The unique identifier of the TrafficSource.