UNPKG

@cdktf/provider-upcloud

Version:

Prebuilt upcloud Provider for Terraform CDK (cdktf)

112 lines (111 loc) 5.6 kB
/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface ServerGroupConfig extends cdktf.TerraformMetaArguments { /** * Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will * result in all servers in the group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. * * * `strict` policy doesn't allow servers in the same server group to be on the same host * * `yes` refers to best-effort policy and tries to put servers on different hosts, but this is not guaranteed * * `no` refers to having no policy and thus no effect on server host affinity * * To verify if the anti-affinity policies are met by requesting a server group details from API. For more information * please see UpCloud API documentation on server groups. * * Plese also note that anti-affinity policies are only applied on server start. This means that if anti-affinity * policies in server group are not met, you need to manually restart the servers in said group, * for example via API, UpCloud Control Panel or upctl (UpCloud CLI) * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#anti_affinity_policy ServerGroup#anti_affinity_policy} */ readonly antiAffinityPolicy?: string; /** * User defined key-value pairs to classify the server group. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#labels ServerGroup#labels} */ readonly labels?: { [key: string]: string; }; /** * UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `server_group` property of `upcloud_server`. See also `track_members` property. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#members ServerGroup#members} */ readonly members?: string[]; /** * Title of your server group * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#title ServerGroup#title} */ readonly title: string; /** * Controls if members of the server group are being tracked in this resource. Set to `false` when using `server_group` property of `upcloud_server` to attach servers to the server group to avoid delayed state updates. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#track_members ServerGroup#track_members} */ readonly trackMembers?: boolean | cdktf.IResolvable; } /** * Represents a {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group upcloud_server_group} */ export declare class ServerGroup extends cdktf.TerraformResource { static readonly tfResourceType = "upcloud_server_group"; /** * Generates CDKTF code for importing a ServerGroup resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the ServerGroup to import * @param importFromId The id of the existing ServerGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ServerGroup to import is found */ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): cdktf.ImportableResource; /** * Create a new {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.23.3/docs/resources/server_group upcloud_server_group} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options ServerGroupConfig */ constructor(scope: Construct, id: string, config: ServerGroupConfig); private _antiAffinityPolicy?; get antiAffinityPolicy(): string; set antiAffinityPolicy(value: string); resetAntiAffinityPolicy(): void; get antiAffinityPolicyInput(): string | undefined; get id(): string; private _labels?; get labels(): { [key: string]: string; }; set labels(value: { [key: string]: string; }); resetLabels(): void; get labelsInput(): { [key: string]: string; } | undefined; private _members?; get members(): string[]; set members(value: string[]); resetMembers(): void; get membersInput(): string[] | undefined; private _title?; get title(): string; set title(value: string); get titleInput(): string | undefined; private _trackMembers?; get trackMembers(): boolean | cdktf.IResolvable; set trackMembers(value: boolean | cdktf.IResolvable); resetTrackMembers(): void; get trackMembersInput(): boolean | cdktf.IResolvable | undefined; protected synthesizeAttributes(): { [name: string]: any; }; protected synthesizeHclAttributes(): { [name: string]: any; }; }