func()

in teamcity/pool_resource.go [45:79]


func (r *poolResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
	resp.Schema = schema.Schema{
		Description: "An Agent Pool in TeamCity is a group of agents that can be associated with projects. More info [here](https://www.jetbrains.com/help/teamcity/configuring-agent-pools.html)",
		Attributes: map[string]schema.Attribute{
			"name": schema.StringAttribute{
				Required: true,
			},
			"id": schema.Int64Attribute{
				Computed: true,
				PlanModifiers: []planmodifier.Int64{
					int64planmodifier.UseStateForUnknown(),
				},
			},
			"size": schema.Int64Attribute{
				Required:            false,
				Optional:            true,
				MarkdownDescription: "Agents capacity for the given pool, don't add for unlimited",
				Validators: []validator.Int64{
					int64validator.AtLeast(0),
				},
			},
			"projects": schema.SetAttribute{
				Computed:            true,
				Required:            false,
				Optional:            true,
				MarkdownDescription: "Projects assigned to the given pool. List of Project IDs.",
				ElementType:         types.StringType,
				Default:             setdefault.StaticValue(basetypes.NewSetValueMust(types.StringType, []attr.Value{})),
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
				},
			},
		},
	}
}