import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Container Instance resource in Oracle Cloud Infrastructure Container Instances service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/container-instances/latest/ContainerInstance * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/container_instances * * Creates a container instance and deploys the containers on it. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testContainerInstance = new oci.containerengine.ContainerInstance("test_container_instance", { * availabilityDomain: containerInstanceAvailabilityDomain, * compartmentId: compartmentId, * containers: [{ * imageUrl: containerInstanceContainersImageUrl, * arguments: containerInstanceContainersArguments, * commands: containerInstanceContainersCommand, * definedTags: containerInstanceContainersDefinedTags, * displayName: containerInstanceContainersDisplayName, * environmentVariables: containerInstanceContainersEnvironmentVariables, * freeformTags: containerInstanceContainersFreeformTags, * healthChecks: [{ * healthCheckType: containerInstanceContainersHealthChecksHealthCheckType, * failureAction: containerInstanceContainersHealthChecksFailureAction, * failureThreshold: Number(containerInstanceContainersHealthChecksFailureThreshold), * headers: [{ * name: containerInstanceContainersHealthChecksHeadersName, * value: containerInstanceContainersHealthChecksHeadersValue, * }], * initialDelayInSeconds: Number(containerInstanceContainersHealthChecksInitialDelayInSeconds), * intervalInSeconds: Number(containerInstanceContainersHealthChecksIntervalInSeconds), * name: containerInstanceContainersHealthChecksName, * path: containerInstanceContainersHealthChecksPath, * port: Number(containerInstanceContainersHealthChecksPort), * successThreshold: Number(containerInstanceContainersHealthChecksSuccessThreshold), * timeoutInSeconds: Number(containerInstanceContainersHealthChecksTimeoutInSeconds), * }], * isResourcePrincipalDisabled: containerInstanceContainersIsResourcePrincipalDisabled === "true", * resourceConfig: { * memoryLimitInGbs: containerInstanceContainersResourceConfigMemoryLimitInGbs, * vcpusLimit: containerInstanceContainersResourceConfigVcpusLimit, * }, * securityContext: { * capabilities: { * addCapabilities: containerInstanceContainersSecurityContextCapabilitiesAddCapabilities, * dropCapabilities: containerInstanceContainersSecurityContextCapabilitiesDropCapabilities, * }, * isNonRootUserCheckEnabled: containerInstanceContainersSecurityContextIsNonRootUserCheckEnabled === "true", * isRootFileSystemReadonly: containerInstanceContainersSecurityContextIsRootFileSystemReadonly === "true", * runAsGroup: Number(containerInstanceContainersSecurityContextRunAsGroup), * runAsUser: Number(containerInstanceContainersSecurityContextRunAsUser), * securityContextType: containerInstanceContainersSecurityContextSecurityContextType, * }, * volumeMounts: [{ * mountPath: containerInstanceContainersVolumeMountsMountPath, * volumeName: containerInstanceContainersVolumeMountsVolumeName, * isReadOnly: containerInstanceContainersVolumeMountsIsReadOnly === "true", * partition: Number(containerInstanceContainersVolumeMountsPartition), * subPath: containerInstanceContainersVolumeMountsSubPath, * }], * workingDirectory: containerInstanceContainersWorkingDirectory, * }], * shape: containerInstanceShape, * shapeConfig: { * ocpus: containerInstanceShapeConfigOcpus, * memoryInGbs: containerInstanceShapeConfigMemoryInGbs, * }, * vnics: [{ * subnetId: testSubnet.id, * definedTags: containerInstanceVnicsDefinedTags, * displayName: containerInstanceVnicsDisplayName, * freeformTags: containerInstanceVnicsFreeformTags, * hostnameLabel: containerInstanceVnicsHostnameLabel, * isPublicIpAssigned: containerInstanceVnicsIsPublicIpAssigned === "true", * nsgIds: containerInstanceVnicsNsgIds, * privateIp: containerInstanceVnicsPrivateIp, * skipSourceDestCheck: containerInstanceVnicsSkipSourceDestCheck === "true", * }], * containerRestartPolicy: containerInstanceContainerRestartPolicy, * definedTags: { * "foo-namespace.bar-key": "value", * }, * displayName: containerInstanceDisplayName, * dnsConfig: { * nameservers: containerInstanceDnsConfigNameservers, * options: containerInstanceDnsConfigOptions, * searches: containerInstanceDnsConfigSearches, * }, * faultDomain: containerInstanceFaultDomain, * freeformTags: { * "bar-key": "value", * }, * gracefulShutdownTimeoutInSeconds: containerInstanceGracefulShutdownTimeoutInSeconds, * imagePullSecrets: [{ * registryEndpoint: containerInstanceImagePullSecretsRegistryEndpoint, * secretType: containerInstanceImagePullSecretsSecretType, * password: containerInstanceImagePullSecretsPassword, * secretId: testSecret.id, * username: containerInstanceImagePullSecretsUsername, * }], * securityContext: { * fsGroup: Number(containerInstanceSecurityContextFsGroup), * fsGroupChangePolicy: containerInstanceSecurityContextFsGroupChangePolicy, * securityContextType: containerInstanceSecurityContextSecurityContextType, * }, * volumes: [{ * name: containerInstanceVolumesName, * volumeType: containerInstanceVolumesVolumeType, * backingStore: containerInstanceVolumesBackingStore, * configs: [{ * data: containerInstanceVolumesConfigsData, * fileName: containerInstanceVolumesConfigsFileName, * path: containerInstanceVolumesConfigsPath, * }], * "export": { * id: containerInstanceVolumesExportId, * ociFssExportType: containerInstanceVolumesExportOciFssExportType, * }, * mountCommand: { * mountOptions: [{ * option: containerInstanceVolumesMountCommandMountOptionsOption, * value: containerInstanceVolumesMountCommandMountOptionsValue, * }], * }, * mountTarget: { * id: containerInstanceVolumesMountTargetId, * ociFssMountTargetType: containerInstanceVolumesMountTargetOciFssMountTargetType, * }, * security: { * auth: containerInstanceVolumesSecurityAuth, * isEncryptedInTransit: containerInstanceVolumesSecurityIsEncryptedInTransit === "true", * }, * subnetId: testSubnet.id, * }], * }); * ``` * * ## Import * * ContainerInstances can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:ContainerEngine/containerInstance:ContainerInstance test_container_instance "id" * ``` */ export declare class ContainerInstance extends pulumi.CustomResource { /** * Get an existing ContainerInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ContainerInstanceState, opts?: pulumi.CustomResourceOptions): ContainerInstance; /** * Returns true if the given object is an instance of ContainerInstance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ContainerInstance; /** * The availability domain where the container instance runs. */ readonly availabilityDomain: pulumi.Output; /** * (Updatable) The compartment OCID. */ readonly compartmentId: pulumi.Output; /** * The number of containers on the container instance. */ readonly containerCount: pulumi.Output; /** * Container restart policy */ readonly containerRestartPolicy: pulumi.Output; /** * The containers to create on this container instance. */ readonly containers: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically. */ readonly displayName: pulumi.Output; /** * Allow customers to define DNS settings for containers. If this is not provided, the containers use the default DNS settings of the subnet. */ readonly dnsConfig: pulumi.Output; /** * The fault domain where the container instance runs. */ readonly faultDomain: pulumi.Output; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted. */ readonly gracefulShutdownTimeoutInSeconds: pulumi.Output; /** * The image pulls secrets so you can access private registry to pull container images. */ readonly imagePullSecrets: pulumi.Output; /** * A message that describes the current state of the container in more detail. Can be used to provide actionable information. */ readonly lifecycleDetails: pulumi.Output; /** * Security context for all containers in a container instance. */ readonly securityContext: pulumi.Output; /** * The shape of the container instance. The shape determines the resources available to the container instance. */ readonly shape: pulumi.Output; /** * The size and amount of resources available to the container instance. */ readonly shapeConfig: pulumi.Output; /** * (Updatable) The target state for the Container Instance. Could be set to `ACTIVE` or `INACTIVE`. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly state: pulumi.Output; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`. */ readonly systemTags: pulumi.Output<{ [key: string]: string; }>; /** * TenantId id of the container instance. */ readonly tenantId: pulumi.Output; /** * The time the container instance was created, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). */ readonly timeCreated: pulumi.Output; /** * The time the container instance was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). */ readonly timeUpdated: pulumi.Output; /** * The networks available to containers on this container instance. */ readonly vnics: pulumi.Output; /** * The number of volumes that are attached to the container instance. */ readonly volumeCount: pulumi.Output; /** * A volume is a directory with data that is accessible across multiple containers in a container instance. * * You can attach up to 32 volumes to single container instance. */ readonly volumes: pulumi.Output; /** * Create a ContainerInstance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ContainerInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ContainerInstance resources. */ export interface ContainerInstanceState { /** * The availability domain where the container instance runs. */ availabilityDomain?: pulumi.Input; /** * (Updatable) The compartment OCID. */ compartmentId?: pulumi.Input; /** * The number of containers on the container instance. */ containerCount?: pulumi.Input; /** * Container restart policy */ containerRestartPolicy?: pulumi.Input; /** * The containers to create on this container instance. */ containers?: pulumi.Input[] | undefined>; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically. */ displayName?: pulumi.Input; /** * Allow customers to define DNS settings for containers. If this is not provided, the containers use the default DNS settings of the subnet. */ dnsConfig?: pulumi.Input; /** * The fault domain where the container instance runs. */ faultDomain?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted. */ gracefulShutdownTimeoutInSeconds?: pulumi.Input; /** * The image pulls secrets so you can access private registry to pull container images. */ imagePullSecrets?: pulumi.Input[] | undefined>; /** * A message that describes the current state of the container in more detail. Can be used to provide actionable information. */ lifecycleDetails?: pulumi.Input; /** * Security context for all containers in a container instance. */ securityContext?: pulumi.Input; /** * The shape of the container instance. The shape determines the resources available to the container instance. */ shape?: pulumi.Input; /** * The size and amount of resources available to the container instance. */ shapeConfig?: pulumi.Input; /** * (Updatable) The target state for the Container Instance. Could be set to `ACTIVE` or `INACTIVE`. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ state?: pulumi.Input; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`. */ systemTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * TenantId id of the container instance. */ tenantId?: pulumi.Input; /** * The time the container instance was created, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). */ timeCreated?: pulumi.Input; /** * The time the container instance was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339). */ timeUpdated?: pulumi.Input; /** * The networks available to containers on this container instance. */ vnics?: pulumi.Input[] | undefined>; /** * The number of volumes that are attached to the container instance. */ volumeCount?: pulumi.Input; /** * A volume is a directory with data that is accessible across multiple containers in a container instance. * * You can attach up to 32 volumes to single container instance. */ volumes?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a ContainerInstance resource. */ export interface ContainerInstanceArgs { /** * The availability domain where the container instance runs. */ availabilityDomain: pulumi.Input; /** * (Updatable) The compartment OCID. */ compartmentId: pulumi.Input; /** * Container restart policy */ containerRestartPolicy?: pulumi.Input; /** * The containers to create on this container instance. */ containers: pulumi.Input[]>; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically. */ displayName?: pulumi.Input; /** * Allow customers to define DNS settings for containers. If this is not provided, the containers use the default DNS settings of the subnet. */ dnsConfig?: pulumi.Input; /** * The fault domain where the container instance runs. */ faultDomain?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The amount of time that processes in a container have to gracefully end when the container must be stopped. For example, when you delete a container instance. After the timeout is reached, the processes are sent a signal to be deleted. */ gracefulShutdownTimeoutInSeconds?: pulumi.Input; /** * The image pulls secrets so you can access private registry to pull container images. */ imagePullSecrets?: pulumi.Input[] | undefined>; /** * Security context for all containers in a container instance. */ securityContext?: pulumi.Input; /** * The shape of the container instance. The shape determines the resources available to the container instance. */ shape: pulumi.Input; /** * The size and amount of resources available to the container instance. */ shapeConfig: pulumi.Input; /** * (Updatable) The target state for the Container Instance. Could be set to `ACTIVE` or `INACTIVE`. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ state?: pulumi.Input; /** * The networks available to containers on this container instance. */ vnics: pulumi.Input[]>; /** * A volume is a directory with data that is accessible across multiple containers in a container instance. * * You can attach up to 32 volumes to single container instance. */ volumes?: pulumi.Input[] | undefined>; } //# sourceMappingURL=containerInstance.d.ts.map