func()

in internal/provider/bitbucketserver_connection_resource.go [58:109]


func (r *bitbucketServerConnectionResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
	resp.Schema = schema.Schema{
		Attributes: map[string]schema.Attribute{
			"id": schema.StringAttribute{
				Computed:    true,
				Description: "Numeric identifier for the connection. This is a string for easier resource import.",
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
				},
			},
			"last_updated": schema.StringAttribute{
				Computed:    true,
				Description: "Timestamp of the last Terraform update of the connection.",
			},
			"created_at": schema.StringAttribute{
				Computed:    true,
				Description: "When the connection was created in devlake.",
			},
			"endpoint": schema.StringAttribute{
				Description: "The REST API endpoint URL.",
				Required:    true,
			},
			"name": schema.StringAttribute{
				Description: "The name of the bitbucket server connection.",
				Required:    true,
			},
			"password": schema.StringAttribute{
				Description: "Service account password or token, the following permissions are required to collect data from Bitbucket repositories: Repository read.",
				Required:    true,
				Sensitive:   true,
			},
			"proxy": schema.StringAttribute{
				Computed:    true,
				Description: "If you are behind a corporate firewall or VPN you may need to utilize a proxy server.",
				Optional:    true,
			},
			"rate_limit_per_hour": schema.Int64Attribute{
				Optional:    true,
				Description: "DevLake uses a dynamic rate limit to collect Bitbucket Server/Data Center data. You can adjust the rate limit if you want to increase or lower the speed.",
				Computed:    true,
			},
			"updated_at": schema.StringAttribute{
				Computed:    true,
				Description: "When the connection was updated in devlake.",
			},
			"username": schema.StringAttribute{
				Description: "Service account username.",
				Required:    true,
			},
		},
	}
}