Instance

class Instance : KotlinCustomResource

A Google Cloud Memcache instance. To get more information about Instance, see:

Example Usage

Memcache Instance Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.memcache.Instance;
import com.pulumi.gcp.memcache.InstanceArgs;
import com.pulumi.gcp.memcache.inputs.InstanceNodeConfigArgs;
import com.pulumi.gcp.memcache.inputs.InstanceMaintenancePolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var memcacheNetwork = ComputeFunctions.getNetwork(GetNetworkArgs.builder()
.name("test-network")
.build());
var serviceRange = new GlobalAddress("serviceRange", GlobalAddressArgs.builder()
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(memcacheNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.build());
var privateServiceConnection = new Connection("privateServiceConnection", ConnectionArgs.builder()
.network(memcacheNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(serviceRange.name())
.build());
var instance = new Instance("instance", InstanceArgs.builder()
.authorizedNetwork(privateServiceConnection.network())
.nodeConfig(InstanceNodeConfigArgs.builder()
.cpuCount(1)
.memorySizeMb(1024)
.build())
.nodeCount(1)
.memcacheVersion("MEMCACHE_1_5")
.maintenancePolicy(InstanceMaintenancePolicyArgs.builder()
.weeklyMaintenanceWindows(InstanceMaintenancePolicyWeeklyMaintenanceWindowArgs.builder()
.day("SATURDAY")
.duration("14400s")
.startTime(InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTimeArgs.builder()
.hours(0)
.minutes(30)
.seconds(0)
.nanos(0)
.build())
.build())
.build())
.build());
}
}

Import

Instance can be imported using any of these accepted formats

$ pulumi import gcp:memcache/instance:Instance default projects/{{project}}/locations/{{region}}/instances/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{region}}/{{name}}
$ pulumi import gcp:memcache/instance:Instance default {{name}}

Properties

Link copied to clipboard

The full name of the GCE network to connect the instance to. If not provided, 'default' will be used.

Link copied to clipboard
val createTime: Output<String>

(Output) Output only. The time when the policy was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits

Link copied to clipboard

Endpoint for Discovery API

Link copied to clipboard
val displayName: Output<String>

A user-visible name for the instance.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

Resource labels to represent user-provided metadata.

Link copied to clipboard

Maintenance policy for an instance. Structure is documented below.

Link copied to clipboard

Output only. Published maintenance schedule. Structure is documented below.

Link copied to clipboard

The full version of memcached server running on this instance.

Link copied to clipboard

Additional information about the instance state, if available. Structure is documented below.

Link copied to clipboard

User-specified parameters for this memcache instance. Structure is documented below.

Link copied to clipboard
val memcacheVersion: Output<String>?

The major version of Memcached software. If not provided, latest supported version will be used. Currently the latest supported major version is MEMCACHE_1_5. The minor version will be automatically determined by our system based on the latest supported minor version. Default value is MEMCACHE_1_5. Possible values are: MEMCACHE_1_5.

Link copied to clipboard
val name: Output<String>

The resource name of the instance.

Link copied to clipboard

Configuration for memcache nodes. Structure is documented below.

Link copied to clipboard
val nodeCount: Output<Int>

Number of nodes in the memcache instance.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val region: Output<String>

The region of the Memcache instance. If it is not provided, the provider region is used.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val zones: Output<List<String>>

Zones where memcache nodes should be provisioned. If not provided, all zones will be used.