GCPolicy Args
Creates a Google Cloud Bigtable GC Policy inside a family. For more information see the official documentation and API.
Warning: We don't recommend having multiple GC policies for the same column family as it may result in unexpected behavior. Note: GC policies associated with a replicated table cannot be destroyed directly. Destroying a GC policy is translated into never perform garbage collection, this is considered relaxing from pure age-based or version-based GC policy, hence not allowed. The workaround is unreplicating the instance first by updating the instance to have one cluster.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.bigtable.Instance;
import com.pulumi.gcp.bigtable.InstanceArgs;
import com.pulumi.gcp.bigtable.inputs.InstanceClusterArgs;
import com.pulumi.gcp.bigtable.Table;
import com.pulumi.gcp.bigtable.TableArgs;
import com.pulumi.gcp.bigtable.inputs.TableColumnFamilyArgs;
import com.pulumi.gcp.bigtable.GCPolicy;
import com.pulumi.gcp.bigtable.GCPolicyArgs;
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) {
var instance = new Instance("instance", InstanceArgs.builder()
.clusters(InstanceClusterArgs.builder()
.clusterId("tf-instance-cluster")
.numNodes(3)
.storageType("HDD")
.build())
.build());
var table = new Table("table", TableArgs.builder()
.instanceName(instance.name())
.columnFamilies(TableColumnFamilyArgs.builder()
.family("name")
.build())
.build());
var policy = new GCPolicy("policy", GCPolicyArgs.builder()
.instanceName(instance.name())
.table(table.name())
.columnFamily("name")
.deletionPolicy("ABANDON")
.gcRules("""
{
"rules": [
{
"max_age": "168h"
}
]
}
""")
.build());
}
}
Import
This resource does not support import.
Constructors
Properties
The name of the column family.
The deletion policy for the GC policy. Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful for GC policy as it cannot be deleted in a replicated instance. Possible values are: ABANDON
.
The name of the Bigtable instance.
GC policy that applies to all cells older than the given age.
GC policy that applies to all versions of a cell except for the most recent.