File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed
examples/resources/castai_commitments Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ # GCP example with default OVERWRITE mode and auto_assignment enabled (default)
12resource "castai_commitments" "gcp_test" {
23 gcp_cuds_json = file (" ./cuds.json" )
34 commitment_configs {
@@ -20,6 +21,7 @@ resource "castai_commitments" "gcp_test" {
2021 }
2122}
2223
24+ # Azure example with default OVERWRITE mode and auto_assignment enabled (default)
2325resource "castai_commitments" "azure_test" {
2426 azure_reservations_csv = file (" ./reservations.csv" )
2527 commitment_configs {
@@ -41,3 +43,26 @@ resource "castai_commitments" "azure_test" {
4143 }
4244 }
4345}
46+
47+ # Azure example with APPEND mode and auto_assignment disabled to prevent commitments from being auto-assigned to all matching clusters.
48+ resource "castai_commitments" "team_a" {
49+ azure_reservations_csv = file (" ./team-a-reservations.csv" )
50+ import_mode = " APPEND"
51+
52+ commitment_configs {
53+ matcher {
54+ region = " eastus"
55+ type = " Standard_DS2_v2"
56+ name = " team-a-reservation"
57+ }
58+ prioritization = false
59+ allowed_usage = 1
60+ status = " Active"
61+ scaling_strategy = " Default"
62+ auto_assignment = false
63+
64+ assignments {
65+ cluster_id = " team-a-cluster-id"
66+ }
67+ }
68+ }
You can’t perform that action at this time.
0 commit comments